Re: External Sort performance patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: External Sort performance patch
Date: 2006-02-19 06:15:16
Message-ID: 7885.1140329716@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> The enclosed patch substantially improves large sort performance,

Applied with revisions. I thought the addition of the Tapestate structs
complicated the notation considerably without really buying anything,
so instead I just made the fixed-size arrays into pointers. A more
serious objection was that MaxTapes and TapeRange can't be globals,
they have to be struct fields, unless you want to assume that all sorts
in progress at a given time must use identical memory settings.

I also fixed some off-by-one logic in determining the appropriate number
of tapes, and added accounting for tape buffer space. It was somewhat
reasonable to ignore the LogicalTapeSet space when the number of tapes
was fixed and small, but in the new regime I think it's necessary to
account for the tape buffers while computing memory use.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-02-19 06:16:31 Re: External Sort performance patch
Previous Message Neil Conway 2006-02-19 00:05:02 Re: add additional options to CREATE TABLE ... AS