Re: [Proposal] Make the optimiser aware of partitions ordering

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-21 09:13:23
Message-ID: CAOBaU_Y5OKa1xmHi2+quucxMAP=rV1UYfVpF+XWiepPwdhaQQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2017-09-21 09:49:36 Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?
Previous Message Alexander Korotkov 2017-09-21 09:08:52 Re: Should we cacheline align PGXACT?