Partitioned Table

Concept

A partitioned table is a database table physically divided into segments by a specific column (usually a date), allowing queries to read only relevant segments.

Layman Explanation & Analogy

Imagine a filing cabinet with 365 labeled drawers, one for each day of the year. If you want yesterday's receipts, a partitioned table lets you open only yesterday's drawer, ignoring the other 364 drawers completely. This makes your queries lightning-fast and dramatically cheaper.

Worked real-world example

A customer events table has 3 years of data (1,000+ days). Filtering by `WHERE event_date = "2026-08-26"` on a date-partitioned table scans only 1/1000th of the dataset.

What people get wrong & common traps

Applying functions to partition columns in your SQL (like `WHERE DATE(timestamp_col) = ...` instead of filtering on the raw timestamp) can prevent the database engine from recognizing the partition, forcing it to scan the entire table history.

Last reviewed August 28, 2026.