Re: Bloom index cost model seems to be wrong - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bloom index cost model seems to be wrong
Date
Msg-id 20591.1551378611@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bloom index cost model seems to be wrong  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Bloom index cost model seems to be wrong
List pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> Should we be trying to estimate the false positive rate and charging
> cpu_tuple_cost and cpu_operator_cost the IO costs for visiting the table to
> recheck and reject those?  I don't think other index types do that, and I'm
> inclined to think the burden should be on the user not to create silly
> indexes that produce an overwhelming number of false positives.

Heap-access costs are added on in costsize.c, not in the index
cost estimator.  I don't remember at the moment whether there's
any explicit accounting for lossy indexes (i.e. false positives).
Up to now, there haven't been cases where we could estimate the
false-positive rate with any accuracy, so we may just be ignoring
the effect.  But if we decide to account for it, I'd rather have
costsize.c continue to add on the actual cost, perhaps based on
a false-positive-rate fraction returned by the index estimator.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Perumal Raj
Date:
Subject: Re: Question about pg_upgrade from 9.2 to X.X
Next
From: Mike Palmiotto
Date:
Subject: Re: [RFC] [PATCH] Flexible "partition pruning" hook