Re: Question about indexes - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Question about indexes
Date
Msg-id 200401301530.i0UFUgQ18014@candle.pha.pa.us
Whole thread Raw
In response to Re: Question about indexes  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Question about indexes
List pgsql-hackers
Alvaro Herrera wrote:
> On Fri, Jan 30, 2004 at 09:48:19AM -0500, Tom Lane wrote:
> 
> > A variant is to make the per-page bit arrays be entries in a hash table
> > with page number as hash key.  This would reduce insertion to a nearly
> > constant-time operation, but the drawback is that you'd need an explicit
> > sort at the end to put the per-page entries into page number order
> > before you scan 'em.  You might come out ahead anyway, not sure.
> 
> Is there a reason sort the pages before scanning them?  The result won't
> come out sorted one way or the other.

I think the goal would be to hit the heap in sequential order as much as
possible.  When we are doing reading right from the index, we haven't
collected all the heap values in one place, but since we have them in
memory, we might as well sort them, though I don't think that is a
requirement, just a performance enhancement, or at least that is my
guess.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Question about indexes
Next
From: Tom Lane
Date:
Subject: Re: Question about indexes