yes, I did

]]>Kind regards

—

Kamal

So the purist may say it shouldn’t happen, while the pragmatist might suggest that more cases should take advantage of the optimisation. (Why am I generating undo and redo for a row when I have a constraint that tells me it’s going to be rejected ?)

]]>ok, agree – like many others

see for example

http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2665514800346181577#2666924900346321646

(has someone filed an enhancement request ?)

]]>*
“…if the optimizer were good enough it would be able to infer the “column is not null” condition from any logical equivalent that hadn’t been written by a mathematician with a warped sense of humour, and ought to optimise accordingly”
* ;)

I think your conjecture seems reasonable – an intuitive view (not that I like to trust my intuition) would be that the constraint problem is the tautology problem extended to three-valued logic, and the tautology problem couldn’t be NP-hard if the constraint problem weren’t.

The fact that some reductions to “is not null” may not be feasible doesn’t mean that an explicit “is not null” should be treated differently from a NOT NULL check, though.

]]>http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/#more-1101

Best Regards

Mohamed Houri

]]>I would conjecture – though I cannot prove it – that this ( “given an SQL-Expression expr(column), is it logically equivalent to ‘column is not null’ ?”) is as hard as the tautology problem (“given a Boolean formula, is it equivalent to ‘0=0′ ?”), which is known to be NP-hard

]]>