November 24, 2010

Dynamic Management Views (DMV) for SQL Server Performance and Tuning




In the earlier versions of SQL Server, it was a daunting task to diagnose and resolve performance issues. With DMV’s being introduced in SQL Server 2005 and enhanced in SQL Server 2008, this task has become much easier now.

Sometime back I had written on Important DMVs to monitor CPU – SQL Server. Here are 6 important DMV’s that in my opinion are very useful to diagnose and tune the performance of your SQL Server Database.

sys.dm_os_performance_counters - Returns a row per performance counter maintained by the server

sys.dm_db_index_usage_stats - Returns counts of different types of index operations and the time each type of operation was last performed

sys.dm_db_index_physical_stats - Returns size and fragmentation information for the data and indexes of the specified table or view

sys.dm_db_index_operational_stats - Returns current low-level I/O, locking, latching, and access method activity for each partition of a table or index in the database.

sys.dm_os_waiting_tasks - Returns information about the wait queue of tasks that are waiting on some resource

sys.dm_exec_query_stats - Returns aggregate performance statistics for cached query plans.

Feel free to share the DMV’s that you think are helpful in tuning a Database performance.

You can also read SQL Azure: Troubleshoot and Optimize Queries using DMV’s – Free Whitepaper


Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

 
  Feedback:

comments

1 Response to "Dynamic Management Views (DMV) for SQL Server Performance and Tuning"
  1. Anonymous said...
    November 25, 2010 at 10:21 AM

    Hi,

    Nice article.

    You can discover a lot more about DMVs in this forthcoming book www.manning.com/stirk.

    Chapter 1 can be downloaded for free and includes scripts for:

    A simple monitor
    Finding your slowest queries
    Find your missing indexes
    Identifying what SQL is running now
    Quickly find a cached plan

    Thanks
    Ian

 

Copyright © 2009-2014 All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal | Terms and Conditions