Re: Avoid full GIN index scan when possible

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: Avoid full GIN index scan when possible
Дата
Msg-id CAPpHfdugwqUOfE5sw94ZKuUtU+Y97s57stA1q1AsioQido5c5A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoid full GIN index scan when possible  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
On Sat, Jun 29, 2019 at 1:25 PM Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> A related issue is that during costing is too late to modify cardinality
> estimates, so the 'Bitmap Index Scan' will be expected to return fewer
> rows than it actually returns (after ignoring the full-scan quals).
> Ignoring redundant quals (the way btree does it at execution) does not
> have such consequence, of course.

Adjust cardinality estimates should be possible in gincostestimate(),
because we call extractquery() method there.  However, it seems to be
quite independent issue.  Number of rows returned by 'Bitmap Index
Scan' doesn't vary much whether we execute GIN_SEARCH_MODE_ALL or not.
The only difference is for multicolumn index, GIN_SEARCH_MODE_ALL
allows to exclude NULL on one column, when normal scan is performed on
another column.  And we can take it into account in gincostestimate().

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Regression tests vs existing users in an installation
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Avoid full GIN index scan when possible