all groups > sql server (alternate) > june 2005 >
You're in the

sql server (alternate)

group:

stupid SQL question on Where clause



stupid SQL question on Where clause smart_aleck72 NO[at]SPAM yahoo.com
6/30/2005 12:53:04 PM
sql server (alternate): Is there any difference in the order of parameters in the where clause?
Does it add any speed to declare the least refined first or last?
Re: stupid SQL question on Where clause Erland Sommarskog
6/30/2005 9:29:42 PM
(smart_aleck72@yahoo.com) writes:
[quoted text, click to view]

No.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
Re: stupid SQL question on Where clause Mr.LonelyStranger NO[at]SPAM gmail.com
7/10/2005 10:51:44 AM


[quoted text, click to view]


yes, it does...
I have seen it performing well when u make the condition
that filter the most records first.
Re: stupid SQL question on Where clause --CELKO--
7/10/2005 11:42:07 AM
No, the optimizer gets to re-order the predicates as it sees fit. The
*kind* of predicates and the statistics is important, however.
AddThis Social Bookmark Button