Comparing nvarchar with bigint in sql server -


i investigating performance issue following sql statement:

update tablea  set columna1 = columnb1  tableb  tablea.columna2 = tableb.columnb2 

the problem tablea.columna2 of type nvarchar(50) while tableb.columnb2 of type bigint. question how sql server execute such query; cast bigint nvarchar , compare using nvarchar comparing operators or cast nvarchar bigint , compare bigint comparing operators.

another thing: if had leave column types tablea.columna2, tableb.columnb2' how can rewrite query enhance performance?

note: query working on around 100,000 records, takes forever.

thanks in advance, appreciate help.

in comparison, nvarchar converted bigint, because bigint has higher precedence

see http://msdn.microsoft.com/en-us/library/ms190309.aspx


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -