Warehouse cost monitor
What the queries cost, and which ones are responsible.
Data Warehouse → Cost Monitor shows what AccelerUp's own querying costs the warehouse.
What is tracked
| Queries per period | Total, and by source |
| Duration | Total and per query |
| Rows scanned | Where the warehouse reports it |
| By source | Alert, dashboard, scheduled query, SQL Lab, report |
The usual findings
A dashboard refreshing too often. Twelve tiles at a one-minute refresh is 17,280 queries a day, for data that changes hourly.
An alert running more often than its data changes. A rule evaluating every five minutes against a table loaded nightly is 287 wasted executions a day. Fix it with a run window, which stops the query being run at all outside the window.
One expensive query. Usually a missing WHERE on a partition column. It is
easy to spot here and invisible everywhere else.
Reducing it
| Do | Instead of |
|---|---|
| A run window matching the data's load schedule | Evaluating around the clock |
| An interval matching how fast the data changes | A default five minutes |
| Aggregating in the query | Returning rows AccelerUp then aggregates |
| One query with several conditions | Several rules holding copies of the same SQL |
The last is worth emphasising: per-column conditions exist precisely so that alerting on four columns runs the query once. See SQL alerts.
Related
- Cloud spend — infrastructure cost across providers
Where this behaviour lives: frontend/src/app/dwh/cost/. If the code and this page disagree, the code is right — please fix the page.
Part of Data warehouse — Querying the warehouse, and alerting on what the query returns.