Re: performance issue

Поиск
Список
Период
Сортировка
Искать
От
Oliver Jowett
Тема
Re: performance issue
Дата
Msg-id
47EB75AC.9010902@opencloud.com
Ответ на
Re: performance issue (Guillaume Cottenceau)
Список
Дерево обсуждения
performance issue Steven varga <varga@yorku.ca>
Re: performance issue Mark Lewis <mark.lewis@mir3.com>
Re: performance issue Kris Jurka <books@ejurka.com>
Re: performance issue Guillaume Cottenceau <gc@mnc.ch>
Re: performance issue Oliver Jowett <oliver@opencloud.com>
Guillaume Cottenceau wrote:
> Kris Jurka  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
В списке pgsql-jdbc по дате отправления
От: Guillaume Cottenceau
Дата:
Сообщение: Re: performance issue
От: Paul Tomblin
Дата:
Сообщение: OT - Query for bit pattern
FAQ