On Thu, 24 Jun 2021 at 11:56, Tom Lane wrote:
>
> David Rowley writes:
> > On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera
> > wrote:
> >> It is not relevant from the partitioning point of view. Other factors
> >> can be used to decide the column order.
>
> > I'm not so sure that's really 100% tr
David Rowley writes:
> On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera wrote:
>> It is not relevant from the partitioning point of view. Other factors
>> can be used to decide the column order.
> I'm not so sure that's really 100% true. There is at least one
> partitioning feature that will work
On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera wrote:
>
> On 2021-Jun-23, Rumpi Gravenstein wrote:
>
> > As a best practice is it better to create the primary key starting or
> > ending with the partition column?
>
> It is not relevant from the partitioning point of view. Other factors
> can be use
Alvaro Herrera writes:
> On 2021-Jun-23, Rumpi Gravenstein wrote:
>> As a best practice is it better to create the primary key starting or
>> ending with the partition column?
> It is not relevant from the partitioning point of view. Other factors
> can be used to decide the column order.
See i
On 2021-Jun-23, Rumpi Gravenstein wrote:
> As a best practice is it better to create the primary key starting or
> ending with the partition column?
It is not relevant from the partitioning point of view. Other factors
can be used to decide the column order.
--
Álvaro Herrera Valdivia, C
All,
I'm on PostgreSQL 13 and have a partitioned table with a primary key.
create table t( a integer, b integer, c varchar, d .. ) partitioned by
range( a );
As a best practice is it better to create the primary key starting or
ending with the partition column?
e.g.
1) t_pkey primary key (a, b