Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL Server
Expertise: Beginner
Jun 29, 1999

WHERE Clause and Query Performance

Question:
As a rule of thumb, a query that does a join will run faster if the table with the least number of rows is referenced first in the FROM-clause and if appropriate indicies are created. Under what circumstances can the performance of a query be improved by transposing or re-ordering the content of the WHERE-clause?

Answer:
My understanding was that these order-dependent shortcuts or advantages were laid to rest by the SQL 7 optimiser. From what I read on the list servers and mail groups, people who make a living tuning are finding their opportunities to improve performance in the nics and wires more easily than by trying to outguess the optimiser. My guess is that there are other areas to consider for speed improvements besides the order of the WHERE clause, for example the datatypes used and their order in the construction of the index, where I think you can obtain more bang for the buck in the quest for performance.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date