Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Outer Joins are Evil?

RE: Outer Joins are Evil?

From: Nelson, Allan <anelson_at_miswaco.com>
Date: Tue, 31 Aug 2004 10:59:20 -0500
Message-ID: <7E0DB3A126BA9146AC30744E2B7E4245974406@midhouhqxch01.net.smith.com>


I wonder if they were thinking about indexes on columns that contain nulls=3F It seems that if you specified an outer join the optimizer could not use that index if the column wasn't not null. Just a thought and don't have a test case. Dan Tow's book seemed to indicate that this was the case but don't have it on hand right now.

Allan

-----Original Message-----
=46rom: oracle-l-bounce_at_freelists.org

[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Karen Morton Sent: Tuesday, August 31, 2004 10:54 AM
To: oracle-l_at_freelists.org
Subject: RE: Outer Joins are Evil=3F

Sounds like excuses...not reasons. What evidence do they provide to support their conclusion that outer joins are bad=3F It looks a bit like an attempt to disguise a fear of doing full table scans or something like that.

Outer joins, like pretty much everything else, are not "inherently evil". They are another option/tool to be used appropriately when and where needed. While I don't disagree with using default values in FK columns and the like, doing it only with the justification of avoiding outer joins is a bit near-sighted. Eliminating any one thing out of
=66ear of what "it" may do seems to me to be more a fear of poorly written
code as a result of misusing the feature. If it's really the fear of bad code, then teach people how to properly use the tool and do not take the tool out of the box entirely instead.

Karen Morton
Hotsos Enterprises, Ltd.
http://www.hotsos.com
Upcoming events at http://www.hotsos.com/education/schedule.html

=20

-----Original Message-----
=46rom: oracle-l-bounce_at_freelists.org

[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Barr, Stephen Sent: Tuesday, August 31, 2004 8:04 AM
To: Oracle-L_at_freelists.org
Subject: Outer Joins are Evil=3F

I'm currently working on a datawarehouse project (~5 Tb) where the decision has been made to avoid performing outer joins.
=20

The reasons given for this seem to be -
=20

1. Simplifies user navigation of the structures - i.e. avoids outer joins.=20

2.	Outer joins are slow and should be avoided at all costs.=20
3.	If an FK is missing it is populated with a default value which
will
relate to an actual row in the target table, hence no rows will ever be dropped - again, supposedly this is to simply SQL and avoid outer joins.

=20

What they actually do is populate each table in the structure with three default rows with an SK of 0, 1 & 2. Any FK's which are missing, not applicable or invalid will point to one of these rows.
=20

Now....my question is....what is so inherently evil about outer joins that we go to this extreme to avoid them=3F
=20

AND...has anyone else seen something like this deployed in other places=3F
=20

Thanks,
=20

Steve.
=20
=20
=20



Information in this email may be privileged, confidential and is=20 intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce,=20 distribute, store, retransmit, use or disclose its contents to anyone.
=20

Please note we reserve the right to monitor all e-mail communication through our internal and external networks.


Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/

=46AQ is at http://www.freelists.org/help/fom-serve/cache/1.html
----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/
=46AQ is at http://www.freelists.org/help/fom-serve/cache/1.html
----------------------------------------------------------------- ___________________________________________________________________________= ___ This email is intended solely for the person or entity to which it is = addressed and may contain confidential and/or privileged information. = Copying, forwarding or distributing this message by persons or entities = other than the addressee is prohibited. If you have received this email in = error, please contact the sender immediately and delete the material from = any computer. This email may have been monitored for policy compliance. = [021216] ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------
Received on Tue Aug 31 2004 - 10:57:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US