sql - Is IN with the multiple of the same terms slower? -


for example, noticeably slower:

delete [table] [reoid] in ( 1, 1, 1, 2, 2, 1, 3, 5) 

than this:

delete [table] [reoid] in ( 1, 2, 3, 4) 

sql server 2008 r2.

thanks!

most engines eliminate duplicates in constant in list on parsing stage.

such query parse marginally slower non-duplicated list, produce same plan , real-world scenarios, hardly notice difference.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -