Insights query details#

Click on a specific query ID in the Insights query overview pane to view Query details for that query.

The Query details pane displays general and advanced information about a specific query. Use the Back button to navigate back to the query history.


The General tab provides high-level information about the query processing.

Query text#

The Query text shows the SQL statement as submitted to the SEP cluster for processing. You can copy the text with the copy icon, or maximize the text area with the window icon. You can re-run the query in the Query editor by clicking the >_ icon.

Query details text area

Basic information#

The displayed metadata about the query processing includes the following information:

  • ID

  • User

  • Principal

  • User groups

  • Client

  • Client address

  • CPU time

  • Elapsed time

Query execution#

The Query execution diagram displays performance and timing data about query processing:

Query execution diagram

Cluster resources#

The Cluster resources tab provides information about the cluster load during the time when the query was queued and executing. Query execution times are influenced by the available resources (CPU, memory), and the number of concurrent queries. This tab provides you with the context necessary to interpret query execution data.

Query cluster resources

The charts included in this tab are similar to the ones on the cluster history pane. They additionally show the time range when the query ran as a highlighted area on the timeline.


The Stages tab shows details about query processing stages. A stage is the runtime incarnation of a plan fragment in a distributed query plan, and is identified by a stage number. The maximum number of stages in a query plan is defined by the query.max-stage-count configuration property.


This tab is for advanced users with a very good understanding of query processing. The following materials can help you begin to understand the necessary concepts:

The following information is included on this tab that applies to the query and its processing as a whole:

  • User: The user that is running the query.

  • Query state: Queued, planning, starting, running, blocked, finishing, finished, failed.

  • CPU time: Total CPU time used by this query, including the cumulative time used by all tasks. Can exceed wall time.

  • Elapsed time: The elapsed wall time for the query.

  • Active: The percentage of CPU time out of the total scheduled time, which includes both CPU time and waiting times. This metric estimates the query’s processing efficiency. Ideally, the value should be a high percentage. A low percentage indicates the query is spending a long time reading from storage.

Query status#

Query statuses are dependent on the statuses of its stages and tasks. Generally, queries start in the QUEUED state, and move on briefly to the PLANNING state. Queries may return to QUEUED state if they must briefly wait for resources. If the resources are not available fast enough, the time period depending on a myriad of configuration properties, it moves into a BLOCKED state. If at least one worker task is running and nothing is blocked, the query is in the RUNNING state.


The PLANNING stage should be very brief for most queries. If you notice that queries are spending more than a brief amount of time in the PLANNING stage consistently, your cluster may have insufficient resources.

Stages encompass all the tasks of the work described by the stage’s plan fragment. Stages can be in one of several states:

  • Planned: The coordinator created the query plan, and from that, the distributed query plan.

  • Scheduling: The coordinator is scheduling tasks across workers.

  • Scheduling splits: The coordinator is scheduling tasks on workers using the list of splits.

  • Scheduled: All workers have tasks, and the coordinator is waiting for the first task to start running.

  • Running: There is at least one running task.

  • Flushing: Stage has finished executing and output being consumed. At least one of the tasks is flushing and the non-flushing tasks are finished.

  • Finished: The query has finished executing and all output has been consumed.

  • Canceled: The query was canceled by the user.

  • Aborted: Stage was aborted by the coordinator.

  • Failed: Query execution failed.

Stage views#

Query stage information is rendered in two different views, List and Graph. Use the toggle in the upper right corner to switch between the two visualizations.

List view#

List view shows a list of stages and includes information about the associated tasks:

Query details Stages list view

The list view focuses on statistics about stages and their tasks. This view is useful for examining stage performance, and understanding if all nodes in the cluster perform well.

Several stage level statistics are shown:

  • State

  • CPU time

  • Active percentage

  • Input buffer

  • Number of tasks

Each stage can be expanded or collapsed with the chevron in its upper right corner. Expanding a stage reveals task level details. Stages can have multiple tasks, which have their own row with separate statistics and statuses in the stage panel. Tasks are assigned to workers to be executed in parallel. Comparing task statistics within the same stage can identify bottlenecks caused by slower nodes.

Tasks can be in one of the following states:

  • Planned: The plan has been created by the coordinator.

  • Running: The task is running.

  • Flushing: The task is flushing results after having been consumed.

  • Finished: The task is complete and its data passed on to the next split.

  • Canceled: The task was canceled by the coordinator due to a user action.

  • Aborted: The task was aborted by the worker or coordinator.

  • Failed: The task failed to execute.

The following per-task statistics are displayed:

  • Host: URI of the node processing the task

  • State: State of the task

  • Queued splits: Number of splits in the task not yet running. This value fluctuates as the task runs.

  • Running splits: Number of splits in the task not yet complete. This value fluctuates as the task runs.

  • Blocked splits: Number of blocked splits in the task. This value fluctuates as the task runs.

  • Completed splits: Number of completed splits in the task

  • Rows: Number of rows read or written by the task; the number increases as the task runs.

  • Rows per second: Rate at which rows are read or written by the task

  • Bytes: Number of bytes read or written by the task; the number increases as the task runs.

  • Bytes per second: Rate at which bytes are read or written by the task

  • Elapsed: Time elapsed wall time since the task creation time

  • CPU time: CPU time used by this task

  • Buffered: Amount of data waiting to be sent to the next processing stage (high values may indicate that the upstream stage is slow)

Graph view#

Graph (tree) view depicts stages and the way data flows between them in parent-child relationships:

Query details Stages graph view

Graph view is available only for queries for which the coordinator still has information in memory. How long query information is retained in memory depends on the query volume, as well as the query.max-history and query.min-expire-age configuration properties. The view provides a visualization of the distributed query plan and shows how plan fragments are mapped to stages. The visual representation is a tree, in which nodes represent stages and edges indicate how data is transferred between stages. A stage processes data produced by its children.

Each of the nodes shows stage level statistics, as well as a graphical representation of the corresponding plan fragment. A plan fragment is rendered as a tree of operators. Finally, statistics about the number of rows and total size of the data read from each child stage are also shown.


The Advanced tab provides lower level details about the query processing.

Query details Advanced tab


A list of all tables accessed by the query, including the following information:

  • Table

  • Schema

  • Catalog

  • Rows processed

  • Bytes processed

  • Read or write operation

Query plan#

The query plan used for processing the query on the cluster. It can be copied or maximized using the icons.

Execution details#

You can see the following timing and performance details about query processing on the cluster:

  • Elapsed time

  • CPU time

  • Parallelism

  • Active

  • Rows read

  • Bytes read

  • Rows written

  • Bytes written

  • Peak memory