Flushes statistics from in-memory storage to the systabstats system table.
sp_flushstats objname
is the name of a table.
Flushes statistics for the titles table:
sp_flushstats titles
Some statistics in the systabstats table are updated in in-memory storage locations and flushed to systabstats periodically, to reduce overhead and contention on systabstats.
If you query systabstats using SQL, executing sp_flushstats guarantees that in-memory statistics are flushed to systabstats.
The optdiag command always flushes in-memory statistics before displaying output.
The statistics in sysstatistics are changed only by data definition language commands and do not require the use of sp_flushstats.
Only a System Administrator can execute sp_flushstats.