Re: Can we load all database objects in memory?

From: Steve Midgley <science(at)misuse(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Can we load all database objects in memory?
Date: 2009-03-26 16:38:58
Message-ID: 20090326165531.E00196342BF@mail.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

At 09:20 AM 3/26/2009, pgsql-sql-owner(at)postgresql(dot)org wrote:
>Message-Id: <587E5DF3-5859-48DE-93F9-F7B05C37E6D8(at)rvt(dot)dds(dot)nl>
>From: ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
>To: DM <dm(dot)aeqa(at)gmail(dot)com>
>In-Reply-To:
><eae6a62a0903251220p2edd379en50d17541edef065f(at)mail(dot)gmail(dot)com>
>Subject: Re: Can we load all database objects in memory?
>Date: Wed, 25 Mar 2009 15:07:21 -0500
>References:
><eae6a62a0903251220p2edd379en50d17541edef065f(at)mail(dot)gmail(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message Dominik Piekarski 2009-03-27 12:10:50 Add: Special sort querstion
Previous Message Pavel Stehule 2009-03-26 16:30:44 Re: Table to Excel