Issue for partitioning with extra check constriants

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Issue for partitioning with extra check constriants
Дата
Msg-id 4CA672D7.3070405@agliodbs.com
обсуждение исходный текст
Ответы Re: Issue for partitioning with extra check constriants  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Simon, Greg, etc.,

Just barked my nose against a major performance issue with CE &
partitioning, and was wondering if anyone had poked at it.

The issue is this: when a partitioned table is evaluated by the planner
for constraint exclusion, it evaluates ALL check constraints on each
partition, regardless of whether or not they include a referenced column
in the query (and whether or not they relate to partitioning).  If some
of those check constraints are expensive (like GIS functions) then this
can add considerably (on the order of 2ms per partition) to planning time.

If this is news to anyone, I have a nice test case.

So ... how plausible is it to fix the planner so that it only evaluates
check constraints on a partition if there is a match of referenced
columns?  Are we talking "moderate", "hard" or "nearly impossible"?

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

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

Предыдущее
От: Willy-Bas Loos
Дата:
Сообщение: Re: turn off caching for performance test
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Issue for partitioning with extra check constriants