BigQuery on-demand vs Editions: which costs less for your queries
On-demand BigQuery bills the bytes a query reads, and Editions bills slots for the seconds they run.
Work that reads a lot of data with little computing can cost much less on an Editions reservation.
Run read-only queries in your own console and paste the results. The report is worked out in your browser, with no access to your account.
What the check looks at
Bytes billed and slot use for on-demand jobs, minute by minute over 30 days, from INFORMATION_SCHEMA.JOBS_TIMELINE.
Why it costs money
- On-demand charges a price per TiB read, whatever the query does with it.
- Editions autoscaling charges a price per slot-hour, added in steps of 50 slots and billed for at least 60 seconds each time unless fluid scaling is on.
- So the cheaper model depends on how much each query reads for each slot-second it uses, and how bursty the work is.
How the tool measures it
Priced. The report puts a monthly saving range on this check, from your own query results at your price.
The report bills each minute of your history at its busiest second, rounded up to 50 slots, for the cautious end, and per second in steps of 50 for the favorable end, at the edition's pay-as-you-go price. It compares that with your on-demand bytes at list price less the 1 free TiB a month. Standard is suggested up to 1,600 slots, otherwise Enterprise.
When the report raises it. Query 1 shows on-demand bytes, and Editions would save at least $5 a month at the favorable end.
In the sample report
Test Standard edition autoscaling for your on-demand queries
- On-demand queries billed 1,303 TiB a month, $8,138 at list price, peaking near 608 slots.
$2,190 to $3,549 a month, modeled.
From the tool's own on-demand sample: made-up results for one project over 30 days, at US multi-region list prices. The SQL above is for the US multi-region at project scope; the tool writes it for any location.
What to do
- 1Create a pay-as-you-go autoscaling reservation with no baseline on one project, with max slots near the figure in the report.
- 2Assign that one project and leave the rest on on-demand.
How to tell it worked. Run it for two weeks and compare period_autoscale_slot_seconds in INFORMATION_SCHEMA.RESERVATIONS_TIMELINE with the estimate before moving anything else.
Trade-offs. Autoscaled slots are not guaranteed, and queries slow down at max slots. A project on a reservation gives up its free on-demand allowance. Standard edition has no BI Engine, no commitments and no search indexes, and can query but not create materialized views.
The read-only query behind it
The same SQL the tool gives you. Each reads usage views and changes nothing.
Query 1: compute, by hour and minute
-- Finitizer BigQuery Cost Check, query 1 of 3: compute, hourly totals only.
-- Returns no query text, no table names and no user identities.
-- Window: the last 30 complete UTC days.
-- Slot time is booked to the second it was used (JOBS_TIMELINE). Bytes and job
-- counts are booked to the hour each job was created (JOBS). Script parents are
-- left out because their child jobs are counted. Run it unchanged.
WITH seconds AS (
SELECT
period_start,
SUM(period_slot_ms) AS slot_ms,
SUM(IF(reservation_id IS NOT NULL, period_slot_ms, 0)) AS reserved_slot_ms,
SUM(IF(reservation_id IS NOT NULL AND edition = 'STANDARD', period_slot_ms, 0))
AS reserved_standard_slot_ms,
SUM(IF(reservation_id IS NOT NULL AND edition = 'ENTERPRISE', period_slot_ms, 0))
AS reserved_enterprise_slot_ms,
SUM(IF(reservation_id IS NOT NULL AND edition = 'ENTERPRISE_PLUS', period_slot_ms, 0))
AS reserved_enterprise_plus_slot_ms,
SUM(IF(reservation_id IS NULL, period_slot_ms, 0)) AS on_demand_slot_ms
FROM `region-us`.INFORMATION_SCHEMA.JOBS_TIMELINE_BY_PROJECT
WHERE job_creation_time >= TIMESTAMP_SUB(TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY), INTERVAL 31 DAY)
AND job_creation_time < TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY)
AND period_start >= TIMESTAMP_SUB(TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY), INTERVAL 30 DAY)
AND period_start < TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY)
AND job_type = 'QUERY'
AND (statement_type != 'SCRIPT' OR statement_type IS NULL)
GROUP BY period_start
),
minutes AS (
-- The slots autoscaling would bill for on-demand work: rounded up to 50, and
-- held for the whole minute at that minute's busiest second, or per second
-- with fluid scaling. A model of the bill, not the bill.
SELECT
TIMESTAMP_TRUNC(period_start, MINUTE) AS minute,
MAX(CEIL(on_demand_slot_ms / 1000 / 50) * 50) AS minute_slots,
SUM(CEIL(on_demand_slot_ms / 1000 / 50) * 50) AS fluid_slot_seconds,
MAX(on_demand_slot_ms / 1000) AS peak_slots
FROM seconds
GROUP BY minute
),
on_demand_shape AS (
SELECT
TIMESTAMP_TRUNC(minute, HOUR) AS hour,
SUM(minute_slots) * 60000 AS on_demand_autoscale_slot_ms,
SUM(fluid_slot_seconds) * 1000 AS on_demand_fluid_slot_ms,
MAX(peak_slots) AS peak_on_demand_slots
FROM minutes
GROUP BY hour
),
slot_time AS (
SELECT
TIMESTAMP_TRUNC(period_start, HOUR) AS hour,
SUM(slot_ms) AS slot_ms,
SUM(reserved_slot_ms) AS reserved_slot_ms,
SUM(reserved_standard_slot_ms) AS reserved_standard_slot_ms,
SUM(reserved_enterprise_slot_ms) AS reserved_enterprise_slot_ms,
SUM(reserved_enterprise_plus_slot_ms) AS reserved_enterprise_plus_slot_ms
FROM seconds
GROUP BY hour
),
job_totals AS (
SELECT
TIMESTAMP_TRUNC(creation_time, HOUR) AS hour,
COUNT(*) AS jobs,
COUNTIF(cache_hit) AS cached_jobs,
COUNTIF(error_result IS NOT NULL) AS failed_jobs,
COUNTIF(state != 'DONE') AS unfinished_jobs,
COUNTIF(state = 'DONE' AND error_result IS NULL AND reservation_id IS NULL
AND total_bytes_billed IS NULL AND cache_hit IS NOT TRUE) AS jobs_missing_bytes,
COUNTIF(statement_type = 'CREATE_MODEL') AS model_jobs,
SUM(total_bytes_billed) AS bytes_billed,
SUM(total_bytes_processed) AS bytes_processed,
COUNTIF(reservation_id IS NOT NULL) AS reserved_jobs,
SUM(IF(reservation_id IS NULL, total_bytes_billed, 0)) AS on_demand_bytes_billed
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE creation_time >= TIMESTAMP_SUB(TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY), INTERVAL 30 DAY)
AND creation_time < TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY)
AND job_type = 'QUERY'
AND (statement_type != 'SCRIPT' OR statement_type IS NULL)
GROUP BY hour
)
SELECT
COALESCE(j.hour, s.hour) AS hour,
IFNULL(j.jobs, 0) AS jobs,
IFNULL(j.cached_jobs, 0) AS cached_jobs,
IFNULL(j.failed_jobs, 0) AS failed_jobs,
IFNULL(j.unfinished_jobs, 0) AS unfinished_jobs,
IFNULL(j.jobs_missing_bytes, 0) AS jobs_missing_bytes,
IFNULL(j.model_jobs, 0) AS model_jobs,
IFNULL(j.bytes_billed, 0) AS bytes_billed,
IFNULL(j.bytes_processed, 0) AS bytes_processed,
IFNULL(j.on_demand_bytes_billed, 0) AS on_demand_bytes_billed,
IFNULL(s.slot_ms, 0) AS slot_ms,
IFNULL(j.reserved_jobs, 0) AS reserved_jobs,
IFNULL(s.reserved_slot_ms, 0) AS reserved_slot_ms,
IFNULL(s.reserved_standard_slot_ms, 0) AS reserved_standard_slot_ms,
IFNULL(s.reserved_enterprise_slot_ms, 0) AS reserved_enterprise_slot_ms,
IFNULL(s.reserved_enterprise_plus_slot_ms, 0) AS reserved_enterprise_plus_slot_ms,
CAST(IFNULL(o.on_demand_autoscale_slot_ms, 0) AS INT64) AS on_demand_autoscale_slot_ms,
CAST(IFNULL(o.on_demand_fluid_slot_ms, 0) AS INT64) AS on_demand_fluid_slot_ms,
ROUND(IFNULL(o.peak_on_demand_slots, 0), 1) AS peak_on_demand_slots,
COUNT(*) OVER () AS result_rows,
TIMESTAMP_SUB(TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY), INTERVAL 30 DAY) AS window_start,
TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY) AS window_end,
'us' AS location,
'project' AS scope,
'2026-11-07' AS query_version
FROM job_totals j
FULL OUTER JOIN slot_time s ON s.hour = j.hour
LEFT JOIN on_demand_shape o ON o.hour = COALESCE(j.hour, s.hour)
ORDER BY 1;Other checks in the report
- BigQuery repeated scans: queries that run every dayTo investigate
- BigQuery large scans: queries reading 100 GiB or moreTo investigate
- BigQuery physical storage billing: when it costs lessPriced
- BigQuery logical storage billing: when to move backPriced
- BigQuery time travel window: the cost on physical billingTo investigate
- BigQuery idle reservation capacity: slots billed, not usedTo investigate
- BigQuery storage billing model: when the report cannot tellTo investigate
What BigQuery charges in each location: BigQuery pricing in 2026.
Run this check every day, not once.
Finitizer reads your BigQuery job history and storage directly, raises these findings as they appear, and tracks each fix on the bill.
See how Finitizer works