Re: Ordered Append Node - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Ordered Append Node
Date
Msg-id 4746D190.7070304@enterprisedb.com
Whole thread Raw
In response to Re: Ordered Append Node  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Ordered Append Node  ("Zeugswetter Andreas ADI SD" <Andreas.Zeugswetter@s-itsolutions.at>)
List pgsql-hackers
Gregory Stark wrote:
> Ideally we would also be able to do this in the planner. If the planner could
> determine from the constraints that all the key values from each partition are
> non-overlapping and order them properly then it could generate a regular
> append node with a path order without the overhead of the run-time
> comparisons.
> 
> But that requires a) dealing with the problem of the parent table which has no
> constraints and ...

It would help even if you could only prove it for some partitions. You 
could use a regular append node for the partitions you know not to 
overlap, and merge the output of that with the new kind of ordered 
append node. We'd see that the parent table is empty on the first 
invocation, and after that the ordered append node would just pass 
through the tuples.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Markus Schiltknecht
Date:
Subject: Re: Ordered Append Node
Next
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: Ordered Append Node