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: Referential indexes

RE: Referential indexes

From: Mercadante, Thomas F <thomas.mercadante_at_labor.state.ny.us>
Date: Fri, 28 Jan 2005 07:51:43 -0500
Message-ID: <C9995D8C5E0DDA4A8FF9D68EE666CE0702A972A7@exchsen0a1ma>


George,

I agree with Nuno - developers are wrong. As long as there is an index on the child column (either PK or a non-unique index), then it does not matter.

As a test, have your friend try and create the additional index. Oracle may stop him/her saying that the column is already indexed.

If the index is created, run a simple explain plan against a query using the child table. The PK/unique index will *always* be used before the non-unique index.

Good Luck!

Tom

-----Original Message-----
From: Leonard, George [mailto:GLeonard_at_wesbank.co.za] Sent: Friday, January 28, 2005 4:51 AM
To: oracle-l_at_freelists.org
Cc: Desplace, Laura
Subject: Referential indexes

Hi all

Got this query from a developer, or actually they are actually arguing with the DBA team.

Table A - master, acc number field also only column in PK

Table B - Child, acc Number Field acc number is the first column in PK, PK contains 2 more columns.

DBA's are saying we don't need a normal non unique stand alone index on the acc Number field for table B.

Developers want a separate index,

COMMENT? George
=20________________________________________________
George Leonard
Oracle Database Administrator
New Dawn Technologies @ Wesbank
E-mail:gleonard_at_wesbank.co.za
=20

You Have The Obligation to Inform One Honestly of the risk, And As a Person
You Are Committed to Educate Yourself to the Total Risk In Any Activity! Once Informed & Totally Aware of the Risk, Every Fool Has the Right to Kill or Injure Themselves as They See Fit!
=20

ge/oracle-l

_________________________________________________________________________=
__________________________


The views expressed in this email are, unless otherwise stated, those of = the author and not those
of the FirstRand Banking Group an Authorised Financial Service Provider o= r its management.
The information in this e-mail is confidential and is intended solely for=
=20the addressee.

Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribut= ion or any action taken or=20
omitted in reliance on this, is prohibited and may be unlawful. Whilst all reasonable steps are taken to ensure the accuracy and integrit= y of information and data=20
transmitted electronically and to preserve the confidentiality thereof, n= o liability or=20
responsibility whatsoever is accepted if information or data is, for what= ever reason, corrupted=20
or does not reach its intended destination.

=20 ________________________________

--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 28 2005 - 07:54:20 CST

Original text of this message

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