Query history

Preview

This feature is in Public Preview.

The query history shows SQL queries performed using SQL endpoints.

You can use the information available through this screen to help you debug issues with queries.

This section describes how to work with query history using the UI. To work with query history using the API, see Query History API.

View query history

To view query history, do one of the following:

  • Click History Icon Query History in the sidebar.
  • Click Endpoints Icon SQL Endpoints in the sidebar. In the Actions column, click the vertical ellipsis Vertical Ellipsis and select History.

You can filter the list by user, date range, endpoint type, and query status.

Query history

View query time

To display a visual indication of the time spent in compilation, execution, and result fetching for a query, hover over the bar in the Duration column.

Query time

View query details

  1. View query history.

  2. Click a string in the Query column to display query details:

    Query history details
  3. If a command generates a query plan, in the Details field click the Open link to display the plan. The Open link is available only for queries executed on endpoints you have Can Manage permission for.

    Query plan

Terminate an executing query

To terminate a long-running query started by you or another user:

  1. View query history.

  2. Click a string in the Query column to display query details:

    Query history details
  3. Next to Status, click Cancel.

The query is terminated and its status changes to Canceled.

View query metrics

  1. View query history.

  2. Click a string in the Query column to display query details.

  3. Click the Execution Details tab to display query metrics.

    Query metrics