Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AF2799FB2EE for ; Tue, 16 Jan 2007 06:29:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 59649-04 for ; Tue, 16 Jan 2007 06:29:16 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by postgresql.org (Postfix) with ESMTP id 445419FB203 for ; Tue, 16 Jan 2007 06:29:16 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so1582261ugf for ; Tue, 16 Jan 2007 02:29:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=p2KRw4cATJQWK1JMdJyRKJuQQmYBnR8ZQL8t70FRGdn0PmXBdAbmgNPdQJE3kXblze3zZkz1KKUFmYjzRoZFFn6cgUNC113Z9VUSY0NiBjBKuFkojCM1l70G2wo7Xf5N72cLTSBXr/28+pSIpjSNxGGEMbD2utqRzLvw+EYNWzE= Received: by 10.67.92.1 with SMTP id u1mr7112256ugl.1168943354655; Tue, 16 Jan 2007 02:29:14 -0800 (PST) Received: by 10.66.244.14 with HTTP; Tue, 16 Jan 2007 02:29:14 -0800 (PST) Message-ID: <52543fce0701160229v35c7fa5fvc2da2d3aebf5a7e0@mail.gmail.com> Date: Tue, 16 Jan 2007 12:29:14 +0200 From: "David Levy" To: "Heikki Linnakangas" Subject: Re: Caching in PostgreSQL Cc: ramachandra.bhaskaram@wipro.com, pgsql-performance@postgresql.org In-Reply-To: <45ACA53E.8080604@enterprisedb.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_87400_14288993.1168943354444" References: <47230CE166B64744B0120173E4C2161E0103E70D@BLR-EC-MBX01.wipro.com> <45ACA53E.8080604@enterprisedb.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/240 X-Sequence-Number: 22841 ------=_Part_87400_14288993.1168943354444 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I am using memcached (http://www.danga.com/memcached/) to cache Postgres ADODB recordsets. It's very efficient but has to be implemented in your own application. On 1/16/07, Heikki Linnakangas wrote: > > ramachandra.bhaskaram@wipro.com wrote: > > We were looking on how to improve the performance of our > > application which is using PostgreSQL as backend. If postgreSQL is > > supporting data page caching in the shared memory then we wanted to > > design our application to read/write using the shared memory rather than > > accessing the DB everytime so that, it will improve the performance of > > our system. > > That's a bad idea. Just design your database schema with performance in > mind, and use PostgreSQL normally with SQL queries. If you must, use a > general-purpose caching library in your application, instead of trying > to peek into PostgreSQL internals. > > -- > Heikki Linnakangas > EnterpriseDB http://www.enterprisedb.com > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > -- David LEVY aka Selenium Zlio.com & Col.fr Blog : http://www.davidlevy.org ZlioShop : http://shop.davidlevy.org ------=_Part_87400_14288993.1168943354444 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I am using memcached (http://www.danga.com/memcached/) to cache Postgres ADODB recordsets.
It's very efficient but has to be implemented in your own application.


On 1/16/07, Heikki Linnakangas <heikki@enterprisedb.com> wrote:
ramachandra.bhaskaram@wipro.com wrote:
>       We were looking on how to improve the performance of our
> application which is using PostgreSQL as backend.    If postgreSQL is
> supporting data page caching in the shared memory then we wanted to
> design our application to read/write using the shared memory rather than
> accessing the DB everytime so that, it will improve the performance of
> our system.

That's a bad idea. Just design your database schema with performance in
mind, and use PostgreSQL normally with SQL queries. If you must, use a
general-purpose caching library in your application, instead of trying
to peek into PostgreSQL internals.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org



--
David LEVY aka Selenium
Zlio.com & Col.fr
Blog       : http://www.davidlevy.org
ZlioShop : http://shop.davidlevy.org ------=_Part_87400_14288993.1168943354444--