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

From Vladimir Sitnikov
Subject Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102
Date
Msg-id CAB=Je-G32oaYHpJFNL-ECfDoA+VVAHBf0nV_huCMq77XBeiAtg@mail.gmail.com
Whole thread Raw
In response to Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
>If plan is ok for one value parameters, then can be pretty bad for following parameters.

Happy statements are all alike; every unhappy statement is unhappy in
its own way (see [1]).
If user is sending different kinds of parameters, he is shooting in the foot.

>Albe's proposal can be good enough for 2/3 cases and it doesn't block any other enhancing

Albe's proposal effectively disables plan cache, thus it blocks enhancing.
If a user goes "replan every time" route, there is no way you
introduce plan caching there.

[1]: https://en.wikipedia.org/wiki/Anna_Karenina_principle

Vladimir



pgsql-hackers by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102
Next
From: Tom Lane
Date:
Subject: Re: pg_dump and premature optimizations for objects not to be dumped