snippetsqlModerate
How do you see which database on a Server uses most resources
Viewed 0 times
youserverseeusesdatabasehowwhichresourcesmost
Problem
I have a database server with a couple of databases on it. How can I see where any resource pressure may come from?
I would like to get a table of:
I would like to get a table of:
- Database Name
- Batch Requests per second
- CPU Time
- Logical Read
- Logical Writes
Solution
Only some resources can be tracked to databases. IO and buffer pool usage can clearly be tracked to a database:
The query execution statistics (like logical reads) can be attributed to queries, but cannot be associated (correctly) with a database because queries can (and often do) span databases.
- IO usage:
sys.dm_io_virtual_file_stats
- Buffer pool usage:
sys.dm_os_buffer_descriptors
The query execution statistics (like logical reads) can be attributed to queries, but cannot be associated (correctly) with a database because queries can (and often do) span databases.
sys.dm_exec_query_stats is the main entry point for these stats.Context
StackExchange Database Administrators Q#50899, answer score: 11
Revisions (0)
No revisions yet.