Re: kill_prior_tuple for bitmap scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: kill_prior_tuple for bitmap scan
Дата
Msg-id 9585.1150689309@sss.pgh.pa.us
обсуждение исходный текст
Ответ на kill_prior_tuple for bitmap scan  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Список pgsql-hackers
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> As I read, the kill_prior_tuple optimization doesn't work for bitmap scan
> code. To fix this problem, we have two choices.

> One is still use the kill_prior_tuple trick in a modified way. Heap TIDs
> recycling should not be a problem. This is because generally we always hold
> pin of the last index page we scanned,

Really?  An indexscan will release pin before returning no-more-tuples,
and had better do so else we leak pins during queries involving many
indexscans.  (IIRC, I broke that around 7.3 :-()

> Another smaller problem is that we have
> to scan the heap pages again to identify the index pointers, but that's
> affordable since these pages should be in the buffer pool with big chance.

Not sure I believe that either.  Even granting the assumption that the
pages are still in cache, this implies a big increase in bufmgr traffic.

This certainly is an interesting problem, but there is not a simple
solution.
        regards, tom lane


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

Предыдущее
От: "Qingqing Zhou"
Дата:
Сообщение: kill_prior_tuple for bitmap scan
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: sync_file_range()