Re: Optimizing prepared statements
От | Tom Lane |
---|---|
Тема | Re: Optimizing prepared statements |
Дата | |
Msg-id | 14008.1157302341@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Optimizing prepared statements ("Jeroen T. Vermeulen" <jtv@xs4all.nl>) |
Ответы |
Re: Optimizing prepared statements
|
Список | pgsql-hackers |
"Jeroen T. Vermeulen" <jtv@xs4all.nl> writes: > If multiple cached plans can be applied to a given call, we prefer the one > that optimizes away the most parameters. What exactly do you mean by "optimize away a parameter"? The way you described the mechanism, there are no parameters that are "optimized away", you've merely adjusted selectivity predictions using some assumed values. Actually converting a parameter to a constant is a whole 'nother matter --- it allows constant-folding for example. But then you *cannot* use the plan unless there's an exact match to the assumed value. These two approaches provide very different tradeoffs of plan quality vs plan specificity, so it makes me uncomfortable that you're failing to clarify what you mean. regards, tom lane
В списке pgsql-hackers по дате отправления: