Search Postgresql Archives

Re: Does PostgreSQL do bind-peeking? Is `col like '%'` optimized-away by the planner?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 21, 2022 at 9:36 AM Dominique Devienne <ddevienne@xxxxxxxxx> wrote:

for the various cases of empty argN strings, or does the planner do
*bind-peeking*, and thus a single prepared statement would do the job,
and still have different plans used depending on the actual binds?

I'm assuming PostgreSQL does bind-peeking like Oracle, but I don't
know, and I've never read anything yet about that.


A prepared statement either generates a custom plan and, as a side-effect, does bind-peeking, or it uses the single prepared plan it has established and executes that.  It doesn't use bind-peeking to decide among multiple saved prepared plans. There is more to it than that, like a 5 custom plan threshold before abandoning bind-peeking (I think I got that right...).

David J.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux