Re: Allow use of immutable functions operating onconstants with constraint exclusion

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Allow use of immutable functions operating onconstants with constraint exclusion
Дата
Msg-id 1178905859.10861.382.camel@silverbirch.site
обсуждение исходный текст
Ответ на Re: Allow use of immutable functions operating on constants with constraint exclusion  ("Marshall, Steve" <smarshall@wsi.com>)
Список pgsql-hackers
On Tue, 2007-05-08 at 08:08 -0400, Marshall, Steve wrote:

> I think the optimization could work if you could exclude prepared 
> statements.  However, I looked at the planning code and found no clear
> way to distinguish between a statement being prepared for later 
> execution, and a statement being planned only for immediate execution.
> As a result, I don't think stable functions can (or should) be
> expanded to help optimize queries using constraint exclusion. 

I think it should be possible to tell the difference between planned and
immediate-execution queries. Anything coming thru exec_simple_query can
be tagged as immediate-execution, so should be allowed to make the
evaulation of stable functions in the planner as being accurate for the
rest of the statement execution also.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: race condition in pgplsql call handler?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] Arrays of Complex Types