At a glance
SQL Query Latency p95 (ms) is the 95th-percentile completion time for SQL statements on your Databricks SQL warehouses: 95% of queries finish faster than this, 5% take longer. For a lakehouse this is the number your dashboards and downstream consumers actually feel, because the slow tail is where timeouts, abandoned BI refreshes, and stalled checkout-analytics joins live. Lakehouse SQL p95 is typically measured in seconds rather than milliseconds; the alert threshold (5000ms) reflects a busy warehouse workload, not a single trivial query.
Calculation
Vortex IQ reads completed statements from your Databricks SQL warehouse query history over the rolling 5-minute window and computes the 95th percentile of total query duration. “Total duration” is the full wall-clock time from submission to result availability, which includes queue wait, compilation/planning, photon/execution time, and result fetch. It is not execution time alone, so a query that ran for 800ms but waited 6 seconds in a saturated queue counts as roughly 6.8 seconds toward the percentile. Because it is the 95th percentile, the value answers “how slow is a bad-but-not-worst-case query right now?”. It deliberately ignores the absolute worst 5% (those belong to SQL Query Latency p99 (ms)) and ignores the median (that is SQL Query Latency p50 (ms)). The card reports the value in milliseconds for consistency across the Performance category; a reading of 4,200 means 4.2 seconds.Worked example
A retail analytics team runs aServerless Medium SQL warehouse backing both the executive Tableau dashboard and a Delta table that feeds the storefront’s “recommended for you” widget. Snapshot taken on 14 Apr 26 at 09:35 BST, just as the morning dashboard-refresh wave hits.
The headline p95 card turns red because 6.3 seconds breaches the 5-second threshold. The p50 is healthy at 480ms, which is the key diagnostic clue: the typical query is still fast, so this is a tail problem driven by queueing, not a warehouse-wide collapse. Reading the panel together:
- Saturation at 88% plus 14 queued queries explains the tail. During the 09:30 refresh wave, more queries arrive than the warehouse has slots for. Fast queries that land in an empty slot stay near 480ms (keeping p50 low), but queries that arrive during the burst wait several seconds before execution, inflating p95.
- The business impact is concrete. The “recommended for you” widget query is in the slow 5%. When its total duration crosses ~5 seconds the storefront falls back to a generic placeholder, so a slow lakehouse tail is quietly degrading on-site personalisation during peak browsing.
- The fix is right-sizing, not query rewriting. Because p50 is fine, rewriting individual queries will not help much. The lever is concurrency: enable or raise multi-cluster auto-scaling on the warehouse so the 09:30 burst spins up a second cluster, or move the storefront-feeding query to its own dedicated warehouse so dashboard traffic cannot queue behind it.
- Always read p95 next to p50. Low p50 with high p95 means a tail/queueing problem (scale concurrency). High p50 and high p95 means the whole warehouse is slow (scale size or fix table layout).
- p95 in seconds is normal for a lakehouse. Unlike a row-store OLTP database, Databricks SQL handles scan-heavy analytical queries; a multi-second p95 is acceptable for heavy aggregations. Tune the Alert threshold to your real workload rather than expecting sub-second tails.
- Pair p95 with saturation to choose the lever. Saturation high equals scale concurrency; saturation low but p95 high equals optimise table layout (run OPTIMIZE / Z-ORDER, check file sizes).
Sibling cards
Reconciling against the source
Where to look in Databricks:
Query History in the Databricks SQL workspace, filtered to the same warehouse and time range, sorted by duration descending, gives you the slow tail to inspect directly.
system.query.history (Unity Catalog system tables) is the system-table source; compute the percentile yourself to match the card exactly.
Warehouse monitoring on the warehouse’s own page shows the live queue depth and running-cluster count that explain a tail spike.
To match the card precisely, query the system table over the same window:
Cross-connector reconciliation: