Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 369A02E0201 for ; Wed, 13 Feb 2008 17:55:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 51738-09 for ; Wed, 13 Feb 2008 17:55:14 -0400 (AST) Received: from outmail136002.authsmtp.com (outmail136002.authsmtp.com [62.13.136.2]) by postgresql.org (Postfix) with ESMTP id D8A912E0200 for ; Wed, 13 Feb 2008 17:55:18 -0400 (AST) Received: from outmail128177.authsmtp.com (outmail128177.authsmtp.com [62.13.128.177]) by punt3.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id m1DLt8bW031868; Wed, 13 Feb 2008 21:55:09 GMT Received: from [192.168.0.3] (85-211-31-42.dyn.gotadsl.co.uk [85.211.31.42]) (authenticated bits=0) by mail.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id m1DLt6iF000772; Wed, 13 Feb 2008 21:55:06 GMT Subject: Re: JDBC, prepared queries, and partitioning From: Simon Riggs To: Stephen Denne Cc: Kris Jurka , Josh Berkus , PostgreSQL - JDBC In-Reply-To: References: <200802131005.30553.josh@agliodbs.com> <1202934864.16770.486.camel@ebony.site> <23221.1202935654@sss.pgh.pa.us> <1202937222.16770.505.camel@ebony.site> Content-Type: text/plain Date: Wed, 13 Feb 2008 21:55:56 +0000 Message-Id: <1202939756.16770.517.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Server-Quench: 56d6e78e-da7e-11dc-9670-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksachtFaQZba1xT HGQLW1xEUlx7XGZ/ aw0fZQBDYEtPQQZr TkxLXVBXCwUmXB11 eloYC29ydwVBf3w+ ZERlXT5eWhB8IEF1 F1MARGpTeGZhPDMC WUZfdx5UcAJLdhoR aVd4ByJDAxANdhEa MyUYCngTER90bGxN WAwVJEgfTQ4SAzMm Rh0ZWX0mG0FNXywp Mx06K1kaHUAeWicA X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:787/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/63 X-Sequence-Number: 18270 On Thu, 2008-02-14 at 10:45 +1300, Stephen Denne wrote: > Simon Riggs wrote > > ISTM we need a way to say "this query's parameters vary wildly at > > execution time, so I really need to re-plan it every time". > > If the wild variations don't affect the cost estimate, they won't affect the plan? Cost estimates are made at planning time. If you don't replan, no, they won't. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com