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 7FE16329E42 for ; Thu, 23 Sep 2004 07:35:51 +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 76423-07 for ; Thu, 23 Sep 2004 06:35:44 +0000 (GMT) Received: from server.gpdnet.co.uk (gpdnet.plus.com [212.56.100.243]) by svr1.postgresql.org (Postfix) with ESMTP id 69AA8329E3C for ; Thu, 23 Sep 2004 07:35:44 +0100 (BST) Received: from gary (unknown [192.168.1.2]) by server.gpdnet.co.uk (Postfix) with ESMTP id EEA9CFB88E for ; Thu, 23 Sep 2004 07:36:05 +0100 (BST) From: "Gary Doades" To: pgsql-performance@postgresql.org Date: Thu, 23 Sep 2004 07:36:11 +0100 MIME-Version: 1.0 Subject: Re: Caching of Queries Message-ID: <41527CEB.18344.26EF6F28@localhost> In-reply-to: <18410.1095883147@sss.pgh.pa.us> References: X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body 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/232 X-Sequence-Number: 8360 On 22 Sep 2004 at 15:59, Tom Lane wrote: > Scott Kirkwood writes: > > What do you think? > > I think this would allow the problems of cached plans to bite > applications that were previously not subject to them :-(. > An app that wants plan re-use can use PREPARE to identify the > queries that are going to be re-executed. > > regards, tom lane > And then there are the people that would like to upgrade and get a performance gain without having to change their programs. A simple conf flag could turn query/plan caching off for all those that rely on each statement being re-planned. This is where SQLServer etc. tend to get big wins. I know from direct comparisons that SQLServer often takes quite a bit longer to parse/plan a select statement than Postgres, but wins out overall from its query/plan caching. Regards, Gary.