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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to