Re: Query performance

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: Query performance
Дата
Msg-id CAL_0b1tnuyMOfFWt8RqtHhjkE9MHxqCsq4iTkPwUR-YptXL3HA@mail.gmail.com
обсуждение исходный текст
Ответ на Query performance  (K P Manoj <kpmanojpg@gmail.com>)
Список pgsql-performance
On Thu, Jun 13, 2013 at 12:49 AM, K P Manoj <kpmanojpg@gmail.com> wrote:
> One of my query treating performance issue on my production server.
> Once i run  query on my parent table with specific condition(hard coded
> value) its uses  only proper child table and its index on explain plan  ,
> but once i am using table conditions (instead of hard coded value), query
> planner is going all the child tables, Can i know where i am worng

From the docs:

"Constraint exclusion only works when the query's WHERE clause
contains constants (or externally supplied parameters). For example, a
comparison against a non-immutable function such as CURRENT_TIMESTAMP
cannot be optimized, since the planner cannot know which partition the
function value might fall into at run time."

http://www.postgresql.org/docs/9.2/static/ddl-partitioning.html#DDL-PARTITIONING-CAVEATS

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

Profile: http://www.linkedin.com/in/grayhemp
Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979
Skype: gray-hemp
Jabber: gray.ru@gmail.com


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

Предыдущее
От: K P Manoj
Дата:
Сообщение: Query performance
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: In progress INSERT wrecks plans on table