July 17, 2012 at 6:59 am
Hi
How can i know what is the first query that creates the plan in cache,right after update statistics with fullscan?
is there any DMV that i could use or it is just sql profiler?
July 17, 2012 at 8:25 am
You could do something like this:
SELECT
*
FROM
sys.dm_exec_cached_plans AS DECP
CROSS APPLY sys.dm_exec_sql_text(DECP.plan_handle) AS DEST
YOu don't want to do select * but that's just a quick example. You might have to poll until the first query that hits the table you are interested in.
You might also be able to setup and extended events session, but I don't know for sure.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply