Basic Query Optimization Suggestions

The following list of suggestions concentrates on the basics of query optimization. It is best to start with the basics when trying to improve query performance. Quite often, a minor modification to a query yields a substantial gain in performance.

  • Target queries that run slowly and frequently. By simply adding an index, you can often see a dramatic improvement in query performance.

  • Understand your data. To use optimization tricks, you must understand your query and how it relates to your data. Otherwise, your lack of knowledge might hamper your ability to effectively rewrite a query.

  • Record statistics about the existing query. Before you begin to optimize a query, record a showplan (see “Showplan and Reading ...

Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.