Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TENGn-0003MJ-0s for pgsql-admin@postgresql.org; Wed, 19 Sep 2012 16:37:01 +0000 Received: from nm21.bullet.mail.sp2.yahoo.com ([98.139.91.91]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TENGl-0002oT-LW for pgsql-admin@postgresql.org; Wed, 19 Sep 2012 16:37:00 +0000 Received: from [72.30.22.93] by nm21.bullet.mail.sp2.yahoo.com with NNFMP; 19 Sep 2012 16:36:58 -0000 Received: from [72.30.22.38] by tm15.bullet.mail.sp2.yahoo.com with NNFMP; 19 Sep 2012 16:36:58 -0000 Received: from [127.0.0.1] by omp1068.mail.sp2.yahoo.com with NNFMP; 19 Sep 2012 16:36:58 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 209398.60176.bm@omp1068.mail.sp2.yahoo.com Received: (qmail 49887 invoked by uid 60001); 19 Sep 2012 16:36:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1348072617; bh=Z3bdMg2Ua0cKtJd/r3WRW1wOK9EQ2d38ILLONfPOF3o=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=vSkrCFx0A0FjLLnlOPR3QpogIyoP1az4CMYHbiiHRtRk8K1NkTAu7IdWssD8X1KEIY3DqnDCkCGDPc4RmzCYcyhFtKC31bD+GSjHb42FQK84izce9LOH02Bh7VN8ESKIBiL7Da/5tDyNnsYdCnV9qI+Bjkd83MKsfvAtrQksCTM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=nJ+z0BX36VhR4UanhhAU/Ms2mA0iWoLDItip6/6UG+WX4pqZv2IfcavWjikkVJZdwA8wGwqmOJdvsTVqhZtHVw+kgjn9Do2IsaXjfVeZ1lE8HIgrLaqnVVzCkgj4XAtBJLo62skouG6w0Roqnp6SrZclY4bDJB/RDcSAGFbYUOM=; X-YMail-OSG: sK2qa1wVM1mzDxP2AWmaUh9YcshnE3JpQbEiXKW5Fgy7Vxt PuPAs7E0fGYjcMVe42VwOyQb7QV0v.ZnXvcP2gGzU_5ldWzp9SGUcgbAEyWj NpxWR7dM_wZ8Dz7Ohiv5eNsrvb8uC7qE_TZ_rAsN8kdE3dXD6s07pPgVKXS. rmWZ1nl0lQRpeqbg52axq27HbhQMC6ok.hKNOMy90PFmHOhdghpTFA.rQL4x OlU0fpfkZfK6mEr05xdgZgMHZqdK_2rQPGs6qgrI1iaGiwgpT15AkkJUL4lB T_0Se8AbgMK_a4eZ2SHV_m2IzUWuV8YDM0PeYKNc4AW58sSwkj15B.r8wkXX Vn1DYfLq832piDsAtnes2U9W3rq6YtftDd_lwcp.FWyjmnxkC2hgiXDI3H2r cpNnx3hzm Received: from [64.61.91.74] by web163805.mail.gq1.yahoo.com via HTTP; Wed, 19 Sep 2012 09:36:57 PDT X-Mailer: YahooMailWebService/0.8.121.416 Message-ID: <1348072617.30485.YahooMailNeo@web163805.mail.gq1.yahoo.com> Date: Wed, 19 Sep 2012 09:36:57 -0700 (PDT) From: A J Reply-To: A J Subject: Postgres Cache usage To: PG Admin MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-352802979-16857336-1348072617=:30485" X-Pg-Spam-Score: 0.3 (/) X-Archive-Number: 201209/103 X-Sequence-Number: 40044 ---352802979-16857336-1348072617=:30485 Content-Type: text/plain; charset=us-ascii 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. ---352802979-16857336-1348072617=:30485 Content-Type: text/html; charset=us-ascii
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.
---352802979-16857336-1348072617=:30485--