From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Rumpi Gravenstein <rgravens@gmail.com>
Cc: PostgreSQL <pgsql-general@lists.postgresql.org>
Subject: Re: Partitioned Table Index Column Order
Date: Wed, 23 Jun 2021 19:56:54 -0400
Message-ID: <2550776.1624492614@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvqFD0CrkLSBCVX2ZhG+iW1ehbA+dgsW2pbJ1UDLVeqpEw@mail.gmail.com>
References: <CAEpg1wCbZJCCYL0cesn00bCGdOsB0Q66_-3O=2TSwqGDiD-Zow@mail.gmail.com>
<202106232255.3gmtpm5lzc2p@alvherre.pgsql>
<CAApHDvqFD0CrkLSBCVX2ZhG+iW1ehbA+dgsW2pbJ1UDLVeqpEw@mail.gmail.com>
David Rowley <dgrowleyml@gmail.com> writes:
> On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera <alvherre@alvh.no-ip.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, alvherre@alvh.no-ip.org, rgravens@gmail.com
Subject: Re: Partitioned Table Index Column Order
In-Reply-To: <2550776.1624492614@sss.pgh.pa.us>
References: <CAEpg1wCbZJCCYL0cesn00bCGdOsB0Q66_-3O=2TSwqGDiD-Zow@mail.gmail.com> <202106232255.3gmtpm5lzc2p@alvherre.pgsql> <CAApHDvqFD0CrkLSBCVX2ZhG+iW1ehbA+dgsW2pbJ1UDLVeqpEw@mail.gmail.com> <2550776.1624492614@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox