| From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
|---|---|
| To: | K P Manoj <kpmanojpg(at)gmail(dot)com> |
| Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: Query performance |
| Date: | 2013-06-13 09:03:43 |
| Message-ID: | CAL_0b1tnuyMOfFWt8RqtHhjkE9MHxqCsq4iTkPwUR-YptXL3HA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On Thu, Jun 13, 2013 at 12:49 AM, K P Manoj <kpmanojpg(at)gmail(dot)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(dot)ru(at)gmail(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2013-06-16 15:04:53 | Re: In progress INSERT wrecks plans on table |
| Previous Message | K P Manoj | 2013-06-13 07:49:56 | K P Manoj has invited you to open a Google mail account |