I remember that I have seen somewhere in the past that when I saw the XML of the actual execution plan, it had the details about when the stats were updated on the indexes on a table and what was the number of rows sampled. I am not able to find that info now. Is there any knob that needs to be turned on or actual plan never had that kind of information in actual execution plan?
Sql-server – Statistics Update Time is missing in Actual execution plan
execution-plansql serverstatistics
Related Question
- Sql-server – Why does SQL Server Profiler trace not capture SELECT operator in execution plans
- Sql-server – way to get the Actual Execution Plan for a cancelled query
- Sql-server – Wrong no of actual rows and why did statistics update help here
- Sql-server – SQL Profiler plus Include Actual Execution Plan
- Sql-server – Funky cardinality estimate skews, high memory grants and missing statistics
- Sql-server – Adding an INNER JOIN ruins query performance due to different execution plan despite updated STATISTICS and RECOMPILE, why
- Sql-server – How to get an actual execution plan from the linked server
Best Answer
It is indeed in the execution plan, for those stats that were used.
There are two possible reasons why you don't see it:
You use an older version of the database engine, where this info wasn't present in the XML.
You use an older version of SSMS, which doesn't expose the info in the XML.
The answer to which of the above you have is by looking in the XML and see if the info is there. I'm on SQL Server 2019 and SSMS 18.5.
And you need to look at the right place, as well. You probably have to select the SELECT (outermost) operator, perhaps twice with something else in between, and view the Properties window: