Re: hash index improving v3 - Mailing list pgsql-patches

From Simon Riggs
Subject Re: hash index improving v3
Date
Msg-id 1222176879.4445.361.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: hash index improving v3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Tue, 2008-09-23 at 09:13 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > Thinks: Why not just sort all of the time and skip the debate entirely?
>
> The sort is demonstrably a loser for smaller indexes.  Admittedly,
> if the index is small then the sort can't cost all that much, but if
> the (correct) threshold is some large fraction of shared_buffers then
> it could still take awhile on installations with lots-o-buffers.

The other realisation is that for large indexes, giving them more
maintenance_work_mem probably will make them build faster 'cos we'll be
sorting. So "give big indexes more memory" is still true *enough* to be
broadly consistent, explainable and understandable. I do explain things
in more detail on some courses, but pithy rules help busy people.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: hash index improving v3
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Infrastructure changes for recovery