Arup Nanda wrote:
> 
> The only indexes that enforce a constaint are primary key and unique key
> indexes. You can easily spot them using
> 
> SELECT INDEX_NAME, OWNER
> FROM DBA_INDEXES
> WHERE UNIQUENESS = 'NONUNIQUE'
> 
> However, beware, there may be some unique indexes that may have been created
> for performance reasons only, even though a secondary intent may be to
> enforce a unique constraint. For instance Social Security Numbers are
> probably unique, guranteed pretty much by the application but an index
> defined on them will be defined as unique as unique indexes perform better.
> Therefore the intent here was not to enforce the constraint but rather to
> design a better index.
> 
> HTH
> 
> Arup Nanda

There may also be another problem, with indexes created on FKs to avoid
deadlocks - not quite 'performance index' as usually accepted even if
they cannot fully be considered as 'constraint indexes'. If you want to
detect them, you have to check in DBA_IND_COLUMNS and DBA_CONS_COLUMNS -
and I feel too lazy to write the query now.

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to