Hello ALL, If I use IN caluse in my query will it be slow. Because I have heard that IN clause slow down the query . if it is what are the other alternatives so that performace can boost up. Regards Niladri
What type of IN clause: value list or subquery? In both cases, it depends on the indexing - especially when it's a subquery with a WHERE statement.
Also use exists and see the performance. or post the query you used Madhivanan Failing to plan is Planning to fail
You can test IN clause against exists (suggested by Madhivanan) or join combining in some cases with distinct. If it is just list of constants then use IN ,unless these values are increasing integers, in that case better use between.
See if this helps:http://snipurl.com/pctj -- Frank Kalis Microsoft SQL Server MVP http://www.insidesql.de Heute schon gebloggt?http://www.insidesql.de/blogs Ich unterstuetze PASS Deutschland e.V. http://www.sqlpass.de)