The LOCK MODE setting in an ALTER TABLE statement takes precedence over the settings of the IFX_DEF_TABLE_LOCKMODE environment variable and the DEF_TABLE_LOCKMODE configuration parameter. For information about the IFX_DEF_TABLE_LOCKMODE environment variable, refer to the IBM Informix Guide to SQL: Reference. For information about the DEF_TABLE_LOCKMODE configuration parameter, refer to the IBM Informix Dynamic Server Administrator's Reference.
Use the Logging TYPE options to specify that the table have particular characteristics that can improve various bulk operations on it.
Logging TYPE Options: |--TYPE--(--+-STANDARD---------------+--)-----------------------| +-RAW--------------------+ | (1) | '--------+-OPERATIONAL-+-' '-STATIC------'
Here STANDARD, the default option of the CREATE TABLE statement, is used for online transaction processing (OLTP) databases. The OPERATIONAL and STATIC options are used primarily to improve performance in data warehousing databases.
A table can have any of the following logging characteristics.
The Logging TYPE option can convert a non-logging table, such as a RAW table, to a STANDARD table that supports transaction logging. If you use this feature, you should be aware that the database server does not check to see whether a level 0 archive has been performed on the table.
Operations on a RAW table are not logged and are not recoverable, so RAW tables are always at risk. When the database server converts a table that is not logged to a STANDARD table type, it is your responsibility to perform a level-0 backup before using the table in a transaction or modifying data in the table. Failure to do this might lead to recovery problems in the event of a server crash.
For more information on these logging types of tables, refer to your IBM Informix Administrator's Guide.
The Logging TYPE options have the following restrictions:
Use the ADD TYPE clause to convert a table that is not based on a named ROW data type into a typed table. This clause is an extension to the ANSI/ISO standard for SQL.
ADD TYPE Clause: |--ADD TYPE--row_type-------------------------------------------|
Element | Description | Restrictions | Syntax |
---|---|---|---|
row_type | Identifier of an existing named ROW data type for the table | The row_type fields must match the column data type in their order and number | Identifier, p. Identifier |
When you use the ADD TYPE clause, you assign the specified named ROW data type to a table whose columns match the fields of that data type.
In addition to the requirements common to all ALTER TABLE operations (namely DBA privilege on the database, Alter privilege on the table, and ownership of the table), all of the following must be also true when you use the ADD TYPE clause to convert an untyped table to the specified named ROW data type:
You cannot combine the ADD TYPE clause with any clause that changes the schema of the table. No other ADD, DROP, or MODIFY clause is valid in the same ALTER TABLE statement that has the ADD TYPE clause. The ADD TYPE clause does not allow you to change column data types. (To change the data type of a column, use the MODIFY clause.)
ALTER TABLE supports only the following options for tables of ROW data types.
Typed-Table Options: .-,-------------------------------------------. V | |----+-----------------------------------------+-+--------------| | (1) | +-| ADD CONSTRAINT Clause |---------------+ | (2) | +-| DROP CONSTRAINT Clause |--------------+ | (3) (4) | +--------| MODIFY NEXT SIZE Clause |------+ | (3) (5) | '--------| LOCK MODE Clause |-------------'