Re: "Constraint exclusion" is not general enough

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Martin Lesser <ml-pgsql(at)bettercom(dot)de>
Subject: Re: "Constraint exclusion" is not general enough
Date: 2006-08-04 21:54:35
Message-ID: 18043.1154728475@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> On Fri, Aug 04, 2006 at 02:40:30PM -0400, Tom Lane wrote:
>> I would argue that turning on constraint_exclusion ought to instruct
>> the planner to catch this sort of thing, whereas when it's off we
>> ought not expend the cycles. I have a preliminary patch (below)
>> that seems to fix it.

> How many cycles are we talking about here? Is it even worth the GUC?

I think so. On simple queries the optimization will *never* fire,
and there's no point in doing the search. People who are running
complex queries will want to turn it on, but the mysql-equivalent
crew will just find it a waste of cycles.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-08-04 22:24:42 log_statement output for protocol prepare/bind/execute
Previous Message Joshua D. Drake 2006-08-04 21:52:00 Re: 8.2 features status