Re: remove flatfiles.c - Mailing list pgsql-hackers

From Greg Stark
Subject Re: remove flatfiles.c
Date
Msg-id 407d949e0909021737h5683f4dex9b848eab9fe145cd@mail.gmail.com
Whole thread Raw
In response to Re: remove flatfiles.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Sep 2, 2009 at 8:45 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
> Greg Stark <gsstark@mit.edu> writes:
>> The backwards scan is awful for rotating media. The reading from the
>> end and writing to the beginning is bad too, though hopefully the
>> cache can help that.
>
> Yeah.  And all that pales in comparison to what happens in the indexes.
> You have to insert index entries (retail) for each moved-in tuple,

Hm, that could be addressed by buffering index inserts in backend
local memory. That's something Heikki proposed a long time ago
primarily for improving bulk data loading. Basically it would be a
retail version of the bulk loader that we saw at the 10th anniversary
where you merge a sorted list into the index.

You would still have to flush the buffer at transaction commit but
even if it only buffered a few dozen tuples if they're in the same
region of the index it would be a win. In this case it could probably
buffer hundreds and merge them all into the index en masse.

--
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: remove flatfiles.c
Next
From: "Joshua D. Drake"
Date:
Subject: Re: remove flatfiles.c