If it's a simple 'alter table enable constraint' then it's not
building an index, and doesn't even require one on the
child table.

Jared



                                                                                       
                              
                    DENNIS WILLIAMS                                                    
                              
                    <DWILLIAMS@LIFE       To:     Multiple recipients of list ORACLE-L 
<[EMAIL PROTECTED]>        
                    TOUCH.COM>            cc:                                          
                              
                    Sent by:              Subject:     RE: Enable Constraint           
                              
                    [EMAIL PROTECTED]                                                    
                              
                    m                                                                  
                              
                                                                                       
                              
                                                                                       
                              
                    12/19/01 11:55                                                     
                              
                    AM                                                                 
                              
                    Please respond                                                     
                              
                    to ORACLE-L                                                        
                              
                                                                                       
                              
                                                                                       
                              




Erik - I would assume that underneath Oracle is creating an index. One
thing
to check is the SORT_AREA_SIZE for your database. If it is the default
(64K), then building an index can take a long time.
Dennis Williams
DBA
Lifetouch, Inc.
[EMAIL PROTECTED]


-----Original Message-----
Sent: Wednesday, December 19, 2001 1:37 PM
To: Multiple recipients of list ORACLE-L


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

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: [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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

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: [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).




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

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: [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