Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: WHERE 1 = 1 (any info on this)
BUT... a lot of the SQL still has rule hints in it for Apps... even though it is touted to be using the CBO extensively...
April Wells
Oracle DBA/Oracle Apps DBA
Corporate Systems
Amarillo Texas
/\
/ \
/ \ \ /
\ >\< \
-----Original Message-----
Sent: Tuesday, October 21, 2003 8:30 AM
To: Multiple recipients of list ORACLE-L
OK, here's the interesting thing. At 8.1.6.3 with optimizer_mode=rule the
statement I'm looking at returns very different explain plans depending on
whether the "1=1" clause is included. It's a complicated join and the
explain plans are over 300 lines so it's not easy to see what's happening.
I'll try with a simpler join.
And yes, I know the RBO is ancient technology these days. =)
Cheers,
Mike
-----Original Message-----
Sent: 21 October 2003 12:05
To: Multiple recipients of list ORACLE-L
I'm pretty sure the optimizer can pick up 1=1 anyway and ignore it as an always-true condition - so you get no benefit.
The most common cause I've seen for 1=1 is so when developers are building dynamic where-clause, they don't need to worry about adding 'where' versus 'and' to the sql string being constructed.
hth
connor
"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day"
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: =?iso-8859-1?q?Connor=20McDonald?= INET: hamcdc_at_yahoo.co.uk Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Hately, Mike (LogicaCMG) INET: mike.hately_at_nedl.co.uk Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). The information contained in this communication, including attachments, is strictly confidential and for the intended use of the addressee only; it may also contain proprietary, price sensitive, or legally privileged information. Notice is hereby given that any disclosure, distribution, dissemination, use, or copying of the information by anyone other than the intended recipient is strictly prohibited and may be illegal. If you have received this communication in error, please notify the sender immediately by reply e-mail, delete this communication, and destroy all copies. Corporate Systems, Inc. has taken reasonable precautions to ensure that any attachment to this e-mail has been swept for viruses. We specifically disclaim all liability and will accept no responsibility for any damage sustained as a result of software viruses and advise you to carry out your own virus checks before opening any attachment. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: April Wells INET: AWells_at_csedge.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Tue Oct 21 2003 - 08:59:32 CDT