Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ALTER TABLE with NULL column taking long time

Krisanth KumarApr 1 2014 — edited Apr 1 2014

Hi,

I have a table with around 2million records (approx 10GB table size) when I perform the following alter statement its running fast

ALTER TABLE tbl_1 ADD (col_4 NUMBER DEFAULT 100 NOT NULL);

but when I dont give the NOT NULL in the alter statment its taking very long time to complete that i.e ALTER TABLE tbl_1 ADD (col_4 NUMBER DEFAULT 100); after which I make the column as NOT NULL.

Can some one explain why is it happening like this with respect to the point of performance.

Thanks in advance.

This post has been answered by Martin Preiss on Apr 1 2014
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 29 2014
Added on Apr 1 2014
18 comments
27,837 views