Re: Question on partitioning

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: veem v <veema0000(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Question on partitioning
Date: 2024-02-04 23:40:19
Message-ID: CANzqJaCD7CwXdvXFer64k2JH3q00kipAd4cQ43rJcSGXFWbL5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Feb 4, 2024 at 4:40 PM veem v <veema0000(at)gmail(dot)com> 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-02-05 00:39:15 Re: select from composite type
Previous Message Ron Johnson 2024-02-04 23:15:10 Re: How to do faster DML