Re: patternsel() and histogram_selectivity() and the hard cutoff of 100 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patternsel() and histogram_selectivity() and the hard cutoff of 100
Date
Msg-id 25674.1205022834@sss.pgh.pa.us
Whole thread Raw
In response to Re: patternsel() and histogram_selectivity() and the hard cutoff of 100  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> "Gregory Stark" <stark@enterprisedb.com> writes:
>> So I had a thought about how to soften the controversial hard cutoff of 100
>> for the use of the histogram selectivity. Instead of switching 100% one way or
>> the other between the two heuristics why not calculate both and combine them.
>> The larger the sample size from the histogram the more we can weight the
>> histogram calculation. The smaller the histogram size the more we weight the
>> heuristic.

> Incidentally I hacked up a patch to do this:

Applied with revisions --- I thought it was better to let the caller of
histogram_selectivity make the decision about how to combine the
estimates, instead of hard-wiring the choice into that subroutine.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Urbański
Date:
Subject: Re: Google Summer of Code 2008
Next
From: Oleg Bartunov
Date:
Subject: Re: Google Summer of Code 2008