Skip to main content

Monitor a SQL warehouse

This page describes how to monitor a SQL warehouse using the Databricks UI.

View SQL warehouse monitoring metrics

To monitor a SQL warehouse, click the name of a SQL warehouse and then the Monitoring tab. On the Monitoring tab, you see the following monitoring elements:

Screenshot with numbered annotations to denote the defined parts of the page that follow.

  1. Live statistics: Live statistics appear near the top of the page. From left to right, they indicate the warehouse status, the number of running queries, the number of queued queries, and the warehouse's current cluster count.

  2. Time scale filter: The time scale filter sets the time range for the query count chart, running cluster chart, and query history. The default time range is 8 hours, but you can use the Lightning bolt icon lightning bolt icon to select a period of 24 hours, 7 days, or 14 days. You can also set a custom period using the calendar or by clicking and dragging on the bar chart.

  3. Peak query count chart: This chart shows the warehouse's maximum number of concurrent queries, both running and queued, during the selected time frame. The data that supplies this chart does not include metadata queries. Each data point represents the peak in a 5-minute window.

  4. Completed query count chart: This chart shows the number of queries completed in the selected time frame, including canceled and failed queries. Queries appear on the chart upon completion, with counts averaged per minute.

  5. Running clusters chart: This chart shows the number of clusters allocated to the warehouse during the selected time frame. During a cluster recycle, this count might temporarily exceed the configured maximum.

  6. Query history table: This table lists all queries active in the selected time frame. Columns show the following details:

    • Query: Click the arrow to preview the query text. Click Expand query text to see more.
    • Query start time: Shows when the query started running.
    • Duration: Hover over the duration to see the duration broken down by scheduling and running times.
    • Fetch time (Beta): When a query is actively fetching, no time is shown. When a fetch is complete, the time shows in the table.
    • Query source: Shows the originating source, such as pipeline, Genie space, or dashboard, where the query run is initiated.
    • User that ran the query: Shows the name of the user who ran the query.

    You can filter the queries by user, duration, status, and statement type.

note

The cluster count can be greater than one only if scaling is enabled and configured.

Monitor long fetch times

Beta

This feature is in Beta.

SQL warehouses remain active when queries are running or fetching results. Most queries return results within seconds, but some can take longer, sometimes up to several minutes, due to large result sets or client-side behavior such as delayed fetching or queries that are not closed properly. Without understanding which queries have finished executing and those still fetching results, it may be unclear why a warehouse or cluster remains active when no queries appear to be running.

To view queries that are fetching:

  1. Click Search icon. the search icon next to Clusters. A panel that identifies queries on the cluster in a fetch state appears over the query history table.
  2. Click Exit to return to the query history panel.

To stop queries in the fetching state:

  • Click the query to open the Query Profile panel.
  • Click Stop to the right of Result fetching by client.