From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-performance(at)lists(dot)postgresql(dot)org |
Subject: | Re: Bloom index cost model seems to be wrong |
Date: | 2019-02-12 19:56:40 |
Message-ID: | CAMkU=1xyzYcjHdCdt8pcY4rvoh0xeP1kb8kvhWiF5fyTYFgBPA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
On Tue, Feb 12, 2019 at 11:58 AM Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>
> On Tue, Feb 12, 2019 at 10:42 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>>
>> Hm. blcostestimate is using the default cost calculation, except for
>>
>> /* We have to visit all index tuples anyway */
>> costs.numIndexTuples = index->tuples;
>>
>> which essentially tells genericcostestimate to assume that every index
>> tuple will be visited. This obviously is going to increase the cost
>> estimate; maybe there's something wrong with that?
>>
>
> I assumed (without investigating yet) that genericcostestimate is applying
> a cpu_operator_cost (or a few of them) on each index tuple, while the
> premise of a bloom index is that you do very fast bit-fiddling, not more
> expense SQL operators, for each tuple and then do the recheck only on what
> survives to the table tuple part.
>
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 requires a cascade of other
inclusions. Perhaps that is why it was not done.
Cheers,
Jeff
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-02-12 21:17:23 | Re: Bloom index cost model seems to be wrong |
Previous Message | legrand legrand | 2019-02-12 19:50:42 | Re: Planning counters in pg_stat_statements (using pgss_store) |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-02-12 21:17:23 | Re: Bloom index cost model seems to be wrong |
Previous Message | Jeff Janes | 2019-02-12 18:03:48 | Re: Performance regressions found using sqlfuzz |