Skip site navigation (1) Skip section navigation (2)

PostgreSQL caching

From: Vitaly Belman <vitalib(at)012(dot)net(dot)il>
To: Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: PostgreSQL caching
Date: 2004-05-21 14:42:09
Message-ID: 40782517171.20040521174209@012.net.il (view raw or flat)
Thread:
Lists: pgsql-performance
Hello,

I have the following problem:

When I run some query after I just run the Postmaster, it takse
several seconds to execute (sometimes more than 10), if I rerun it
again afterwards, it takes mere milliseconds.

So, I guess it has to do with PostgreSQL caching.. But how exactly
does it work? What does it cache? And how can I control it?

I would like to load selected information in the memory before a user
runs the query. Can I do it somehow? As PostgreSQL is used in my case
as webserver, it isn't really helping if the user has to wait 10
seconds every time he goes to a new page (even if refreshing the page
would be really quick, sine Postgre already loaded the data to
memory).

P.S If the query or its EXPLAIN are critical for a better
understanding, let me know.

Regards,
 Vitaly Belman
 
 ICQ: 1912453
 AIM: VitalyB1984
 MSN: tmdagent(at)hotmail(dot)com
 Yahoo!: VitalyBe


Responses

pgsql-performance by date

Next:From: Rosser SchwarzDate: 2004-05-21 15:29:37
Subject: Re: PostgreSQL caching
Previous:From: Tom LaneDate: 2004-05-20 22:14:52
Subject: Re: Wierd context-switching issue on Xeon

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group