Re: Cached Query Plans (was: global prepared statements)
От | Csaba Nagy |
---|---|
Тема | Re: Cached Query Plans (was: global prepared statements) |
Дата | |
Msg-id | 1208162078.8259.259.camel@PCD12478 обсуждение исходный текст |
Ответ на | Re: Cached Query Plans (was: global prepared statements) (PFC <lists@peufeu.com>) |
Ответы |
Re: Cached Query Plans (was: global prepared statements)
Re: Cached Query Plans (was: global prepared statements) |
Список | pgsql-hackers |
> The hairiness is in the plan dependence (or independence) on parameter > values, ideally we only want to cache plans that would be good for all > parameter values, only the user knows that precisely. Although it could be > possible to examine the column histograms... If cached plans would be implemented, the dependence on parameter values could be solved too: use special "fork" nodes in the plan which execute different sub-plans depending on special parameter values/ranges, possibly looking up the stats at runtime, so that the plan is in a compiled state with the "decision points" wired in. This of course would mean a lot heavier planning and possibly a lot bigger plans, but you could afford that if you cache the plan. You could even have a special command to plan a query this way. Cheers, Csaba.
В списке pgsql-hackers по дате отправления: