Dave Ballantyne (5/24/2011)
Hi , see this page for a breakdown of your optionshttp://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/
Confirming great discussion of the causes of unacceptable performance and the available workarounds at this link. I inherited a "Catch-all query" stored procedure during migration from SQL 2000 to SQL 2008. It includes 5 ISNULL tests in the WHERE clause.
Execution time on the original design platform (2000) was about 5 sec.
Migrating as-is to 2008 resulted in 55 sec. execution time!!!
Refactored using the dynamic SQL approach covered above, and execution time of the query with no other design changes is < 1 sec.
Many thanks to Dave. And Gail.