Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Adding a new column
On Sun, 02 Feb 1997 16:44:28 -0800, Bruce Bristol <bbristol_at_ix.netcom.com> wrote:
>Hello,
>
>We have 8 Oracle tables which contain anywhere from 14 to 50 million
>rows (most are around 25M).
>
>We need to add a new column, and I know I can do this.
>
>I'm going to have each table unloaded and truncated for a purge process
>we do quarterly.
>
>What will be better for performance? Adding the new column and then
>reloading the data (which doesn't have the new column at the end), or
>reload the data and then add the column?
>
Whats going into the new column? If you were planning on doing a mass update of the column and putting some value in it, I would suggest you do it (add the column and populate it) before you dump and re-load.
Reason-- avoid migrated rows that will result from the column going from NULL to some non-null value.
Adding the column will happen instantly (it's just a data dictionary update). Adding data to the column will undoubtably cause some of the rows to migrate (since they no long fit on their original page). The migrated rows will affect query performance.
If you are going to populate the column over time with an application, then add the column anytime you want but adjust your PCTFREE accordingly to be able to hold the extra updated information.
>Thank you!
>
>-Bruce
Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com
![]() |
![]() |