Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. On-demand vs capacity pricing

Snowflake, BigQuery & Databricks · BigQuery

On-demand vs capacity pricing

Mediumwarehouses-22
bigquerypricingon-demandeditionsstorage

Question

How does BigQuery pricing work, and when would you move from on-demand to editions?

Solution

BigQuery has two ways to pay for queries. On-demand charges for the bytes your queries read. Capacity pricing (editions) charges for the slots you use, in slot-hours, regardless of how much data is scanned. Storage is billed separately in both.

On-demand

You pay per TiB of data processed, and the first 1 TiB each month is free. The price is per byte read, so a query that scans 3 TiB costs the same whether it takes 5 seconds or 5 minutes. Cost control means reducing bytes: partition and cluster, select only needed columns, avoid scanning repeatedly. You can also set a maximum bytes billed on a query so a mistake fails instead of costing money. Check the pricing page for the current rate, as it changes.

Editions (capacity)

There are three editions, Standard, Enterprise and Enterprise Plus, which differ in features such as security controls, commitments and data governance. You pay for slot-hours, with autoscaling between a baseline and a maximum you set. You can add one- or three-year commitments for a discount. Cost then depends on how many slots run and for how long, and bytes scanned does not matter directly.

When to move from on-demand

  • Spend is high and fairly steady. If you consistently scan hundreds of TiB, a slot reservation may cost less than per-byte charges.
  • You want predictable cost or hard limits, and workload isolation between teams.
  • You need features only in editions.

On-demand remains better for sporadic or small workloads, because you pay nothing when nothing runs.

Test with data: the INFORMATION_SCHEMA.JOBS views show bytes billed and slot-ms per query, so you can estimate both models using your own workload before you commit.

Storage billing

Storage can be billed on logical bytes (uncompressed size) or physical bytes (compressed, including time travel and fail-safe storage). Tables that compress well can be much cheaper on the physical model. Active storage that has not been modified for 90 days becomes long-term storage at a lower rate.

Interview shortcut: on-demand pays for data read, editions pay for compute time, and the right choice depends on how big and how steady your workload is.

PreviousNext