Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102
Дата
Msg-id CAFj8pRC3PUgJC85YS1b4iskWT=VB4-wvU=PBF0TJRyLBWgPmGQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Ответы Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Список pgsql-hackers


2016-01-12 17:01 GMT+01:00 Vladimir Sitnikov <sitnikov.vladimir@gmail.com>:
VS>>Why doesn't backend reuse already existing good plan?
PS>this logic is driven by plan cost, not by plan execution time.

It do understand that currently PG replans with $1, $2 and uses
default selectivities for that.

What I am asking is to make PG aware of "previously used bind values",
so it would calculate proper selectivities for $1, $2.

the implementation is simply - but it hard to design some really general - it is task for UI

Pavel

 

PS. It is not the first time the problem bites me, so I hand-crafted a testcase.

 

Vladimir

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: count_nulls(VARIADIC "any")