Re: Foreign key constraints or indexes...which comes first?

From: Roger Snowden <snowden_at_haven.ios.com>
Date: 1995/09/19
Message-ID: <43n2ra$dij_at_news.ios.com>#1/1


BiggsBM (biggsbm_at_aol.com) wrote:
: Does anyone know if creating an index before creating foreign keys is any
: faster than creating the foreign keys first? Or is there really no
: difference in speed since Oracle has to go through all of the values
: anyway for both the foreign key and index creation?

If you mean indexing the column on the parent table, to which the fk constraint refers, it must be faster to create the index before applying the constraint. For each row of the child table, Oracle must locate the fk value in the parent table. Gotta have an index if the table of of any significant size at all.

Roger Received on Tue Sep 19 1995 - 00:00:00 CEST

Original text of this message