Let's say I have 6000+ sql statements created by our admins over the course of any given year and they're stored in a DB
SELECT SQLStatement FROM QueryList
OUTPUT:
1 "select * from tbl where"
2 "select a from tbl2 where"
3 ...
My question is this: How can I take those 6000+ sql statements and get an estimated query execution plan for them so I can determine which queries need optimization? It's not practical to do them one-by-one with SHOWPLAN_XML or some such...there's
6000 of them. And I don't want to execute them to poll the query cache because some of them take 30-60 minutes to run and kill performance. So I really need the ability to enumerate each SQL statement, estimate the plan it WOULD take and then output
the execution plan information so they can be more readily targeted for optimization.
Any ideas?
John Nelson #2