Re: Ordered Append Node - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Ordered Append Node
Date
Msg-id 47469D42.7040003@enterprisedb.com
Whole thread Raw
In response to Re: Ordered Append Node  (Markus Schiltknecht <markus@bluegap.ch>)
Responses Re: Ordered Append Node  (Markus Schiltknecht <markus@bluegap.ch>)
Re: Ordered Append Node  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Markus Schiltknecht wrote:
> Florian Weimer wrote:
>>> Given the partitioning case, I'd expect all rows to have an equal
>>> tuple descriptor. Maybe this is a matter of what to optimize, then?
>>>
>>> Could you elaborate on what use case you have in mind?
>>
>> You need a priority queue to figure out from which tape (partition)
>> you need to remove the next tuple.
> 
> And why do you need lots of heap memory to do that? Anything wrong with 
> the zipper approach I've outlined upthread?

We're talking about a binary heap, with just one node per partition. 
AFAICT it's roughly the same data structure as the zipper tree you 
envisioned, but not implemented with separate executor nodes for each level.

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


pgsql-hackers by date:

Previous
From: Markus Schiltknecht
Date:
Subject: Re: Ordered Append Node
Next
From: Florian Weimer
Date:
Subject: Re: Ordered Append Node