Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0B2142E0094 for ; Wed, 13 Feb 2008 17:51:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06899-05 for ; Wed, 13 Feb 2008 17:50:59 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id DFBF62E0200 for ; Wed, 13 Feb 2008 17:50:59 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m1DLocSY024211; Wed, 13 Feb 2008 16:50:38 -0500 (EST) To: "Stephen Denne" cc: "Simon Riggs" , "Kris Jurka" , "Josh Berkus" , "PostgreSQL - JDBC" Subject: Re: JDBC, prepared queries, and partitioning 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> Comments: In-reply-to "Stephen Denne" message dated "Thu, 14 Feb 2008 10:45:52 +1300" Date: Wed, 13 Feb 2008 16:50:38 -0500 Message-ID: <24210.1202939438@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/62 X-Sequence-Number: 18269 "Stephen Denne" writes: > Isn't it more a case of > "even a minor variation in just one of this query's parameters can result in wildly different cost estimate, > so I really need to re-plan it every time." The $64 problem is not that; it is that certain optimizations will not be applied, period, unless the planner is dealing with values known at plan time. regards, tom lane