Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A6ED49FB235 for ; Tue, 26 Sep 2006 10:20:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 53688-08 for ; Tue, 26 Sep 2006 13:20:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 794AC9FB3E7 for ; Tue, 26 Sep 2006 10:20:03 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (84-72-188-217.dclient.hispeed.ch [84.72.188.217]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 3873F65977 for ; Tue, 26 Sep 2006 15:22:24 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 63C64181AC320 for ; Tue, 26 Sep 2006 15:20:04 +0200 (CEST) Message-ID: <45192903.6020806@logix-tt.com> Date: Tue, 26 Sep 2006 15:20:03 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.5 (X11/20060812) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Bind message References: <451846B0.6070906@logix-tt.com> <45184D61.3010007@opencloud.com> <4518E986.3030801@logix-tt.com> <4518FF16.3050804@opencloud.com> <4519166D.9040705@logix-tt.com> <24245.1159276238@sss.pgh.pa.us> In-Reply-To: <24245.1159276238@sss.pgh.pa.us> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/121 X-Sequence-Number: 15839 Hi, Tom, Tom Lane wrote: > Markus Schaber writes: >> Don't forget that, in the current implementation, the query planner has >> no choice but planning the query without any actual parameter values, >> which is likely to give equal or worse results in most cases. > > No, I think you are oversimplifying. What the planner is supposed to do > when given a parameterized query (and no parameter value info) is to > generate a plan that won't be too terribly awful regardless of the > parameter values. With a set of sample values, it may generate a plan > that is great for those values and utterly unusable for anything else. That's why I want to have it configurable, and maybe even disabled by default. When I know that the cases are similar enough, it can be enabled, and possibly benchmarked whether it's really faster (better or equal plan and less planning overhead) or slower (horrible plan due to failure of premise that the cases are similar enough). Thanks, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org