Re: Patch for circular buffer in tuplestore to optimizemerge joins (v1)

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "stark" <stark(at)enterprisedb(dot)com>
Cc: "pgsql-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Patch for circular buffer in tuplestore to optimizemerge joins (v1)
Date: 2007-03-27 22:33:21
Message-ID: 1175034802.4386.239.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Tue, 2007-03-27 at 13:32 +0100, stark wrote:

> This patch implements a circular buffer in tuplestore which drops old tuples
> as they're no longer needed. It uses this for merge joins to avoid having to
> spill the tuplestore if no single value exceeds work_mem. It also is what's
> needed for both recursive query support and OLAP window functions (hence why
> it implements the more complex circular buffer rather than just moving the
> single tuple up to the head of the buffer).
>
> This was mostly already done by Simon, I just finished the logic in tuplesort.c.

Cool.

This item was previously discussed here:
http://archives.postgresql.org/pgsql-hackers/2007-01/msg00096.php

(this changes tuplestore.c not tuplesort.c, though its clear in the
patch)

> This is actually not quite polished so I guess it's still a WIP but it's
> certainly ready to be reviewed. All that remains is polishing. If there's
> anything in there people object to now I would like to know.

I guess a performance test would be a great eyecatcher here, but it does
seem otherwise complete. Any eager merge join testers out there?

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-03-27 22:41:36 Re: autovacuum: multiple workers
Previous Message Alvaro Herrera 2007-03-27 21:41:22 autovacuum: multiple workers