Split the giant table into smaller physical child tables by a partition key, so each query touches only the partitions it needs (partition pruning) instead of scanning billions of rows. A table with 5B order rows still behaves like one logical table, but the engine skips 99% of it when your WHERE filters on the partition key.
The shape of a partitioned table
orders (logical parent)
│ partition key = created_at
┌────────────────┼────────────────┬───────────────┐
▼ ▼ ▼ ▼
orders_2024_q1 orders_2024_q2 orders_2024_q3 orders_2025_q1
(child table) (child table) (child table) (child, active)
│ │
local index local index
(per child) (per child)
