At 09:20 AM 3/26/2009, pgsql-sql-owner@postgresql.org wrote:
>Message-Id: <587E5DF3-5859-48DE-93F9-F7B05C37E6D8@rvt.dds.nl>
>From: ries van Twisk <pg@rvt.dds.nl>
>To: DM <dm.aeqa@gmail.com>
>In-Reply-To:
><eae6a62a0903251220p2edd379en50d17541edef065f@mail.gmail.com>
>Subject: Re: Can we load all database objects in memory?
>Date: Wed, 25 Mar 2009 15:07:21 -0500
>References:
><eae6a62a0903251220p2edd379en50d17541edef065f@mail.gmail.com>
>X-Archive-Number: 200903/89
>X-Sequence-Number: 32332
>
>The short answer is no, you cannot force PostgreSQL to load all
>objects into memory.
>
>However when you proper configure PostgreSQL most, if not all of
>your
>data will be cached
>by the OS and/or PostgreSQL shared memory system.
>
>On Mar 25, 2009, at 2:20 PM, DM wrote:
>
>>I have a database of 10GB.
>>My Database Server has a RAM of 16GB
>>
>>Is there a way that I can load all the database objects to memory?
Since you have such an abundance of RAM, I'd think you could simulate
this feature by setting up some kind of psql script to pull down all
10gb of data through Postgres when the server first boots - possibly
just a bunch of "select * from [table];" commands for each table in
your catalog. All/most of the data should be cached into RAM by the OS
at that point.
Also, I don't know what the state of the art is regarding RAM disks
these days, but for a read-only database, that seems like an option
(10gb of ram disk for your read-only data and 6 gb of ram for OS and
Pg).
Steve