Enhance sys.dm_exec_query_plan to accept database_id
This query is very expensive:
CROSS APPLY sys.dmexecqueryplan(s.plan_handle);
This is because sys.dmexecquery_plan() obtains server-wide information.
Upvotes: 3<=-=Feb 21 2008 2:14PM=-=>
Thank you for reporting the issue. We prioritized it and it could not fit on our SQL 2008 schedule. We are tracking it for the next release.
SQL Relational Engine