Partitioning एक बड़ी table को किसी column के मान के आधार पर छोटे भौतिक टुकड़ों (partitions) में विभाजित करता है, जबकि वह एक ही तार्किक table बनी रहती है। PostgreSQL का declarative partitioning (Postgres 10+) इसे साफ़-सुथरा बनाता है। यह बहुत बड़ी tables के लिए performance और प्रबंधनीयता में सुधार करता है।
Declarative partitioning (आधुनिक तरीका)
orders (id , order_date , amount )
(order_date);
orders_2023 orders
() ();
orders_2024 orders
() ();
