How much time required to add constraint(s)
Date: Thu, 15 Dec 2011 08:37:34 -0800
I'm trying to determine how much time will be required to build a constraint - something like:
ALTER TABLE <TABLE_NAME> ADD CONSTRAINT <NAME> FOREIGN KEY (<FK_NAME>) REFERENCES <REF_TABLE_NAME> (<REF_COL_NAME) ENABLE;
Testing this, I don't see any operation in v$session_longops, however
the test runs for hours.
There are many of these and we have limited amounts of time to do them - we can do them in batches over time, however, we can't exceed our windows due to performance.
I also don't see anything in v$sql_plan for this SQL_ID...
How, exactly, does Oracle build a constraint?
Ie, what plan/operations does it use.
Is there any way I can estimate time (blocks read, etc.) prior to building the constraint?