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

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

RE: Enable Constraint

From: <Jared.Still_at_radisys.com>
Date: Wed, 19 Dec 2001 15:27:56 -0800
Message-ID: <F001.003E0C64.20011219150527@fatcity.com>

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_at_LIFE       To:     Multiple recipients of list ORACLE-L 
<ORACLE-L_at_fatcity.com>        
                    TOUCH.COM>            cc:                                          
                              
                    Sent by:              Subject:     RE: Enable Constraint           
                              
                    root_at_fatcity.co                                                    
                              
                    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.
dwilliams_at_lifetouch.com

-----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: 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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: DENNIS WILLIAMS INET: DWILLIAMS_at_LIFETOUCH.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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Jared.Still_at_radisys.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 - 17:27:56 CST

Original text of this message

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