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 -> Constraints and indexes

Constraints and indexes

From: Luc Gyselinck <Luc.Gyselinck_at_nospampandora.be>
Date: Mon, 20 Oct 2003 22:25:38 GMT
Message-ID: <ChZkb.93491$1d3.4332642@phobos.telenet-ops.be>


We are running Oracle 8.1.7.4.0

I am in a never ending discussion about how primary keys and unqiue keys should be created. So I need a third opinion.

One camp says one should create constraints first with the USING INDEX clause, so the indexes that support the constraints, are created first. The other indexes are created afterwards.

The other camp says that one can create the indexes first and the constraints afterwards. The constraints will (using Tom Kyte's words) 'kidnap' an index. Of course, you can end up with constraints that do not use the 'correct' index. Does it matter? Constraints are constraints, indexes are indexes!

What if the first camp does an export of the database, followed by an import into another? Import creates the indexes first and then the constraints, wright?

--
Luc Gyselinck
Received on Mon Oct 20 2003 - 17:25:38 CDT

Original text of this message

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