pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A J <s5aly@yahoo.com>
To: PG Admin <pgsql-admin@postgresql.org>
Subject: Postgres Cache usage
Date: Wed, 19 Sep 2012 09:36:57 -0700 (PDT)
Message-ID: <1348072617.30485.YahooMailNeo@web163805.mail.gq1.yahoo.com> (raw)

Hi,
I have a read heavy application. I would want it to read from memory as database latency has to be in low milliseconds.
The database is not too big in size and can be fully contained in memory.

With Postgres, if I cache all the tables (by pre-emptive querying such as select * from tables); is it assured that all subsequent queries that have involved where clauses made up of several indexed fields will still hit the cache (unless data is refreshed by writes) ?

Example if my first query is select * from table1. Then if my second query is "select * from table1 where (field1 between v1 and v2) and (field2 between v3 and v4)"; would the second query read from the cache ?

Thanks.

view thread (3+ messages)  latest in thread

Message-ID: <1348072617.30485.YahooMailNeo@web163805.mail.gq1.yahoo.com>
Permalink:  ../1348072617.30485.YahooMailNeo@web163805.mail.gq1.yahoo.com/
Also on:    postgresql.org/message-id/1348072617.30485.YahooMailNeo@web163805.mail.gq1.yahoo.com

 · 

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-admin@postgresql.org
  Cc: s5aly@yahoo.com
  Subject: Re: Postgres Cache usage
  In-Reply-To: <1348072617.30485.YahooMailNeo@web163805.mail.gq1.yahoo.com>

* 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