gotchaMinor
Why does SqlSentry Plan Explorer not give the duration of my queries?
Viewed 0 times
whytheexplorergiveplandoesdurationqueriesnotsqlsentry
Problem
I have a large nasty stored procedure in a 13gig database that takes 45 minutes to run when I include the actual execution plan. I save the query plan from SSMS and open in up in SQL Sentry Plan Explorer and I don't see a duration for any of the queries:
I've searched through the entire list of queries and resorted it, the entire column is empty. I know some queries in this particular stored procedure take a long time to run. While the stored procedure is large, it not a stored proc with millions of microsecond queries, and I know for a fact that certain queries take minutes to run.
I've searched through the entire list of queries and resorted it, the entire column is empty. I know some queries in this particular stored procedure take a long time to run. While the stored procedure is large, it not a stored proc with millions of microsecond queries, and I know for a fact that certain queries take minutes to run.
Solution
Martin is correct, in order to see duration and other metrics from an actual plan with Plan Explorer, "Get Actual Plan" must be run from within Plan Explorer. Actual plan XML does not contain this data, regardless of source.
Plan Explorer FREE uses STATISTICS TIME & IO behind the scenes and auto-correlates the data with the plan tree, and Plan Explorer PRO uses a dynamic rowset trace for this purpose. An advantage of the latter method is the ability to provide the full call stack including plans and metrics for embedded dynamic SQL calls. Neither method is affected by statement duration.
This is why we use our own .queryanalysis file format when saving plans from within Plan Explorer, as it contains this extra metadata along with the plan XML.
Plan Explorer FREE uses STATISTICS TIME & IO behind the scenes and auto-correlates the data with the plan tree, and Plan Explorer PRO uses a dynamic rowset trace for this purpose. An advantage of the latter method is the ability to provide the full call stack including plans and metrics for embedded dynamic SQL calls. Neither method is affected by statement duration.
This is why we use our own .queryanalysis file format when saving plans from within Plan Explorer, as it contains this extra metadata along with the plan XML.
Context
StackExchange Database Administrators Q#31320, answer score: 8
Revisions (0)
No revisions yet.