विशाल table लाई partition key अनुसार साना physical child table मा विभाजन गर्नुहोस्, ताकि प्रत्येक query ले अर्बौं row scan गर्नुको सट्टा आवश्यक partition मात्र छुओस् (partition pruning)। 5 अर्ब order row भएको table अझै एउटा logical table जस्तै व्यवहार गर्छ, तर तपाईंको WHERE ले partition key मा filter गर्दा engine ले 99% skip गर्छ।
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)
