Document Type | Technical Information
Category | Administration
Document Number | TADTI063
Overview
This explains the internal procedures that are performed when adding a column to a table.
Method
Behavior When Adding Columns to a Table
1. Column Validity and Information Check
- A semantic check is performed on the newly added column, and the column information is verified and processed.
2. Enter Column Information
_dd_coltable is updated with the information of the corresponding column.
3. If the Existing Table Has LONG or LONG RAW Type Columns
- The
col_novalue of the LONG column is modified.
- A physical operation to push the LONG column to the back is also performed.
4. If the Newly Added Column is of LOB Type
_dd_lobis updated with lob-related information.
- A LOB Segment is created.
5. When a Default Value is Specified
- An update operation occurs to set the data for the newly added column in all rows.
6. When Constraints are Created Together
VALIDATEoption triggers a validity check. Depending on the need, aSELECToperation may be performed.
- If a Primary Key or Unique constraint is set, an index creation operation is also performed. The basic operation is similar to the
CREATE INDEXoperation.
CautionOperations That May Take a Long Time When Adding Table Columns
Physical relocation of LONG columns
When a default value is specified
When theVALIDATEoption is specified during constraint creation and an index must be created