Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: SQL Server
Expertise: Beginner
Jul 14, 1999



Application Security Testing: An Integral Part of DevOps

SQL Query Optimizing Tips

I just wanted to know if you could share some techniques on how to optimize SQL queries (for example, inner join first before performing some steps, do not use computations, etc.).

Since this borders on a black art, the only advice I can offer is this: depending on how you are running these, use ODBC trace to trace the output of the query and, if you can, use showplan to see how the optimizer handles your request, and go from there.

There may be a zillion ways to improve performance, from creating an index to dropping one, or from changing datatypes. How about floats for auto-incrementing primary keys? (Just Kidding!)

DevX Pro
Comment and Contribute






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



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