The same query, over and over, uncached
Repetition is where BigQuery bills add up. A $2 query on a 15-minute schedule is $5,760 a year.
What it is
Query cost is per execution. The expensive queries in most estates are not the huge ad-hoc ones — they are moderate queries on aggressive schedules, often refreshing dashboards nobody is watching.
Why it costs money
- BigQuery caches results for 24 hours, but the cache is invalidated by any change to the underlying table — so a streaming table never benefits.
- Non-deterministic functions in the query text (CURRENT_TIMESTAMP(), RAND()) defeat the cache entirely, and BI tools add them routinely.
- Nobody reviews schedule frequency after it is set.
Worked example
Expensive
-- A dashboard tile refreshing every 5 minutes, 24/7The arithmetic. A query billing 30 GiB ($0.18) refreshed every 5 minutes is 288 runs a day — $53/day, $19,000 a year, for a tile most people look at twice a week.
How to fix it
- 1Find the repeats first — the query pack has a recipe that groups jobs by normalised shape.
- 2Lengthen refresh intervals to match how fast the data actually changes.
- 3Materialize the expensive intermediate: a materialized view refreshes incrementally and serves many readers from one computation.
No single query reveals this one. It shows up across job history instead — the query pack has recipes that find it.
Fixing one query is satisfying. Fixing the pattern is the win.
Finitizer finds every instance of this across your BigQuery job history, ranks them by what they actually cost, and keeps checking after you have fixed them.