When a new column is added to an existing table, only the table description in the system catalog is modified, so access time to the table is not affected immediately. Existing records are not physically altered until they are modified using an UPDAT...
显示全部When a new column is added to an existing table, only the table description in the system catalog is modified, so access time to the table is not affected immediately. Existing records are not physically altered until they are modified using an UPDATE statement. When retrieving an existing row from the table, a null or default value is provided for the new column, depending on how the new column was defined. Columns that are added after a table is created cannot be defined as NOT NULL: they must be defined as either NOT NULL WITH DEFAULT or as nullable.
So because the existing rows are not changed at the time of the ALTER, they are shorter than any new rows. They will stay like this until they are updated or the table is REORGed. When the update happened, if no enough space around the record, there will be a page reorg or even a overflow.
So reorg the table after that is a good idea.
收起