Re: planner issue with constraint exclusion

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: planner issue with constraint exclusion
Дата
Msg-id 1229372042.6678.208.camel@jd-laptop.pragmaticzealot.org
обсуждение исходный текст
Ответ на Re: planner issue with constraint exclusion  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: planner issue with constraint exclusion  (Stephen Frost <sfrost@snowman.net>)
Re: planner issue with constraint exclusion  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 2008-12-15 at 14:28 -0500, Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.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 nullday              | date    | not
nullnum_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 nullday              | date    | not
nullnum_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
 



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

Предыдущее
От: Martin Pihlak
Дата:
Сообщение: Re: SQL/MED compatible connection manager
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Sync Rep: First Thoughts on Code