Optimization- Check the set of conditionals on a WHERE clause against CHECK constraints.

Started by Shubham Baraialmost 10 years ago2 messages
#1Shubham Barai
shubhambaraiss@gmail.com

Hello hackers,

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 ?

Any thoughts will be helpful.
Thanks.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Shubham Barai (#1)
Re: Optimization- Check the set of conditionals on a WHERE clause against CHECK constraints.

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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers