From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [Proposal] Make the optimiser aware of partitions ordering |
Date: | 2017-09-22 19:34:11 |
Message-ID: | CAOBaU_aarvh=TmqqpPq1PpM6aaYDmWnVHX0hLeubrrKyvc6n1g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 21, 2017 at 11:13 AM, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> On Thu, Sep 21, 2017 at 10:52 AM, Ashutosh Bapat
> <ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
>> With 9140cf8269b0c4ae002b2748d93979d535891311, we store the
>> RelOptInfos of partitions in the RelOptInfo of partitioned table. For
>> range partitioned table without default partition, they are arranged
>> in the ascending order of partition bounds. This patch may avoid
>> MergeAppend if the sort keys match partition keys by creating an
>> Append path by picking sorted paths from partition RelOptInfos in
>> order. You may use slightly modified version of
>> add_paths_to_append_rel().
>
>
> Yes, I just saw this commit this morning, and this is exactly what I
> was missing, thanks for the pointer and the patch!
PFA v3 of the patch, once again rebased and that now use all the newly
available infrastructure.
I also added a check that a sorted append can't be generated when a
default partition has been declared.
Attachment | Content-Type | Size |
---|---|---|
sorted_append_v3.diff | text/plain | 44.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2017-09-22 19:39:36 | Re: 10RC1 crash testing MultiXact oddity |
Previous Message | Peter Eisentraut | 2017-09-22 19:31:40 | Re: Patch: add --if-exists to pg_recvlogical |