Skip to content
BuyCloudAccess
14 platforms, every price listed Get support

Cloud Guides

BigQuery Cost Control: Why Your Query Bill Surprised You

BigQuery is the strongest reason to choose Google Cloud for analytics, and the most common source of unexpected spend on it. The reason is a pricing model that does not behave like a database you have run before.

You pay for bytes scanned

Under on-demand pricing, cost is driven by the volume of data your query reads, not by execution time or result size. A query returning ten rows can read a terabyte and be billed accordingly.

Two consequences follow immediately:

  • SELECT * is expensive. BigQuery is columnar, so selecting only the columns you need reduces bytes scanned proportionally.
  • LIMIT does not reduce cost. It limits what is returned, not what is read.

Partitioning is the biggest lever

Partition tables by a date or timestamp column. Queries that filter on the partition column then read only the relevant partitions rather than the whole table. On a large event table this routinely cuts scanned bytes by an order of magnitude.

Enable the requirement for a partition filter on large tables so an unfiltered query fails rather than quietly costing money.

Clustering

Clustering sorts data within partitions by columns you filter or aggregate on frequently. It reduces scanned bytes further for selective queries and costs nothing extra to maintain.

Practical controls

  • Dry run every new query. The console and the API both report bytes that will be processed before you run it.
  • Set maximum bytes billed on a query or job so an accidental full scan fails instead of billing.
  • Use custom quotas per project or user to cap daily query volume.
  • Materialise repeated aggregations rather than recomputing them across raw data on every dashboard load.
  • Watch scheduled queries and BI tools. A dashboard refreshing every five minutes against a raw table is a standing charge.

On-demand versus capacity pricing

On-demand bills per byte scanned and needs no planning. Capacity pricing reserves processing slots for a flat rate, which becomes cheaper once your query volume is both high and predictable. Start on-demand, measure for a month, then decide. Note that this is a billing decision, not a quota one: see quotas vs credits.

Storage is the cheap part

BigQuery storage is inexpensive, and long-term storage rates apply automatically to partitions untouched for an extended period. There is rarely a good reason to delete history for cost alone. Query patterns, not retention, are where the money is.

How this affects platform choice

If analytics is central to your product, BigQuery is a strong reason to prefer Google Cloud over the alternatives, because the equivalent stack elsewhere is more assembly. See AWS vs Google Cloud. Credit-backed Google Cloud accounts stretch further on this kind of workload precisely because there is no idle cluster to pay for.

Common questions

Does LIMIT reduce my bill?

No. It limits returned rows, not scanned bytes.

Are query results cached?

Identical queries against unchanged tables can serve from cache at no query cost. Any change to the underlying data invalidates it.

What is the single highest-impact change?

Partition large tables by date and require a partition filter. Nothing else comes close.

Related reading

All articles

Browse the marketplace

Accounts across fourteen cloud and workspace platforms, with every configuration and price listed.

Compare
Compare now
Chat with us
Telegram
Scroll to Top