X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 76254329E7C for ; Mon, 27 Sep 2004 06:19:08 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 14757-01 for ; Mon, 27 Sep 2004 05:19:04 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9A3E0329E45 for ; Mon, 27 Sep 2004 06:19:01 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i8R5IuZx018767; Mon, 27 Sep 2004 01:18:56 -0400 (EDT) To: Neil Conway Cc: Aaron Werman , Scott Kirkwood , pgsql-performance@postgresql.org Subject: Re: Caching of Queries In-reply-to: <1096261381.25688.741.camel@localhost.localdomain> References: <1096261381.25688.741.camel@localhost.localdomain> Comments: In-reply-to Neil Conway message dated "Mon, 27 Sep 2004 15:03:01 +1000" Date: Mon, 27 Sep 2004 01:18:56 -0400 Message-ID: <18766.1096262336@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/277 X-Sequence-Number: 8405 Neil Conway writes: > I think the conclusion of past discussions about this feature is that > it's a bad idea. Last I checked, MySQL has to clear the *entire* query > cache when a single DML statement modifying the table in question is > issued. Do they actually make a rigorous guarantee that the cached result is still accurate when/if it is returned to the client? (That's an honest question --- I don't know how MySQL implements this.) IIRC, in our past threads on this topic, it was suggested that if you can tolerate not-necessarily-up-to-date results, you should be doing this sort of caching on the client side and not in the DB server at all. I wouldn't try that in a true "client" scenario, but when the DB client is application-server middleware, it would make some sense to cache in the application server. regards, tom lane