SSSamarth Sinha

Note

BigQuery cost and performance: the levers that actually matter

Partitioning, clustering, the on-demand vs Editions decision, and the query habits that decide most of the bill.

Nov 2026 · 1 min read

  • BigQuery
  • FinOps
  • Google Cloud
Where a BigQuery bill comes from Queries to Partition pruning. Queries to Clustering. Queries to Materialised views. Partition pruning to Bytes scanned. Clustering to Bytes scanned. Materialised views to Bytes scanned. Bytes scanned to Editions slots. Bytes scanned to On-demand. Editions slots to Monthly bill. On-demand to Monthly bill. Queries analysts, BI, agents Partition pruning filter on the partition Clustering skips non-matching blocks Materialised views pre-aggregated reads Bytes scanned what on-demand bills Editions slots reserved capacity On-demand per TiB scanned Monthly bill attributed per team
IllustrativeWhere a BigQuery bill comes fromScroll →

Why it matters

BigQuery separates storage from compute, so cost follows two things: how much data each query reads, and how you pay for compute. Most surprises come from a few habits, not from the platform.

The levers

  1. Partition the big tables by ingestion or event date, and require a partition filter on tables that are queried by date. Queries that filter on the partition column read only the partitions they need.
  2. Cluster on the columns you filter and join by. Clustering sorts storage blocks so BigQuery can skip the ones that can't match.
  3. **Stop SELECT *.** BigQuery is columnar: every extra column is extra bytes read. Use table previews to look at data.
  4. Pre-aggregate hot paths. Materialised views and summary tables turn repeated heavy scans into small reads.
  5. Choose the pricing model per workload. On-demand bills per byte scanned; capacity pricing (BigQuery Editions) bills for slots. Spiky, light usage often suits on-demand; steady, heavy workloads often suit reserved slots with autoscaling. Model both on real usage before committing.
  6. Attribute cost. Label jobs and datasets by team and report cost per team from the jobs metadata. What gets attributed gets fixed.

Guardrails worth adding

  • Custom quotas on bytes scanned per user or project per day.
  • maximum_bytes_billed on scheduled queries and BI connections.
  • A weekly look at the most expensive queries, owned by the teams that ran them.

When AI agents start querying

Agents and chat interfaces can fire many queries at once. Put them behind views that enforce partition filters, cap bytes billed, and log every query with the identity the agent acted for, so the cost lands on the right team.