sql - Too much difference in total run time of an update query with and without quotes -


i have query similar 1 below

update table1   set colum1 = 'xyz'  column2 in (1,2,3,....so on) 

here column2 of datatype varchar. in actual query in clause contains no.of values ranging 10000 60000 i.e, query updating 10000 60000 rows.

now when supply values without quotes took 10 minutes query execute. same query when gave quotes(like mentioned below) took less minute.

update table1*  set colum1 = 'xyz'  column2 in ('1','2','3',....so on) 

is natural? difference between above 2 queries former needs implicitly cast values in in clause. can 1 please explain? thanks

this problem common character string has been used store numeric key. sql server dutifully perform implicit conversion , return correct result, @ cost of poor performance doing scan instead of seek , using index correctly. -> source


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -