Re: Force table to be permanently in cache?

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Force table to be permanently in cache?
Date: 2003-08-29 14:26:30
Message-ID: 20030829142630.GE19388@libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Fri, Aug 29, 2003 at 02:52:10PM +0200, Fabian Kreitner wrote:
> Hi everyone,
>
> I have a sql request which on first invocation completes in ~12sec but then
> drops to ~3sec on the following runs. The 3 seconds would be acceptable but
> how can I make sure that the data is cached and all times? Is it simply
> enough to set shared_buffers high enough to hold the entire database (and
> have enough ram installed of course)? The OS is linux in this case.

If the table gets hit often enough, then it'll be in your filesystem
cache anyway. See the many discussions of sizing shared_buffers in
the archives of this list for thoughts on how big that should be.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Badger 2003-08-29 14:26:58 Re: FE/BE Protocol - Specific version
Previous Message Tom Lane 2003-08-29 14:24:14 Re: Obscure: correctness of lock manager???

Browse pgsql-performance by date

  From Date Subject
Next Message Bill Moran 2003-08-29 14:46:44 Re: PL/pgSQL functions - text / varchar - havy performance
Previous Message Andrew Sullivan 2003-08-29 14:05:08 Re: Hardware recommendations to scale to silly load