Re: Problem with constraint exclusion on partitions

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: Problem with constraint exclusion on partitions
Дата
Msg-id CAKFQuwbzz5-nFoZpc_iJAn6kCT6qtHU-=0MfMHhm7hZEfjpkSw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Problem with constraint exclusion on partitions  ("Mike Pultz" <mike@mikepultz.com>)
Ответы Re: Problem with constraint exclusion on partitions
Список pgsql-general
On Saturday, December 20, 2014, Mike Pultz [via PostgreSQL] <[hidden email]> wrote:
Hey David,

> What version are you using?

Sorry, I'm on 9.3.4.

>Now() is a volatile function so the planner cannot omit partitions.
>
>Replace that with a constant and now it can.

I'm not sure what you mean- now() is a stable function: 

My mistake but unless it is immutable the planner cannot evaluate it, it has to defer to the executor.  The executor can evaluate it a single time for the query but it is still left with the original execution plan given to it by the planner.


it's the timestamp at the start of the transaction- so the planner should
have a set value for all rows. 

Am I missing something else?


Precise responsibility and timing mechanics between the planner and executor which I cannot give adequate exposition on off the top of my head...

David J.



View this message in context: Re: Problem with constraint exclusion on partitions
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

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

Предыдущее
От: "Mike Pultz"
Дата:
Сообщение: Re: Problem with constraint exclusion on partitions
Следующее
От: David G Johnston
Дата:
Сообщение: Re: Problem with constraint exclusion on partitions