HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

CPU Utilization by Long running Query

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
utilizationquerylongrunningcpu

Problem

Is there any way to find how much CPU is getting consumed by a query running for long time in Database?

Solution

There are several options because DB2 LUW has the older snapshot monitoring and a new monitoring facility integrated into the Workload Manager. Both facilities offer views and table functions to consume the data as well as tools on top.

For an easy way to start I would suggest to use db2top. Connect to a database and use, e.g., "D" to go to the Dynamic SQL screen. It shows Execution Time, CPU Time, Rows Read and Written, and some more information.

As an alternative take a look at the total_cpu_time monitoring element. There are functions and views listed in which that time is reported back.

Context

StackExchange Database Administrators Q#115604, answer score: 4

Revisions (0)

No revisions yet.