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

Home -> Community -> Mailing Lists -> Oracle-L -> (Non)Unique Index Vs Unique Constraint

(Non)Unique Index Vs Unique Constraint

From: Jay <jaysingh1_at_optonline.net>
Date: Fri, 16 Jan 2004 19:14:26 -0800
Message-ID: <F001.005DD0B6.20040116191426@fatcity.com>


All,

Please enlighten this Junior DBA.

Which method is more efficient? When should I go for option (1)?

1)NON-UNIQUE index Vs Unique Constraint
drop table index_test;
create table index_test(c1 number,c2 varchar2(20)); create index i1 on index_test(c1);
alter table index_test add constraint index_test_uk1 UNIQUE(c1);

2)UNIQUE index Vs Unique Constraint
drop table index_test;
create table index_test(c1 number,c2 varchar2(20)); create UNIQUE index i1 on index_test(c1); alter table index_test add constraint index_test_uk1 UNIQUE(c1);

Thanks in advance,
Jay
--

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

Author: Jay
  INET: jaysingh1_at_optonline.net

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 Fri Jan 16 2004 - 21:14:26 CST

Original text of this message

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