Re: Refactoring the API for amgetmulti - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Refactoring the API for amgetmulti
Date
Msg-id 20060726152927.GA32377@svana.org
Whole thread Raw
In response to Refactoring the API for amgetmulti  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Refactoring the API for amgetmulti  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Jul 25, 2006 at 06:49:02PM -0400, Tom Lane wrote:
> What if we dropped the array convention, and simply passed the tidbitmap
> object to the index AM's getmulti function, with the instructions "stuff
> all the TIDs into this bitmap, and don't come back till you're done"?
> For the existing index AMs this'd be only trivially different, but it
> should result in some fractional savings of call overhead when scanning
> a large number of index entries.

Well, my only thoughtis that this pretty means you can't use
index_getmulti for anything else. For example, when I was playing with
async i/o I was using index_getmulti to get a list of TIDs, submitting
all the read requests in parallel and then waiting on them. What you
lose by storing straight into bitmaps is the *order*.

Mind you, index_getmulti never supported backward scans either so its
not a great loss but just thought I'd throw it in the rink.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] patch implementing the multi-argument aggregates (SOC project)
Next
From: andrew@dunslane.net
Date:
Subject: Re: pgbench enhancements