Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Adding column with default value

mohitanchliaJul 28 2010 — edited Jul 29 2010
Oracle 11.0.1.7:

I am assing a column with detault value of -1 as below. This table has 60M rows. But according to Oracle docs it's supposed to be fast and shouldn't cause any outage. However what I am seeing is that when I run this ddl it just takes forever to add the column and is also causing timeouts when application is trying to insert rows. Could someone please help me and see if I am doing something wrong or if there is any catch.

http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/11g-schemamanagement.html

http://www.oracle.com/technology/deploy/availability/htdocs/online_ops.htm

These links suggest it should finish in sub seconds and not cause any outage.
ALTER TABLE C_MESSAGE ADD CN Number(19,0) DEFAULT -1; 
Edited by: user628400 on Jul 28, 2010 10:49 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2010
Added on Jul 28 2010
23 comments
184,241 views