Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CA8D62E3010 for ; Sun, 13 Jan 2008 07:14:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 26467-02 for ; Sun, 13 Jan 2008 07:14:05 -0400 (AST) Received: from mail.planwerk6.de (taube.planwerk6.de [88.198.1.9]) by postgresql.org (Postfix) with ESMTP id A5F632E301B for ; Sun, 13 Jan 2008 07:14:05 -0400 (AST) Received: from localhost (taube.planwerk6.de [127.0.0.1]) by mail.planwerk6.de (Postfix) with ESMTP id 78A0285C203 for ; Sun, 13 Jan 2008 12:14:02 +0100 (CET) Received: from mail.planwerk6.de ([127.0.0.1]) by localhost (mail.planwerk6.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15771-13 for ; Sun, 13 Jan 2008 12:14:02 +0100 (CET) Received: from janning-home1.local (p5085A3AC.dip0.t-ipconnect.de [80.133.163.172]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.planwerk6.de (Postfix) with ESMTP id D3DDB85C14C for ; Sun, 13 Jan 2008 12:14:01 +0100 (CET) From: Janning Vygen Organization: PLANWERK 6 To: pgsql-general@postgresql.org Subject: Re: Prepared Statements Date: Sun, 13 Jan 2008 12:13:55 +0100 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) References: <200801092002.15417.mljv@planwerk6.de> <24034.1200181610@sss.pgh.pa.us> In-Reply-To: <24034.1200181610@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801131213.55570.vygen@planwerk6.de> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at planwerk6.de X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/778 X-Sequence-Number: 126985 Am Sonntag 13 Januar 2008 00:46:50 schrieb Tom Lane: > Kris Jurka writes: > > On Thu, 10 Jan 2008, mljv@planwerk6.de wrote: > >> What do you mean with "longer lifespan"? Doesn't the JDBC driver uses > >> the PREPARE Sql Statement and therefore the prepared Statement has the > >> same lifespan as the connection? If so, as connections are pooled and > >> never closed, the prepared Statement will last forever. What if the > >> table analyzes changes and a better execution plan could be found? > > > > Data and stats changes do not trigger a replan. > > Note that this is no longer true as of 8.3: a stats update from ANALYZE > (either manual or autovacuum) will trigger invalidation of cached plans. great, i have too look out for 8.3, but i am quite happy with 8.1 because of automatic security updates coming with debian out of the box. I have to look for another way to replan. Maybe i just have to close and reopen my connections from time to time. kind regards Janning