Skip site navigation (1) Skip section navigation (2)

Re: pgsql-server/src/backend/utils/sort tuplesort.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server/src/backend/utils/sort tuplesort.c
Date: 2004-03-18 00:37:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> During btree index build, sort equal-keyed tuples according to their
>> TID (heap position).  This doesn't do anything to the validity of the
>> finished index, but by pretending to qsort() that there are no really
>> equal keys in the sort, we can avoid performance problems with qsort
>> implementations that have trouble with large numbers of equal keys.
>> Patch from Manfred Koizar.

> I think there is also the advantage that many equal keys will access the
> heap in a more sequential, rather than random, order, which is the part
> that really excited me.

But we aren't attempting to maintain that ordering after index build.
(In fact, it was exactly that point that triggered the argument last
time round ...)

			regards, tom lane

In response to


pgsql-committers by date

Next:From: Bruce MomjianDate: 2004-03-18 03:06:18
Subject: Re: pgsql-server/src/backend/utils/sort tuplesort.c
Previous:From: Bruce MomjianDate: 2004-03-17 22:31:56
Subject: Re: pgsql-server/src/backend/utils/sort tuplesort.c

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group