Re: Bitmap reuse

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Bitmap reuse
Дата
Msg-id CAApHDvoDSKkvvYiZ_XKZa6qtEwhCYZpBK1HaDzn1q6_JZ9b4rQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bitmap reuse  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Bitmap reuse
Список pgsql-hackers
On Wed, 21 Jul 2021 at 13:32, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> David Rowley <dgrowleyml@gmail.com> writes:
> > I imagined Jeff was meaning the bitmap from the scan of foo_x_idx, not
> > the combined ANDed bitmap from both indexes.
>
> To re-use that, you'd need a way to prevent the upper node from
> destructively modifying the tidbitmap.

Yeah.  And that would slow things down in the case where it was just
executed once as we'd need to make a copy of it to prevent the cached
version from being modified regardless if it would ever be used again
or not.

Maybe the planner would need to be involved in making the decision of
if the bitmap index scan should tuck away a carbon copy of the
resulting TIDBitmap after the first scan.  That way on rescan we could
just make a copy of the cached version and return that.  That saves
having to modify the callers to tell them not to damage the returned
TIDBitmap.

David



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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: add 'noError' to euc_tw_and_big5.c
Следующее
От: David Rowley
Дата:
Сообщение: Re: Bitmap reuse