Read SHOW_STATISTICS headers, density and histogram boundaries, compare estimates with your plan, and query the histogram directly.
SQL SERVER – Wrap on Series of Temporary Statistics
The final post on temporary statistics answers reader questions, like whether you can update them. Only SQL Server can, but you can drop them.
SQL SERVER – Scripting Statistics for Read-Only Database and Making it Permanent
Learn scripting statistics for read-only database use from TempDB, then make them permanent so they survive a SQL Server restart.
SQL SERVER – Location of Statistics Before and After Database is Marked as a Read-Only
Where do old statistics go when a database becomes read-only? The location of statistics created before the change stays the same, and they remain permanent.
SQL SERVER – How to Script Statistics from SSMS? – Scripting Statistics is Disabled in SSMS
Trying to script statistics in SSMS but the option is always disabled, even outside read-only databases? Here is why it happens.
SQL SERVER – Statistics for Read-Only Database are in TempDB
Statistics usually live in the same database as the table, so where do they go for a read-only database? The answer is TempDB. Here is how it works.
Finding Which Statistics a Query Used in the Execution Plan
Find which statistics a query used through OptimizerStatsUsage in actual-plan XML, cached plans, and Query Store history.






