What is the best way to add new field to an existing Primary Key
memtMay 18 2012 — edited May 19 2012Hi 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