Re: the big picture for index-only scans

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: the big picture for index-only scans
Date: 2011-05-11 13:55:27
Message-ID: 201105111355.p4BDtR417636@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nicolas Barbier wrote:
> 2011/5/11, Bruce Momjian <bruce(at)momjian(dot)us>:
>
> > FYI, because the visibility map is only one _bit_ per page, it is 8000 *
> > 8 or 64k times smaller than the heap, e.g. one 8k page covers 64MB of
> > heap pages.
>
> Actually, that would be "one 8kB block covers 512MB of heap": 1 block
> of visibility map (8kB) = 64k visibility bits = covers 64k blocks =
> covers 512MB of heap. The cost of keeping the visibility map in cache
> is therefore totally negligible, only the cost of WAL logging changes
> to it is of interest.

Ah, yes, thanks, even better.

> > This is important because we rely on this compactness in hope that
> > the WAL logging of this information will not be burdensome.
>
> The size of on entry in the map (1 bit) is not very related to the WAL
> overhead required per change of such a bit (i.e., the log record for a
> 1 bit change will certainly be way more than 1 bit).

True.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message nil nil 2011-05-11 14:10:55 Help: regarding patch development
Previous Message nil nil 2011-05-11 13:46:37 Help required regarding patch development