Call now: (800) 766-1884  


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA

 SQL Server Scripts
 Scripts Menu




  SQL Server Tips by Robin Schumacher

Rewrite and Benchmark

When the SQL is valid, the objects are in order, and object-based resolutions have been investigated, it is time to begin trying different code combinations in hopes of improving the query’s performance. This is where SQL tuning becomes an art.

Using hints, changing subqueries to joins, switching UNION’s to UNION ALL’s can become time consuming but rewarding as tuning becomes easier.

Once the DBA has assembled a suite of new SQL combinations for the existing query, it is time to actually send them through the database to see if anything is being accomplished. When performing these informal benchmarks, it is important to do them correctly.

For example, each query should not just be executed one time and the measurements recorded. First time executions typically take longer than subsequent tries due to parse activity and data being read in the first time from disk. At a minimum, each new query should be sent through three to four times with the high and low readings thrown out.

The above book excerpt is from:

High-Performance SQL Server DBA
Tuning & Optimization Secrets

ISBN: 0-9761573-6-5
Robin Schumacher  


Burleson Consulting Remote DB Administration







Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.

Burleson Consulting
SQL Server database support


Copyright © 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter