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:
- SQL Server execution plan analysis
- Tips for Using SQL Server Query Analyzer
- The Best SQL server performance tuning tips from SQLTeam (some amazing stuff here!)
- Identifying performance issues using SQL Server Profiler
- SQL Server Performance - Common Symptoms and Tools (Part I)
- Inside SQL Server: Parse, Compile, and Optimize (intro to the query processor)