From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: planner issue with constraint exclusion |
Date: | 2008-12-15 20:14:02 |
Message-ID: | 1229372042.6678.208.camel@jd-laptop.pragmaticzealot.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 2008-12-15 at 14:28 -0500, Tom Lane wrote:
> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> > Of the functions the only one that will use constraint_exclusion is the
> > one that explicitly passes the date value.
>
> Since you haven't shown us the constraints you're talking about, or the
> resulting plans, it's difficult for anyone to guess what's going on.
Table "public.foo_stats_day"
Column | Type | Modifiers
------------------+---------+-----------
a_serv_id | integer | not null
day | date | not null
num_leads | integer |
num_subscribed | integer |
num_unsubscribed | integer |
num_unverified | integer |
Indexes:
"foo_stats_day_pkey" PRIMARY KEY, btree (a_serv_id, day)
Triggers:
partion_public_foo_stats_day_trigger BEFORE INSERT OR UPDATE ON
lead_stats_day FOR EACH ROW EXECUTE PROCEDURE
partion_public_foo_stats_day()
app=# \d year_2007.foo_stats_day_q1
Table "year_2007.foo_stats_day_q1"
Column | Type | Modifiers
------------------+---------+-----------
a_serv_id | integer | not null
day | date | not null
num_leads | integer |
num_subscribed | integer |
num_unsubscribed | integer |
num_unverified | integer |
Indexes:
"foo_stats_day_pkey_q1" PRIMARY KEY, btree (a_serv_id, day),
tablespace "year_2007_indexes"
Check constraints:
"foo_stats_day_q1_day_check" CHECK (day >= '2007-01-01'::date AND
day < '2007-04-01'::date)
Inherits: foo_stats_day
Tablespace: "year_2007"
I am not sure which plans I should show you as they are function plans
thereby not very useful.
Sincerely,
Joshua D. Drake
>
> regards, tom lane
>
--
PostgreSQL
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2008-12-15 20:21:36 | Re: Sync Rep: First Thoughts on Code |
Previous Message | Martin Pihlak | 2008-12-15 19:55:13 | Re: SQL/MED compatible connection manager |