BIGQUERY QUERY COST ADVISOR · RUNS IN YOUR BROWSER

Why is your BigQuery bill so high?

Paste one row per recurring query group — runs per month, GB billed per run, slot-hours per run — and see on-demand vs Editions cost, the group that dominates, single runs worth a --maximum_bytes_billed cap and repeat large scans that partitioning or a materialized view would remove.

Nothing is uploaded and Google Cloud is never contacted. The text box is analysed in this browser and never leaves your device. The Editions figure is a floor: autoscaling granularity and idle slots are not modelled.

1. Paste your query groups

Prefer a CLI, or want a CI check?

Same logic, zero dependencies, one command — reads a file or stdin:

node cli.mjs analyze queries.csv
cat queries.csv | node cli.mjs analyze -
node cli.mjs analyze queries.csv --guardrail-usd 2 --fail-on warn   # exit 1 on any warning
node cli.mjs analyze queries.csv --json --prices my-prices.json

Get cli.mjs and engine.mjs — Node 18+, nothing to install, no network call. More: BigQuery on-demand vs Editions: which is cheaper.

What's recognised

InputHandling

Prices are illustrative and dated; edit them with --prices in the CLI. Other regions, storage, streaming inserts, BI Engine and commitments are not modelled.

Common questions

Does this connect to my Google Cloud project?

No. It reads the rows you paste and never contacts Google. It cannot see your real invoice, discounts or commitments, so every dollar figure is the rows you pasted times list prices you can edit.

How do I get the numbers?

Query INFORMATION_SCHEMA.JOBS_BY_PROJECT for the last 30 days, grouped by a label, user or query hash: COUNT(*) for runs, AVG(total_bytes_billed)/1e9 for GB billed per run and AVG(total_slot_ms)/3600000 for slot-hours per run. Slot hours are optional; without them Editions is not compared.

On-demand or Editions: which is cheaper?

On-demand bills bytes scanned, $6.25 per TiB after the first free TiB each month. Editions bills slot-hours, $0.04 to $0.06 each pay-as-you-go. Scan-heavy, compute-light queries favour Editions; compute-heavy queries over small tables favour on-demand. The tool compares your own rows, and treats the Editions figure as a floor because autoscaling bills in 50-slot steps with a one-minute minimum.

What does maximum_bytes_billed do?

A query run with a maximum bytes billed setting fails without charge if it would bill more than that many bytes. The tool suggests a cap 25% above an expensive query's usual size so a bad edit cannot cost much more than the normal run.

Is my data uploaded anywhere?

No. The browser page analyses the text in your own browser and never sends it anywhere. The CLI reads a local file or stdin and makes no network call.