RE: A Cure for Madness

  • From: "Lex de Haan" <lex.de.haan@xxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 2 Sep 2004 11:25:38 +0200

in case this message arrives twice, my apologies. I removed some quoting
this time ;-)

I agree Niyi -- just to add my two cents:

The SQL language is missing/lacking functionality to implement this
properly.
in relational algebra, "(R WHERE P) WHERE Q" is logically equivalent with "R
WHERE P AND Q" which is also equivalent with the other two permutations.

Obviously, the example that started this thread shows that SQL doesn't have
corresponding syntax -- because apparently there are cases where these
transformations are *not* allowed.

See bug 2235753 for an interesting similar case (unfortunately most, if not
all, of the bug text is hidden I believe) and I think the only "workaround"
in Oracle is to use hints like NO_MERGE or ORDERED_PREDICATES.

I don't think we would like the Oracle optimizer to stop considering
subquery flattening, view merging, and predicate pushing in all "possibly
suspect" cases, right?

Kind regards,
Lex.

-------------------------------
visit http://www.naturaljoin.nl
-------------------------------
skype me <callto://lexdehaan>

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Niyi
Sent: Wednesday, September 01, 2004 23:28
Subject: Re: Re[2]: A Cure for Madness

I personally think Oracle's to_number is working as it should, throwing an
exception if you try to convert an invalid number, not SILENTLY converting
it to null. The fundamental issue here is with predicate ordering
determining the result of a query. I don't know the solution to this issue,
but I know that  to_number is just one of the scenarios that can run into
it.


-- Binary/unsupported file stripped by Ecartis --
-- Type: text/x-vcard
-- File: Lex de Haan.vcf


---
To unsubscribe - mailto:oracle-l-request@xxxxxxxxxxxxx&subject=unsubscribe 
To read recent messages - //freelists.org/archives/oracle-l/09-2004

Other related posts: