Talk About Network

Google





Data Bases > Pgsql Interfaces Jdbc > Re: performance...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 1910 of 2101
Post > Topic >>

Re: performance issue

by oliver@[EMAIL PROTECTED] (Oliver Jowett) Mar 27, 2008 at 11:23 PM

Guillaume Cottenceau wrote:
> Kris Jurka <books 'at' ejurka.com> writes:
> 
>> When using a PreparedStatement the server must come up with a plan
>> that works for all parameter values.  Since the parameter is unknown,
>> the generated plan doesn't use an index.  Your options are to
>> interpolate the parameter yourself or connect using the
>> protocolVersion=2 URL option which will make the driver do the
>> interpolation prior to passing the query on to the server.
> 
> Kris, actually, is this behaviour considered a bug or a feature?

It was discussed at some length recently, check the list archives. IIRC 
the consensus was to fix the server - essentially, add a mode where the 
driver can tell the server "please replan this statement every time you 
get new parameters", which would allow all the normal planner 
optimizations (constant folding, etc) to be made since it does not need 
to produce a general-purpose plan for all possible parameter values.

-O

-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
 




 2 Posts in Topic:
Re: performance issue
gc@[EMAIL PROTECTED] (Gu  2008-03-27 10:09:33 
Re: performance issue
oliver@[EMAIL PROTECTED]   2008-03-27 23:23:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 20:24:44 PST 2009.