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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shubham Barai <shubhambaraiss(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimization- Check the set of conditionals on a WHERE clause against CHECK constraints.
Date: 2016-02-06 21:12:03
Message-ID: 23660.1454793123@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Shubham Barai <shubhambaraiss(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-02-06 21:17:52 Re: Explanation for bug #13908: hash joins are badly broken
Previous Message Tom Lane 2016-02-06 20:55:49 Re: Explanation for bug #13908: hash joins are badly broken