Follow @RoyOsherove on Twitter

My First *real* SQL optimization (and some good resources)

Yeah, I know how to design a database and normalize tables, but this is some optimization stuff I never had to do. It was fun!

We recently encountered the task of optimizing a stored procedure that was taking very long to perform its business. It wasn’t that complicated but it was operating on a large table (350,000 records). The table has indexes on the columns in the select clauses but the procedure still took about 19 seconds to do its work.  (Thanks for the help, Santo!)

Some interesting lessons (and resources) came up from this experience(article)

And here are some very good resources on optimization in SQL server:

  1.   SQL Server execution plan analysis
  2. Tips for Using SQL Server Query Analyzer
  3. The Best SQL server performance tuning tips from SQLTeam (some amazing stuff here!)
  4. Identifying performance issues using SQL Server Profiler
  5. SQL Server Performance - Common Symptoms and Tools (Part I)
  6. Inside SQL Server: Parse, Compile, and Optimize (intro to the query processor)

Cool handy site: DropLoad

An optimizing experience