Databricks SQL Warehouse Cost Analysis
SQL Analysis covers Databricks SQL warehouses and SQL query history. It complements Clusters by focusing on warehouse-backed and serverless SQL workloads.
Overview
Section titled “Overview”Summary cards for cost, query count, average runtime, and error rate, plus trends for spend and activity.
By Principal
Section titled “By Principal”Groups SQL cost and query activity by user or service principal. Use this tab to identify owners of expensive or failing SQL workloads and to open principal detail pages.
Optimization
Section titled “Optimization”Highlights SQL efficiency problems such as cold-start waste, long-running queries, high error rates, and warehouses that may have inefficient auto-stop settings.
Queries
Section titled “Queries”A searchable query list with filters for source, status, warehouse, principal, and time range. Rows include runtime, cost, status, source, warehouse, and deep links where available.
Query detail page
Section titled “Query detail page”Open an individual query to review:
- Statement status and runtime.
- Cost estimate.
- Warehouse and principal.
- Source such as Job, Notebook, Dashboard, Alert, Genie, SQL Editor, or API.
- Databricks deep link when available.
Source breakdown
Section titled “Source breakdown”LakeSentry uses system.query.history to classify SQL activity by source. This helps distinguish dashboard refreshes, scheduled jobs, interactive SQL editor usage, and API-driven workloads.
Cost attribution
Section titled “Cost attribution”SQL warehouse cost may be attributed directly to a warehouse owner, to a mapped principal, or through session/query-duration signals when shared warehouse usage can be split fairly.