Re: planner issue with constraint exclusion
От | Stephen Frost |
---|---|
Тема | Re: planner issue with constraint exclusion |
Дата | |
Msg-id | 20081215204647.GE26233@tamriel.snowman.net обсуждение исходный текст |
Ответ на | Re: planner issue with constraint exclusion ("Joshua D. Drake" <jd@commandprompt.com>) |
Список | pgsql-hackers |
* Joshua D. Drake (jd@commandprompt.com) wrote: > 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. > > I am not sure which plans I should show you as they are function plans > thereby not very useful. Ideally, do a 'raise notice' with the exact string you're passing to EXECUTE, and then run an explain on that. Constraint Exclusion certainly does work when using explain and constants in general. Have you tried adding an explicit cast, ala: EXECUTE 'SELECT l.unit_id FROM foo_stats_day lsd, foo51 l WHERE lsd.a_serv_id = l.unit_id AND lsd.a_serv_id = 1 AND day =''' || temp || '''::date'; Enjoy, Stephen
В списке pgsql-hackers по дате отправления: