Re: parametrized statements, but always replan?
| От | Kevin Murphy | 
|---|---|
| Тема | Re: parametrized statements, but always replan? | 
| Дата | |
| Msg-id | 4589AB12.9080703@genome.chop.edu обсуждение исходный текст | 
| Ответ на | Re: parametrized statements, but always replan? (Mark Lewis <mark.lewis@mir3.com>) | 
| Ответы | Re: parametrized statements, but always replan? | 
| Список | pgsql-jdbc | 
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.
В списке pgsql-jdbc по дате отправления: