Constraint exclusion can't process simple constant expressions?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Constraint exclusion can't process simple constant expressions?
Дата
Msg-id 4DAF70FD.7000609@agliodbs.com
обсуждение исходный текст
Ответы Re: Constraint exclusion can't process simple constant expressions?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
All,

Apparently our CE is unable to deal with even moderately complex
expressions.  For example, given a CE check constraint of:

    "chk_start" CHECK (start >= '2011-01-31 00:00:00-05'::timestamp with
time zone AND start < '2011-03-01 00:00:00-05'::timestamp with time zone)

PostgreSQL CE is unable to figure out not to scan this partition for a
query which contains the following filter condition:

         WHERE start >= '2010-11-01'::timestamptz
           AND start < ('2010-11-30'::timestamptz + '1
day'::interval)::timestamptz

Even though it can figure out this one:

         WHERE call_start >= '2010-11-01'::timestamptz
           AND call_start < '2010-12-01'::timestamptz

I understand why now() is a problem for CE, but I'd expect that it could
at least handle a simple expression with immutable outputs.

We need a new form of partitioning ...

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

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

Предыдущее
От: Shaun Thomas
Дата:
Сообщение: Re: postgresql random io test with 2 SSD Kingston V+100 500GB in (software) Raid1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Constraint exclusion can't process simple constant expressions?