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!

What is the best way to add new field to an existing Primary Key

memtMay 18 2012 — edited May 19 2012
Hi All,
I have a situation which need to add a new field to an existing primary key. The table rows is around 3 millions. Currently there are 3 fields use as PK, there was a unique constraint issue, so now need to add the 4th field to the PK to overcome the issue. The only way I know to do this is

- drop primary key
- re create the primary key with adding the new field

but my concern is that the rows contain 3 millions rows. This table get updated frequently, so I may need to cease user from inserting into this table temporarily. Is there a way to estimate how long it will take to perform this changes ? Or is there a better way ?

Rgrds
Ezree
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2012
Added on May 18 2012
2 comments
236 views