The Query Monitor view allows you to view detailed information for active queries running on the Greenplum Database system. Users with Admin or Operator permission can see and cancel all users’ queries.
Data is collected on currently running queries and the query monitor metrics are updated every 15 seconds. The time of the last update and a graphical timer showing the time remaining before the next update are displayed at the top of the page.
With the information available in this view, Greenplum Database administrators can easily:
- Understand how the system is being used — both in real-time and trending over time.
- Identify and diagnose problem queries while they are running, detect skew, find runaway queries, and so on.
- Review and balance the query load on the system by better optimizing and scheduling the query load.
- Cancel queries that disrupt system performance.
The Query Monitor table displays the following columns for queries.
An identification string for the query. In the Console, this looks like “1295397846-56415-2”. Command Center generates this ID by combining the query record’s
The status of the query. This can be one of the following:
The Greenplum Database user who submitted the query.
The name of the database that was queried.
The time the query was submitted to the query planner.
The amount of time the query has been (or was) in queue awaiting execution.
The amount of time since execution began.
(Active queries only.) Current CPU percent average for all processes executing this query. The percentages for all processes running on each segment are averaged, and then the average of all those values is calculated to render this metric. Current CPU percent average is always zero in historical and tail data.
The amount of CPU skew. CPU skew occurs when query executor processes for one segment use a disproportionate amount of CPU compared to processes for other segments executing the query. This value is the coefficient of variation for the CPU used by processes running this query on each segment, multiplied by 100. For example, a value of .95 is shown as 95.
A measure of row skew in the system. Row skew occurs when one segment produces a disproportionate number of rows for a query. This value is the coefficient of variation for the Rows Out metric of all iterators across all segments for this query, multiplied by 100. For example, a value of .95 is shown as 95.
The name of the resource queue for the query.
Each query inherits the priority assigned to its resource queue.
For more information about Resource Queues and Query Plans, refer to the Greenplum Database Administrator Guide.
- Queued: the query has not yet started to execute
- Running: execution has started, is not yet complete
- Done: completed successfully
- Cancelling: cancel request sent, cancel pending
- Cancelled: terminated, no longer running
Using the Query Monitor Controls
Click a column heading to sort the rows on that column in ascending or descending order.
Click the checkbox at the left of a row to choose a query to cancel or export. Click the checkbox in the heading row to choose all queries.
Click Cancel Query to cancel selected queries.
Click Export to download a comma-separated values (CSV) text file containing rows for the selected queries. When no queries are selected, all rows are exported. The default file name is
Click any query ID to see the Query Details, including metrics, the text of the query, and the query plan.