Re: Bind message - Mailing list pgsql-jdbc

From Markus Schaber
Subject Re: Bind message
Date
Msg-id 45192903.6020806@logix-tt.com
Whole thread Raw
In response to Re: Bind message  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
Hi, Tom,

Tom Lane wrote:
> Markus Schaber <schabi@logix-tt.com> 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

pgsql-jdbc by date:

Previous
From: till toenges
Date:
Subject: Re: bytea memory improvement
Next
From: Luis Vilar Flores
Date:
Subject: Re: bytea memory improvement