> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vortexiq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL Query Latency p50 (ms), Databricks

> SQL Query Latency p50 (ms) for Databricks lakehouses. Tracked live in Vortex IQ Nerve Centre. How to read it, why it matters, and how to act on it.

**Card class:** [Non-Hero](/nerve-centre/overview#card-classes-explained)  •  **Category:** [Performance](/nerve-centre/connectors#connectors-by-type)

## At a glance

> **SQL Query Latency p50 (ms)** is the median wall-clock time a SQL statement takes to complete on your Databricks SQL warehouses. Half of all queries finish faster than this number, half finish slower. It is the "typical day" reading for warehouse responsiveness: a stable p50 means routine dashboards and ad-hoc queries feel snappy, while a creeping p50 is the first sign that a warehouse is drifting toward saturation or that table layout has degraded.

|                    |                                                                                                                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **What it tracks** | SQL Query Latency p50 (ms) for the selected period: the 50th-percentile total duration of statements executed against your Databricks SQL warehouses, read from query history. |
| **Data source**    | Databricks SQL query history (`system.query.history` / Query History API), durations rolled up to the median over the window.                                                  |
| **Time window**    | `RT/5m` (real-time, evaluated over a rolling 5-minute window)                                                                                                                  |
| **Alert trigger**  | None set. p50 is a baseline/trend metric, not an alerting metric; the tail percentiles (p95, p99) carry the alert thresholds.                                                  |
| **Roles**          | owner, engineering                                                                                                                                                             |

## What it tracks

This card reports the median end-to-end duration of SQL statements run on your Databricks SQL warehouses over the trailing 5 minutes, refreshed in real time. Because it is the median rather than an average, a handful of very slow queries cannot drag it upward, which makes it the cleanest read on the experience of a typical query. Use it as your warehouse baseline: when p50 sits flat at a low value but [SQL Query Latency p95 (ms)](/nerve-centre/kpi-cards/databricks/sql-query-latency-p95-ms) and [SQL Query Latency p99 (ms)](/nerve-centre/kpi-cards/databricks/sql-query-latency-p99-ms) climb, the problem is a slow tail (a few heavy queries or skew), not a warehouse-wide slowdown. When p50 itself rises, the whole warehouse is under pressure: check [SQL Warehouse Saturation %](/nerve-centre/kpi-cards/databricks/sql-warehouse-saturation) and [Avg Cluster CPU Utilisation %](/nerve-centre/kpi-cards/databricks/avg-cluster-cpu-utilisation) for the cause.

## Reconciling against the source

To verify, open **Query History** in the Databricks SQL workspace and filter to the same warehouse and 5-minute window, or query `system.query.history` directly and compute `percentile(total_duration_ms, 0.5)`. Small differences are expected because the workspace UI and the system table can lag query completion by a few seconds and because Vortex IQ aligns the window to your reporting time zone.

***

### Tracked live in Vortex IQ Nerve Centre

*SQL Query Latency p50 (ms)* is one of hundreds of KPI pulses Vortex IQ tracks across Databricks and 70+ other ecommerce connectors. Nerve Centre runs the detection layer; Vortex Mind investigates the cause when something moves; Ask Viq lets you interrogate any number in plain English.

[Start for free](https://app.vortexiq.ai/login) or [book a demo](https://www.vortexiq.ai/contact-us) to see this metric running on your own data.
