Re: gistchoose vs. bloat - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: gistchoose vs. bloat
Date
Msg-id CAPpHfdsBQ8O3pv5cvWFj8U5MEzF1xCdyRFgpY_VXgSGQOsfRww@mail.gmail.com
Whole thread Raw
In response to Re: gistchoose vs. bloat  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Tue, Sep 11, 2012 at 10:35 AM, Jeff Davis <pgsql@j-davis.com> wrote:
On Tue, 2012-09-04 at 19:21 +0400, Alexander Korotkov wrote:

> New version of patch is attached. Parameter "randomization" was
> introduced. It controls whether to randomize choose. Choose algorithm
> was rewritten.
>
Do you expect it to be bad in any reasonable situations? I'm inclined to
just make it always randomize if it's better. I think it would be hard
for a user to guess when it's better and when not.

Randomization should increase IO when index doesn't entirely fit to cache. Without randomization only fraction of the tree would be used for actual insertions. While with randomization whole tree would be potentially used for insertions.
 
Maybe it's useful to turn randomization off for testing purposes, e.g.
to ensure determinism?

Yes, that's another good point. For example, randomization impede reproducing of bugs.

------
With best regards,
Alexander Korotkov.

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: gistchoose vs. bloat
Next
From: Jeff Davis
Date:
Subject: Re: Question about SSI, subxacts, and aborted read-only xacts