pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vitaly Belman <vitalib@012.net.il>
To: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: PostgreSQL caching
Date: Fri, 21 May 2004 17:42:09 +0300
Message-ID: <40782517171.20040521174209@012.net.il> (raw)

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@hotmail.com
 Yahoo!: VitalyBe




view thread (26+ messages)  latest in thread

Message-ID: <40782517171.20040521174209@012.net.il>
Permalink:  ../40782517171.20040521174209@012.net.il/
Also on:    postgresql.org/message-id/40782517171.20040521174209@012.net.il

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: vitalib@012.net.il
  Subject: Re: PostgreSQL caching
  In-Reply-To: <40782517171.20040521174209@012.net.il>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox