Postgres Cache usage

From: A J <s5aly(at)yahoo(dot)com>
To: PG Admin <pgsql-admin(at)postgresql(dot)org>
Subject: Postgres Cache usage
Date: 2012-09-19 16:36:57
Message-ID: 1348072617.30485.YahooMailNeo@web163805.mail.gq1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Steve Crawford 2012-09-19 17:38:03 Re: Postgres Cache usage
Previous Message Bruce Momjian 2012-09-19 06:05:38 Re: [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed