Re: Partitioned Table Index Column Order

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Rumpi Gravenstein <rgravens(at)gmail(dot)com>, PostgreSQL <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Partitioned Table Index Column Order
Date: 2021-06-23 23:56:54
Message-ID: 2550776.1624492614@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> 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 when the partitioning column is
> first and won't when it's not.
> Ordered partition scans work with RANGE and LIST partitioning:

Sure, but is that any different from the behavior with unpartitioned
tables? You have to make the index column order agree with the
ORDER BY you want to use, in either case.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-06-24 00:33:33 Re: Psql wants to use IP6 when connecting to self using tcp...
Previous Message David Rowley 2021-06-23 23:53:29 Re: Partitioned Table Index Column Order