Feb
4
Written by:
Richard To
Wednesday, February 04, 2009 10:35 AM
In a previous blog
http://www.toadworld.com/Community/Blogs/tabid/67/EntryID/324/Default.aspx I discussed a real life example of “How to use Quest SQL Optimizer to tune complex SQL”. I spent two days installing the database and another two days tuning a complicated SQL statement, which originally the SQL statement executed in 8 hours and was tuned down to 1 minute and 28 seconds using Quest SQL Optimizer. This SQL statement is now almost 320 times faster than the original SQL statement.
But there was another complex SQL statement that was waiting for me to tune, and I had only one day left from the original 5 days I was given to to tune these problem SQL statements. Normally, I am very confident that I could tune any SQL within a reasonable amount of time. The issue that I had with the Case 2 SQL statement was that it took more than 8 hours to execute. Given that I had only one day to find a better alternative, I could not do even one test run for any alternative, nor did I have the luxury to completely execute the original SQL since executing it took longer than the time I had left to find the best alternative. It was my first experience where I had to tune a SQL statement where I did not know the actual run time of the original SQL statement I was trying to improve.
DOWNLOAD PDF: A Real Life Example 2 (1.1 MB)