Query details #

The query details give you more information about the processing and execution of a specific query.

There are two ways to access query details:

  • Query editor: After a query finishes running, click Query details.
  • Query history: Select the query ID for a specific query from the list.

Query details include the Query overview, Query ID, and the status. You can explore additional information that is divided into two tabs, General and Advanced.

Query details page, the general and advanced tabs

General tab #

The General tab displays information for successful and failed queries.

A successful query shows the query text, basic information, and query execution details.

A failed query shows the query text and query execution details. It also shows additional details in basic information and a failure log sections.

Query details page, the general tab

Query text #

The query text shows you the full SQL statement of the query. The query text pane has the following shortcuts:

  • : Edit in the query editor
  • : Copy to clipboard for efficient transfer to other IDE or BI tools
  • : Opens a full screen to view the query text

Alternatively, click the text box to open a full screen view of the query text.

Query details page, query text pane

Basic information #

The detailed information for successful or canceled queries includes:

  • Role: The role used by the user when submitting the query.
  • Client: Information about the client application submitting the query.
  • CPU time: Total CPU time across all workers and tasks in milliseconds used for query processing.
  • Cluster: The cluster used to run the query.
  • Client address: Address of the client that submitted the query.
  • Elapsed time: The elapsed time for processing the query in milliseconds.

Canceled queries display the following status Failed - canceled by user.

When queries fail for other reasons, the basic information expands to include the following details:

  • Error type: The classification of an error. The most common error types are User Canceled and User Error:
    • User Canceled: The query was stopped by the user.
    • User Error: The SQL query statement submitted by the user contained a syntactic or semantic error.
  • Error name: The name of the error, such as syntax error.
    • Syntax error: A user error indicating that the query submitted by the user contains a syntactic or semantic error.

Query details for a failed query:

Query details page, basic information pane

Query execution #

The Query execution diagram displays performance and timing data about the different stages during query processing.

Query status #

The query execution diagram includes the following statuses:

  • Analyzing: The SQL query text is verified and analyzed against metadata from the data sources and SQL semantics. Displays the time spent in milliseconds.
  • Cancelled: The query was successfully cancelled.
  • Executing: The query is executing and has at least one running task.
  • Failed: Query execution has failed.
  • Finishing: The query is finishing, for example when performing the final commit for auto-commit queries.
  • Finished: The query processing has completed and all output was consumed.
  • Planning: The query execution plan is created and optimized with the help of metadata, including table statistics. Displays the time spent in milliseconds.
  • Queuing: Query processing is on hold, waiting for the other queries to be processed. Displays the time spent in milliseconds.
  • Starting: The query execution is starting.
  • Waiting for resources: Query processing is on hold, waiting for resources to process the query. The value can include analysis time. Displays the time spent in milliseconds.

The Query execution diagram shows the query plan steps:

Query details page, query execution pane that shows the query status history

Failure log #

If a query fails, you can review the failure log for additional details. Click to copy the failure log to your clipboard. This allows you paste the text to an IDE, BI tool, email or any other system for further analysis.

Query details page, scroll to view failure log

Advanced tab #

The Advanced tab shows information about the accessed tables, query plan, and execution details.

Query details page, the advanced tab

Note: If your query was cancelled or failed, the advanced tab generally has nothing to display and is empty. Some cancelled queries may show the information that was in progress before the cancellation.

Tables #

The tables pane displays statistics about the tables accessed by the SQL query.

  • Catalog: Name of the catalog that contains the table in this row.
  • Schema: Name of the schema that contains the table in this row.
  • Table: Name of the table accessed by the SQL query.
  • Rows: The number of rows processed from the table.
  • Bytes: The number of bytes processed from the table.
  • Read/Write: The operation type for the data.

Click one of the header options to sort the table.

Query details page, tables pane

Query plan #

The distributed execution plan includes a full explain plan of the submitted query, including costs for each stage. It is identical to the output from EXPLAIN ANALYZE <query>.

Click the Query plan field to see more information, or use the following shortcuts:

  • : Copy to clipboard for efficient transfer to other IDE or BI tools.
  • : Opens a full screen to view the explain plan.

Alternatively, click the text box to open a full screen view of the explain plan.

Query details page, query plan pane

Execution details #

Execution details provide statistical data about the query processing.

The execution details include the following metrics:

  • Elapsed time: The amount of time in milliseconds it took the query to execute.
  • CPU time: Total accumulated CPU time in milliseconds across workers and threads.
  • Parallelism: Estimated value of how much the workload was processed in parallel, calculated from CPU time divided by the Elapsed time.
  • Active: Estimated value of how efficient processing was performed, calculated from CPU time divided by the time spent waiting as scheduled.
  • Rows read: Total number of rows read from the data sources.
  • Bytes read: Total number of bytes read from the data sources.
  • Rows written: Total number of written rows.
  • Bytes written: Total Number of written bytes.
  • Peak memory: Maximum amount of memory directly tied to query resources used by a query at one time.

Hold the pointer over tooltip to review each definition for executions details.

Query details page, execution details pane