> You should first enable novalidate the constraint and then run enable
> validate.
> This way Oracle knows that any *new* DML can't "invalidate" data and can
> calmly scan through the table without locking it, to see whether the rest
of
> the data is valid as well.
Just to avoid misunderstandings
15) I enable a check constraint, and in another session (sid
14) I simultaneously delete a few rows from the table. The delete "waits" on
the enable constraint to complete, and it's waiting on a library cache lock.
Why would that be? At the end of this e-mail you can see the conte
e I see
> something different.
>
> I have a table X (object_id 429995) with about 100 million rows. In one session (sid
> 15) I enable a check constraint, and in another session (sid 14) I simultaneously
> delete a few rows from the table. The delete "waits" on the e
hing
different.
I have a table X (object_id 429995) with about 100 million rows. In one session (sid
15) I enable a check constraint, and in another session (sid 14) I simultaneously
delete a few rows from the table. The delete "waits" on the enable constraint to
complete, and it
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
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
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 -
25