BigQuery Table Partitioning for the PCA Exam

GCP Study Hub
Ben Makansi
December 2, 2025

Table partitioning is one of those BigQuery features that sounds abstract until you see what it actually does to a query plan. On the Professional Cloud Architect exam, you need to recognize when partitioning is the right answer and how it changes both performance and cost. I want to walk through it the way I think about it.

What Partitioning Actually Does

Partitioning splits a single BigQuery table into smaller physical pieces, called partitions, based on a criterion you choose. The table still looks like one table when you query it, but under the hood BigQuery stores each partition separately. When a query has a filter that lines up with the partition key, BigQuery only scans the partitions it needs and skips the rest.

That last point is what matters for the exam. BigQuery charges for the bytes scanned by a query. If a table has two years of data and a query only needs last week, partitioning by day means BigQuery reads seven days of data instead of all 730. The query is faster and it costs less.

The Three Ways to Partition

You can partition a BigQuery table by one of three things:

  • A timestamp or date column in the data itself, so each row lands in the partition that matches its value.
  • Ingestion time, where BigQuery uses the moment a row was loaded as the partition key. This is convenient when the source data does not carry a clean timestamp of its own.
  • An integer range, which is the right choice when your partition key is something like a numeric customer ID bucket rather than a date.

Most of the partitioning you see in practice is time-based, but the integer range option is worth knowing exists. The exam can ask you to pick the partitioning strategy that fits a non-time-based key.

What Tables Are Worth Partitioning

Partitioning pays off on large, fast-growing tables that are queried with filters on the partition key. The classic candidates are time-series streams:

  • IoT sensor data from connected devices.
  • Transaction logs from retail or ecommerce systems.
  • Clickstream data tracking user activity on a site or app.
  • Sensor logs from environmental or industrial equipment.

What these have in common is a constant stream of timestamped rows and a query pattern that almost always filters on a time range. Tables like this are usually partitioned by hour or day. The granularity matches how queries will filter the data, which is the whole point. Partitioning by month works for illustrating the concept but is uncommon in real systems.

If a table is small, or if queries scan the entire table regardless of any filter, partitioning will not help and may add overhead. The exam expects you to recognize when partitioning is and is not the right tool.

Partition Expirations

Once you have partitioned a table, you can set a partition expiration. This tells BigQuery to automatically delete partitions once they pass a given age. If you set a 90 day expiration on a daily-partitioned table, BigQuery keeps the most recent 90 partitions and drops anything older without you doing anything.

Partition expiration is a common exam distractor because it gets confused with table expiration. The two are not the same:

  • Partition expiration deletes individual partitions when they age out. The rest of the table stays intact and continues to receive new data.
  • Table expiration deletes the entire table when the expiration time is reached. The whole object goes away.

If a question describes a retention requirement like "keep the last 90 days of logs and let older data drop off automatically," the answer is partition expiration on a partitioned table. If the question describes a temporary or scratch table that should clean itself up entirely, that is table expiration.

What to Carry Into the Exam

For the Professional Cloud Architect exam, the partitioning concepts that matter are:

  • Partitioning splits a table into smaller pieces so queries that filter on the partition key scan less data, which improves performance and lowers cost.
  • You can partition by a timestamp column, by ingestion time, or by integer range.
  • Partitioning is for large, fast-growing tables with consistent filter patterns. Hour or day granularity is typical for time-series.
  • Partition expiration deletes aged-out partitions automatically. Table expiration deletes the whole table. Do not mix them up.

Most BigQuery questions on the exam come down to recognizing which storage and query feature solves the scenario being described. Partitioning is one of the most reusable patterns, so getting comfortable with it pays off across multiple questions.

My Professional Cloud Architect course covers BigQuery table partitioning alongside the rest of the storage and analytics material.

arrow