Databases Reference
In-Depth Information
Figure 4-4
We're going to use sys.dm_os_wait_stats as our start point for troubleshooting and because it repre-
sents all waits since SQL Server started we're going to run:
DBCC sqlperf ('sys.dm_os_wait_stats',clear)
This will clear the statistics before the start of every run. In a production environment you might not want
to lose this data, so alternatively you could take a view of the DMV before and after execution of your
tests and measure the delta between the two. Our test machine is a dual-core 2 GHz laptop with 2 GB
of RAM, with a maximum memory setting for SQL Server of 256 MB. Running the following workload
scriptforthefirsttime
DBCC sqlperf ('sys.dm_os_wait_stats',clear)
GO
exec usp_loopmarriageupdate
GO
SELECT * FROM sys.dm_os_wait_stats
ORDER BY wait_time_ms DESC
GO
Search WWH ::




Custom Search