Re: Optimization- Check the set of conditionals on a WHERE clause against CHECK constraints. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Optimization- Check the set of conditionals on a WHERE clause against CHECK constraints.
Date
Msg-id 23660.1454793123@sss.pgh.pa.us
Whole thread Raw
In response to Optimization- Check the set of conditionals on a WHERE clause against CHECK constraints.  (Shubham Barai <shubhambaraiss@gmail.com>)
List pgsql-hackers
Shubham Barai <shubhambaraiss@gmail.com> writes:
> I was searching for project ideas and found this

> 1.Optimization- Check the set of conditionals on a WHERE clause against
> CHECK constraints  on the table being queried and remove any conditionals
> which *must* be true due to the CHECK constraints.

> Is it expensive for  simple queries?

> will it optimize  general queries ?

TBH, it sounds like it would almost always be a waste of planning cycles.
I doubt that typical applications would issue many queries in which such
an optimization would apply.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Explanation for bug #13908: hash joins are badly broken
Next
From: Tomas Vondra
Date:
Subject: Re: Explanation for bug #13908: hash joins are badly broken