Re: Bloom index cost model seems to be wrong

2019-02-12 Thread Jeff Janes
On Tue, Feb 12, 2019 at 4:17 PM Tom Lane wrote: > Jeff Janes writes: > > In order for bloom (or any other users of CREATE ACCESS METHOD, if there > > are any) to have a fighting chance to do better, I think many of > selfuncs.c > > currently private functions would have to be declared in some he

Re: Bloom index cost model seems to be wrong

2019-02-12 Thread Tom Lane
Jeff Janes writes: > In order for bloom (or any other users of CREATE ACCESS METHOD, if there > are any) to have a fighting chance to do better, I think many of selfuncs.c > currently private functions would have to be declared in some header file, > perhaps utils/selfuncs.h. But that then requir

Re: Bloom index cost model seems to be wrong

2019-02-12 Thread Jeff Janes
On Tue, Feb 12, 2019 at 11:58 AM Jeff Janes wrote: > > On Tue, Feb 12, 2019 at 10:42 AM Tom Lane wrote: > >> >> Hm. blcostestimate is using the default cost calculation, except for >> >> /* We have to visit all index tuples anyway */ >> costs.numIndexTuples = index->tuples; >> >

Re: Bloom index cost model seems to be wrong

2019-02-12 Thread Jeff Janes
On Tue, Feb 12, 2019 at 10:42 AM Tom Lane wrote: > Thomas Kellerer writes: > > The bloom index is only used if either Seq Scan is disabled or if the > random_page_cost is set to 1 (anything about 1 triggers a Seq Scan on my > Windows laptop). > > Hm. blcostestimate is using the default cost cal

Re: Bloom index cost model seems to be wrong

2019-02-12 Thread Tom Lane
Thomas Kellerer writes: > The bloom index is only used if either Seq Scan is disabled or if the > random_page_cost is set to 1 (anything about 1 triggers a Seq Scan on my > Windows laptop). Hm. blcostestimate is using the default cost calculation, except for /* We have to visit all i

Bloom index cost model seems to be wrong

2019-02-12 Thread Thomas Kellerer
I stumbled upon this question: https://dba.stackexchange.com/questions/229413 in a nutshell: the bloom index is not used with the example from the manual. The bloom index is only used if either Seq Scan is disabled or if the random_page_cost is set to 1 (anything about 1 triggers a Seq Sca