Re: [HACKERS] Index creation takes for ever

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Manfred Koizar" <mkoi-pg(at)aon(dot)at>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-patches(at)postgresql(dot)org>, <ohp(at)pyrenet(dot)fr>, "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Index creation takes for ever
Date: 2003-09-08 09:31:05
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4961FFD@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


> > I don't think so, because the patch does nothing to keep the sort
> > order once the index is initially created.
>
> As Tom mentioned, we might not want to keep the tid's in order after the
> index is created because he wants the most recent tid's first, so the
> expired ones migrate to the end.

But on average this argument only holds true for unique indexes, no ?
Is there any code that stops the heap lookup after the visible tuple is found ?
At least in an index with more rows per key you will fetch all heaps after the
first one anyway to get at the next row. This is better done in heap order, no ?

And the bitmap approach will not work for large result sets.

Summa summarum I would leave the TODO item (maybe add a comment
(only for non-unique, evaluate performance))

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gaetano Mendola 2003-09-08 09:33:52 Re: mcxt.c
Previous Message Conrad Vermeulen 2003-09-08 09:27:30 FW: indirect dereferencing a field in a record using plpgsql

Browse pgsql-patches by date

  From Date Subject
Next Message Gaetano Mendola 2003-09-08 09:33:52 Re: mcxt.c
Previous Message Manfred Koizar 2003-09-08 08:05:21 Re: Minor lmgr code cleanup