Re: [HACKERS] partial indexes and bitmap scans

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [HACKERS] partial indexes and bitmap scans
Дата
Msg-id 20170309170124.GK9812@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [HACKERS] partial indexes and bitmap scans  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] partial indexes and bitmap scans  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > Perhaps I'm missing something obvious, but isn't it a bit redundant to
> > have both a Recheck condition (which is the predicate of the index) and
> > a Filter condition (which is the user's predicate) when we've already
> > decided that the user's predicate must result in a subset of the
> > index's, as, otherwise, we wouldn't be able to use the index in the
> > first place?
>
> Yeah, I think this is just something that the planner doesn't see fit
> to expend cycles on detecting.

We have already figured out that the user's predicate results in a
subset of the index's or we wouldn't be able to use that index though,
right?  Do we really need to spend cycles re-discovering that?  Are
there cases where we actually need the index's predicate to ever be
included for correctness..?

This seems like we're going out of our way to add in an additional check
for something that we've already determined must always be true and that
strikes me as odd.

Thanks!

Stephen

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] GUC for cleanup indexes threshold.
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Gather Merge