Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

sys.dm_db_index_physical_stats: big differences in execution time

$
0
0

We run  sys.dm_db_index_physical_stats(DB_ID(<DB-name>), NULL, NULL, NULL, NULL) on a daily basis to collect DB object size statistics.

The first time we scheduled this SQL Job, it ran for 20min. The second run (1 day later at the same time in comparable load circumstances) it only ran for 1 min.

I checked [sys].[dm_exec_requests] and there was no locking goin on.

Can anyone explain me these differences in execution time? Any insight in how this functions actually works under the hood is always welcome.


Geert Vanhove DCOD ------ http://geertvanhove.wordpress.com/ ----------- Please click the Mark as Answer or Vote As Helpful if a post solves your problem or is helpful!


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>