Re: Impact of table scan on shared buffers

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Morris Goldstein <morris(dot)x(dot)goldstein(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Impact of table scan on shared buffers
Date: 2007-11-13 22:30:01
Message-ID: 1194993001.24251.128.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2007-11-13 at 17:10 -0500, Morris Goldstein wrote:
> I suspect that the SELECT scan will tend to displace everything else
> in shared buffers, and I hope that the two forms of COPY do not. Is
> that correct?
>

In 7.4 that may be true, but in later versions it's not.

8.0+ use multiple LRU lists, and a single access of one block won't
evict a frequently-accessed block from cache. That means some of the
blocks in cache will be displaced, but generally not any
frequently-accessed pages.

In 8.3 (currently in beta), a scan of a table larger than
shared_buffers/4 will have almost no impact on shared buffers.

Regards,
Jeff Davis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dhaval Shah 2007-11-13 22:47:41 Which JDBC Pool to use
Previous Message Morris Goldstein 2007-11-13 22:10:33 Impact of table scan on shared buffers