Re: index only scan question

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: index only scan question
Дата
Msg-id 3053c9cec512260c53e4f48cab370a295b6ff4af.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: index only scan question  (Daniel Westermann <daniel.westermann@dbi-services.com>)
Список pgsql-general
Daniel Westermann wrote:
> >I'd say the old index tuple was killed during the first scan:
> >https://www.cybertec-postgresql.com/en/killed-index-tuples/
> 
> ... from your blog: "Whenever an index scan fetches a heap tuple only to find that it is dead
> (that the entire “HOT chain” of tuples is dead, to be more precise), it marks the index tuple
> as “killed”. Then future index scans can simply ignore it.
> 
> I understand that, but in my case the chain is not dead so this does not explain the difference.
> Do I miss something?

I assume that the UPDATE was not HOT, because the first scan had to fetch two tuples.

After the UPDATE, the original tuple was dead (the HOT chain consists
only of a single tuple here, because it was no HOT update).
The first index scan detects that and marks the index tuple as killed.
The second index scan only visits the new tuple.

Yours,
Laurenz Albe



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

Предыдущее
От: Daniel Westermann
Дата:
Сообщение: Re: index only scan question
Следующее
От: Jean-Marc Lessard
Дата:
Сообщение: pg_dump out of memory for large table with LOB