BigQuery error · Resources and limits
Query exceeded limit for bytes billed
BigQuery estimated, before running the query, that it would bill more bytes than the job's maximum bytes billed setting allows, so it refused to start. Nothing is charged. Read fewer columns or partitions, or raise the limit to at least the number in the message.
The error message
Query exceeded limit for bytes billed: <limit_bytes>. <required_bytes> or higher required.
Causes
The query reads more data than the cap allows
Maximum bytes billed (maximumBytesBilled in the API, --maximum_bytes_billed in bq, Query settings > Advanced options in the console) is checked against the dry-run estimate before execution. SELECT * on a wide table or a missing partition filter is the usual reason the estimate is over the cap. This is the guardrail working as intended: the job stopped before it spent anything.
The 10 MB minimum per table
On-demand pricing bills at least 10 MB for every table a query references, so a cap below 10,485,760 bytes fails even on a tiny table. A message ending in 10485760 or higher required. means you hit the minimum, not a big scan. Each extra table in the query adds its own 10 MB.
Clustered tables are estimated as an upper bound
The estimate prunes partitions but not clusters. A query that filters on a cluster column can be estimated at the whole partition and fail, although it would have billed far fewer bytes after block pruning. The required number in the message is the estimate, not what the query would have cost.
A cap set for a different workload
Tools and client libraries often set a fixed cap for every job (for example a BI connector or a dbt profile with maximum_bytes_billed). A backfill or a new model that reads more than the usual daily data then fails with this error while ad hoc queries still work.
How to fix it
1. Select only the columns you need
On-demand bytes are counted per column read. Dropping unused columns is the fastest way under the cap, and LIMIT does not reduce bytes billed. See SELECT * queries to find where this habit costs the most.
-- Estimated over the cap:
-- SELECT * FROM `project.dataset.orders` LIMIT 100;
SELECT order_id, customer_id, amount
FROM `project.dataset.orders`
WHERE order_date >= '2026-11-01';2. Filter on the partitioning column with a constant
Partition pruning lowers the estimate itself, so it is the filter that gets a query under the cap. Compare the partitioning column to a literal, a parameter or a script variable. A value computed by a subquery over another table doesn't prune.
SELECT event_name, COUNT(*) AS events
FROM `project.dataset.events`
WHERE event_date BETWEEN '2026-11-16' AND '2026-11-22'
GROUP BY event_name;3. Check the estimate with a free dry run
Run bq query --dry_run --use_legacy_sql=false '...' or look at the console's query validator, which shows the bytes the query would process. Dry runs are free and use the same estimate as the cap.
4. Raise the limit on purpose
If the scan is expected, set the cap to at least <required_bytes> for this job only: --maximum_bytes_billed=<bytes> in bq or maximum_bytes_billed in the job config of your client or dbt profile. Keep the lower default for everyone else.
How to prevent it
- Set maximum bytes billed in every scheduled query, BI connector and dbt profile on on-demand projects. A failed job costs nothing on-demand, a runaway scan costs $6.25 per TiB.
- Add
require_partition_filter = TRUEto large partitioned tables so queries without a partition filter fail at analysis instead of scanning every partition. - Review the most expensive queries each week and give their owners a cap sized to the expected scan.
FAQ
Am I charged when a query hits maximum bytes billed?
No. BigQuery checks the estimate before execution and fails the job without incurring a charge, so no slots run and no bytes are billed.
Why does it say 10485760 or higher required for a small table?
On-demand pricing bills a minimum of 10 MB (10,485,760 bytes) per referenced table, and the check uses the billed amount, not the bytes actually read. Set the cap above 10 MB times the number of tables in the query.
Does LIMIT help me stay under maximum bytes billed?
No. LIMIT reduces the rows returned, not the columns and partitions read, so the estimate stays the same. Select fewer columns or filter on the partitioning column instead.
Is maximum bytes billed useful with editions (slot) pricing?
Google documents it as a guardrail for the on-demand model, where you pay per byte. With editions you pay for slot time, so reservations, autoscaling limits and job timeouts are the controls that cap spend. See Data FinOps for how the two models are governed.
Related
SQL reference
More resources and limits
All BigQuery error messages · What 50M daily events say about BigQuery failures
