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

Home -> Community -> Usenet -> c.d.o.server -> Re: Is index used for constraint enforcement?

Re: Is index used for constraint enforcement?

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Tue, 02 Sep 2003 10:31:25 -0700
Message-ID: <1062523859.253958@yasure>


Marko Kimpel wrote:

>I'm using Oracle 8.1.7.
>
>How can I determine if a given table index is required for enforcement
>of a constraint (e.g. unique or pk constraint)? Didn't find usefull
>information in USER_INDEXES or USER_CONSTRAINTS.
>
>(Assuming the same name of index and constraint does not work since
>Oracle may use an existing index when creating an constraint and thus
>use different names.)
>
>Marko
>
>

Oracle may but you should never allow it. Primary key and unique constraints should always be built with the USING INDEX clause forcing constraint name and index name to be identical.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Tue Sep 02 2003 - 12:31:25 CDT

Original text of this message

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