From: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Ronan Dunklau <ronan(dot)dunklau(at)dalibo(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-21 08:52:45 |
Message-ID: | CAFjFpRcUbyvsFNwyhQYhpUL9aFX=VyZNUpo8wM3MEbes7fb-uQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 21, 2017 at 3:30 AM, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> On Thu, Aug 31, 2017 at 5:30 AM, Peter Eisentraut
> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>> On 3/20/17 11:03, Ronan Dunklau wrote:
>>>> Great idea. This is too late for v10 at this point, but please add it
>>>> to the next CommitFest so we don't forget about it.
>>> I know it is too late, and thought that it was too early to add it to the
>>> commitfest properly since so many design decisions should be discussed. Thanks
>>> for the feedback, I added it.
>>
>> This patch no longer applies. Please send an update.
>
>
> Thanks for the reminder, and sorry for very very late answer. PFA
> rebased patch on current head.
>
> I unfortunately didn't have time yet to read carefully the newly added
> infrastructure (30833ba154e0c1106d61e3270242dc5999a3e4f3 and
> following), so this patch is still using its own copy of partitions
> list. I hope I can work on it shortly, but I prefer to send the
> rebased version now, since it's still a POC with knowns problems and
> questions, and I'll more than welcome any guidance with it.
>
>
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().
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-09-21 08:56:43 | Re: Assertion failure when the non-exclusive pg_stop_backup aborted. |
Previous Message | Kyotaro HORIGUCHI | 2017-09-21 08:49:57 | Re: GUC for cleanup indexes threshold. |