Skip to content
BENIBIX Learn

Partition Pruning

Data🗄️ Storage & WarehousingTable Partitioning

Also known as Partition Elimination

Skipping the table parts a query cannot need. Less is read, so it is faster.

Think of it like

It is like skipping the pages of a book you know you do not need.

Example

A query filters on one day of a table split by day. BigQuery reads 2 GB instead of 700 GB, and the bill drops to match.

Why it matters

This is where splitting a table pays off. If you pay for each scan, the bill shrinks too.

Definition

Partition pruning is when a query engine skips the parts of a table it does not need. It looks at the filter in the query, such as one date. It works out which parts can hold matching rows. Then it reads only those parts and ignores the rest. It only works when the filter is on the column the table is split by.

Example code

sql
SELECT COUNT(*)
FROM events
WHERE date = '2026-11-16';
Only the folder for that one day is read.
Filter on the split column, and the other parts are never read.

Common mistake

Wrapping the split column in a function, such as YEAR(date) = 2026. Some engines can no longer prune, and read everything.

Key takeaways

  1. 1
    Read the filter. The engine checks the WHERE clause.
  2. 2
    Skip whole parts. Non-matching parts are never opened.
  3. 3
    Filter the split column. Pruning needs that exact column.