OnlineIndex

Description

Specifies that the Database painter should use the ONLINE keyword when you create or drop an index on a table so that the index can be created or dropped without locking the table.

NoteWhen to specify OnlineIndex You must specify the OnlineIndex parameter before connecting to the database.

Applies to

Syntax

OnlineIndex='value'

Parameter

Description

value

Specifies that the Database painter should use the ONLINE keyword when you create or drop an index. Values are:

Default

OnlineIndex=0

Usage

In IDS 10.0 and later, the SQL syntax of CREATE INDEX and DROP INDEX supports the ONLINE keyword to create or drop an index in an online environment where the database and its tables are continuously available. When you use the ONLINE keyword to create or drop an index, data definition language (DDL) operations execute without applying an exclusive lock on the table on which the specified index is defined.

If you use CREATE INDEX ONLINE to create an index on a table that other users are accessing, the index is not available until no users are updating the table. If you issue DROP INDEX ONLINE to drop an index, no users can reference the index, but concurrent data manipulation language (DML) operations can use the index until the operations terminate. Dropping the index is deferred until no users are using the index.

You can set the OnlineIndex static DBParm on the System tab page in the Database Profile Setup dialog box for I10 connections to specify that the Database painter should use the ONLINE keyword when you create or drop an index.

NoteClustered index not supported You cannot create a clustered index using online mode because it is not supported by IDS.

Examples

Example 1

To specify that the Database painter use the ONLINE keyword when you create or drop an index in the Database painter: