sys.dm_exec_procedure_stats reset

by Milad Firouzi   Last Updated April 27, 2016 08:02 AM

I want to get stats from the sys.dm_exec_procedure_stats view.

When I check the records from months ago, I see that after a point of time its stats reset daily, but there have been no server resets.

It seems there is a job running that makes this view reset. Can anyone help me with this problem? What kind of procedures will reset these views?

Tags : sql-server dmv


Answers 1


From the docs

The view returns one row for each cached stored procedure plan, and the lifetime of the row is as long as the stored procedure remains cached. When a stored procedure is removed from the cache, the corresponding row is eliminated from this view.

This dmv is therefore reset for each stored procedure recompile, which can happen, for example, after index and statistics maintenance

gbn
gbn
April 27, 2016 12:49 PM

Related Questions


creating index on big table(s)

Updated September 03, 2018 18:06 PM

Linked Server Error on SQL Agent Job

Updated March 16, 2016 08:02 AM