Jithin Shaji
Jithin Shaji

Reputation: 6073

View the waiting/suspended queries between a time period in the past

I am trying to optimize an SQL process using the dmv ([sys].[dm_os_wait_stats]).

Is there any way that we can see the waiting/suspended queries between a time period in the past?. Like want to have records only from 3pm today.

Currently I clean the instance every time before running the process using

DBCC SQLPERF ('sys.dm_os_wait_stats', CLEAR);
GO

Upvotes: 1

Views: 61

Answers (1)

mehdi lotfi
mehdi lotfi

Reputation: 11581

I suggest that using monitoring tools such as Idera or Redgate monitor in order to monitor sql server waiting. You can also copy ([sys].[dm_os_wait_stats]) data in other table periodically.

Upvotes: 1

Related Questions