Skip site navigation (1) Skip section navigation (2)

Patch for circular buffer in tuplestore to optimize merge joins (v1)

From: stark <stark(at)enterprisedb(dot)com>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Patch for circular buffer in tuplestore to optimize merge joins (v1)
Date: 2007-03-27 12:32:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
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.

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. 

Attachment: mergejoin-circbuffer-v1.patch.gz
Description: application/octet-stream (7.7 KB)


pgsql-patches by date

Next:From: Bruce MomjianDate: 2007-03-27 13:19:40
Subject: Re: Improvement of procArray.xmin for VACUUM
Previous:From: Marko KreenDate: 2007-03-27 12:27:01
Subject: Replace badly licensed blf.c in pgcrypto

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group