SQL Server 2005 DMV - quick information to find resource allocation & DDL bottleneck

Published 09 June 08 01:29 AM | SQL Master 

Initially I preferred to put this blog post within Performance tuning blog section here, but as it relates to the TSQL script thought this is best place to go.

Anyways, if you have a performance problem the foremost option is to find whether the server resources are utilized properly or not, this is where SQL Server migth encounter the allocation bottleneck in terms of memory & query exeuction.

The following DMV will get the information about about the waits encountered by threads that are in execution. You can use this view to diagnose performance issues with SQL Server and also with specific queries and batches, by using the TSQL below you can identify the allocation bottleneck:

SELECT session_id, wait_duration_ms, resource_description

FROM sys.dm_os_waiting_tasks

WHERE wait_type LIKE 'PAGE%LATCH_%' AND resource_description like '2:%'

As you can see the above query will get information for TEMPDB that represents any page in TEMPDB acorss any file. Refer to Kalen Delaney's Inside SQL Server 2005: Query Tuning and Optimization book for  more information.

Second part of the subject refers about identifying the DDL bottlenecks, which is similar to finding the allocation contention by getting the current worker threads that are waiting by using the above TSQL.

Comments

# Other SQL Server Blogs around the Web said on June 9, 2008 1:49 AM:

Initially I preferred to put this blog post within Performance tuning blog section here, but as it relates

# SQL Server Transact-SQL (SSQA.net) : SQL Server 2005 DMV - quick information to find resource allocation & DDL bottleneck said on June 9, 2008 2:29 AM:

PingBack from http://sqlserver-qa.net/blogs/t-sql/archive/2008/06/09/4426.aspx

Anonymous comments are disabled

About SQL Master

**__________________________________** SQL Server MVP, Sr. DBA & industry expert. - Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.

Search

Go

This Blog

«June 2008»
SMTWTFS
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Syndication