SysPadLessons › analytics lessons › BigQuery

How BigQuery works

Google BigQuery - serverless data warehouse, a common analytics sink. On-demand pricing is per-TB scanned, so cost scales with query volume × data scanned per query.

BigQuery is a data warehouse with the servers hidden completely: no cluster to size, you just run SQL and Google throws thousands of machines at it. The twist that shapes how you use it is pricing, on demand, you pay by the bytes your query scans, so the columns you select and how you partition your data directly drive your bill.

What you will learn

A warehouse with no servers

BigQuery is fully serverless: there’s no cluster, node count, or warehouse to provision. You submit SQL and Google automatically allocates compute to execute it, scaling to the query. Storage and compute are separate, so you’re not paying for idle clusters.

Columnar + massively parallel

Data is stored columnar (so a query reads only the columns it needs), and execution fans out across thousands of workers (Google’s Dremel engine) that scan partitions of the data in parallel. That combination chews through huge tables in seconds.

Analytics on massive datasets, ad-hoc exploration, BI, and data warehousing on Google Cloud.

Pay by bytes scanned

With on-demand pricing, you’re charged by the volume of data a query scans, not by time. So SELECT * over a huge table is expensive, while selecting just the columns you need scans, and costs, far less.

Partitioning and clustering

Partitioning a table (e.g. by date) lets a query with a date filter scan only the relevant partitions, drastically cutting bytes read. Clustering sorts data within partitions so filters on clustered columns prune even more.

Flashcards

What does "serverless" mean for BigQuery?
No clusters to provision, submit SQL and Google allocates compute on demand; storage and compute are separate, so no idle-cluster cost.
Two reasons BigQuery queries huge tables fast?
Columnar storage (reads only needed columns) + massively parallel execution (Dremel) across thousands of workers.
What drives on-demand BigQuery cost?
Bytes scanned by the query. Selecting fewer columns and pruning partitions scans less and costs less.
Why avoid SELECT * in BigQuery?
It scans every column, maximising bytes scanned and cost. Select only the columns you need.
How do partitioning and clustering save money?
They let filters prune data (e.g. scan one date partition), cutting bytes scanned, the main cost/speed lever.

Sources

Open the SysPad canvas · Official BigQuery documentation

Other analytics lessons