Re: Is there any method to keep table in memory at startup - Mailing list pgsql-hackers

From scott.marlowe
Subject Re: Is there any method to keep table in memory at startup
Date
Msg-id Pine.LNX.4.33.0404271450380.6234-100000@css120.ihs.com
Whole thread Raw
In response to Is there any method to keep table in memory at startup  (vinayj@ncst.ernet.in)
Responses Re: Is there any method to keep table in memory at startup  (Vinay Jain <vinayj@sarathi.ncst.ernet.in>)
List pgsql-hackers
On Wed, 21 Apr 2004 vinayj@ncst.ernet.in wrote:

> Hi
> I am working on a project in postgres..in which i designed customized data type
> and operations on it.it requires a look up table..
> I have three options regarding this table...
> 1. Every time a query is executed it creates table assigns values and after
> execution destroys it...which is overhead..
> 
> 2. store table on disk in database and access it whenever required but it
> degrades the performance
> 
> 3. whenever psql starts it can load the table in memory from database which is
> efficient way to do

PostgreSQL has no facility to put tables into memory.

Assuming this lookup table will be hit quite often, it WILL be in memory 
for selects.  updates / deletes / inserts will have to get flushed out to 
disk of course.

the Linux and BSD kernels are both quite good at keeping commonly used 
data in memory.  I think you are mistaken in assuming that an "on disk" 
table will be significantly slower than if it was fixed in memory due to 
the very efficient cachine of the most common unix kernels.



pgsql-hackers by date:

Previous
From: Chris Travers
Date:
Subject: Re: [pgsql-advocacy] What can we learn from MySQL?
Next
From: Rod Taylor
Date:
Subject: Re: PITR Phase 2 - Design Planning