On Sun, Feb 4, 2024 at 4:40 PM veem v <veema0000@xxxxxxxxx> wrote:
Hello All,In postgresql, Is it possible to partition an existing nonpartitioned table having data already residing in it and indexes and constraints defined in it, without the need of manually moving the data around, to make it faster? Similarly merging multiple partitions to one partition or splitting a single partition into multiple partitions?
That depends on how you partition the table, and what the PK is. Works great when the PK is constantly increasing (think "sequence" or "timestamp", and you partition by PK ranges; not so great when you want to partition by a different column.