Mark Lewis wrote:
> Set the prepareThreshold to 0, meaning that it will never create a
> "real" server-side prepared statement.
Hmm, even by default (without specifying prepareThreshold), it seems
that the planner looks at the parameter values for the first execution
of the query. (See my post a couple minutes ago*). Am I mistaken?
If I'm not mistaken, then for one-shot queries, is there any any
additional advantage to setting prepareThreshold to 0?
BTW, is the default value of prepareThreshold is 1?
Thanks,
Kevin Murphy
* From my post a couple of minutes ago:
> OK, PG definitely plans based on the parameter value. I turned on
> plan logging in the server log, and without specifying
> prepareThreshold at all (e.g. setting it to 0), I can see that PG is
> making different plan [cost] estimates for different parameter values.