Yesterday I passed the 70-451 exam (PRO: Designing Database Solutions and Data Access Using Microsoft SQL Server 2008) and the preparation for this exam increased my knowledge of reading query plans extensively.
While preparing for the exam I took a look at a stored procedure at a client's server that was performing poorly. This client is in the process of upgrading from SQL Server 2000 to SQL Server 2008 and they now also wanted to improve this stored procedure.
Using the query plan, rewriting the code with CTE's (Common Table Expressions), creating new indexes and even dropping an existing index, improved the query's duration from 1 minute and 30 seconds to just 10 seconds!
posted @ Thursday, September 16, 2010 4:11 PM