Re:Explain plan shows fewer shared blocks when index+table compared to index alone?

Поиск
Список
Период
Сортировка
От Sergei Kornilov
Тема Re:Explain plan shows fewer shared blocks when index+table compared to index alone?
Дата
Msg-id 925761680594663@yxrvbqz6ajyithqd.vla.yp-c.yandex.net
обсуждение исходный текст
Ответ на Explain plan shows fewer shared blocks when index+table compared to index alone?  (Amin Jaffer <aminjaffer@gmail.com>)
Список pgsql-performance
Hello

This block is reading and checking the visibility map, I think. We don't have to check the visibility map during the
indexscan - we still need to get a tuple from the table, we can check the visibility for current transaction there.
Withindex only scan, we need to check the visibility map: if the tuple is visible to all transactions, then we return
it.Otherwise, we read the tuple from the table as in the index scan (this is your case, as indicated by "Heap Fetches:
1")

Index only scan does not mean that we will not read the tuple from the table. It means that we can skip reading the
tableif the visibility map allows it for given tuple.
 

regards, Sergei



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

Предыдущее
От: Amin Jaffer
Дата:
Сообщение: Explain plan shows fewer shared blocks when index+table compared to index alone?
Следующее
От: Tim Slechta
Дата:
Сообщение: Why are commits consuming most of the database time?