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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

This block is reading and checking the visibility map, I think. We don't have to check the visibility map during the index scan - we still need to get a tuple from the table, we can check the visibility for current transaction there. With index 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 table if the visibility map allows it for given tuple.

regards, Sergei





[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux