Skip to main content
InterviewHubPRO
Section Overview
Q3

Question 3 of 50

Part 1: Serverless Architecture, Storage & Ingestion (1 - 10)

6%
Google BigQuery (50 Qs)•Part 1: Serverless Architecture, Storage & Ingestion (1 - 10)

Compare Table Partitioning vs Table Clustering in BigQuery?

senior LevelMost AskedSystem Design

In Simple Words:

  • Partitioning: Coarse-grained division (max 4,000 partitions). Cost is calculated strictly on scanned partitions.
  • Clustering: Fine-grained sorting of rows within partitions (up to 4 columns). BigQuery sorts data into blocks and skips blocks during query execution via metadata min/max pruning.

Best Practice:

Combine both: Partition by date, Cluster by user_id and country.