Cached pages in TempDB (MB)

This metric helps a DBA analyze how well TempDB is working on their server. Knowing more about what is stored in it, and by which process, will greatly help diagnose performance issues.

Install metric...

Metrics install automatically if you have Redgate Monitor installed.

If you are using Redgate’s SQL Server monitoring tool, Redgate Monitor, you can instantly install and run this metric on your servers.

TempDB is a key component in the general performance of a SQL Server. Knowing more about what is stored in it, and by which process, will greatly help diagnose performance issues. This metric helps a DBA analyze how well TempDB is working on their server. Seeing big changes in TempDB commitment between one database and another could be a sign of a wrongly sized TempDB, or indicate that one database is using TempDB in a sub-optimal way.

Metric definition

Name

Cached pages in TempDB (MB)

Description

The amount of space (in MB) consumed by user and internal processes, in TempDB per database. Big changes in allocations (increases or decreases) of space for particular databases can indicate possible problems, such as poorly written T-SQL. Keep a watch on big allocations that are not subsequently de-allocated appropriately. This trace shows the net effect, so increases not followed by decreases show a de-allocation is not taking place, possibly because of a long running transaction using a temporary table. Consider this trace along with the Log size and Log used traces for TempDB and use this information to ensure your TempDB files are sized appropriately.

The T-SQL query that will collect data

Instances to collect from

Select all

Databases to collect from

TempDB

Collection frequency

600

Note: If you suspect that there may be an issue with TempDB, increase the collection frequency to every minute so you can analyze more data.

Use collected or calculated values

Leave the Use a calculated rate of change between collections check box unchecked

Metric collection

Enabled

Alert definition

An alert is not required