Re: Problem with Bitmap Heap Scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with Bitmap Heap Scan
Дата
Msg-id 3274.1227200566@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem with Bitmap Heap Scan  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Problem with Bitmap Heap Scan  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Tom Lane wrote:
>> Hmm, the ~~ condition should get treated as a "filter" not a "recheck".
>> I suppose I broke this somewhere ...

> I started to look at this last night. The culprit seems to be this patch:

Yeah, it appears that I oversimplified matters in that patch.  I think
that I mistakenly decided that create_bitmap_subplan() only needed one
output parameter because there was no longer a need to distinguish
between lossy and nonlossy operators.  What I forgot was that the
"nonlossy" output was also coming from the "indexquals" rather than
the "indexclauses", and that's different precisely in the case where
we've got a special index operator such as LIKE.

I think what probably has to happen is revert most of that
simplification and have create_bitmap_subplan return suitable
representations of both the indexquals and indexclauses.

> Attached is a patch that changes create_bitmap_subplan so that the 
> condition put into Recheck condition is never stronger than the 
> condition automatically handled by the index. Does that look right to you?

I think this is still too simplistic, but will look closer.  One point
is that it's not accounting for the bitmap AND/OR structure that might
be above the individual indexscans.  The original coding avoided that
problem by making all the decisions at the top level, and I'm inclined
to stick with that approach.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: WIP parallel restore patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.