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

Home -> Community -> Mailing Lists -> Oracle-L -> Enable Constraint

Enable Constraint

From: Erik Williams <ewilliams_at_brownco.com>
Date: Wed, 19 Dec 2001 11:59:54 -0800
Message-ID: <F001.003E08AB.20011219113629@fatcity.com>

I am having problems re-enabling a foreign key constraint on a large table. The table with the foreign key constraint has 20M rows and the parent table has 1M rows. The foreign key constraint references the primary key of the parent table. I am surprised that the re-enabling is taking so long - 25minutes. I thought that for each record in the foreign key table, a lookup would be done for the existence of a corresponding primary key in the parent table. I though that this should be relatively quick due to the fact that the column is a primary key and therefore indexed. Am I missing something here? Am I being too critical of the time it takes to do 20M index lookups? Am I mistaken about how a foreign key constraint is re-enabled?

Any thoughts would be much appreciated.

Thanks
Erik  

--

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

Author: Erik Williams
  INET: ewilliams_at_brownco.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 Wed Dec 19 2001 - 13:59:54 CST

Original text of this message

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