OnlineIndex database parameter
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.

You must specify the OnlineIndex parameter before connecting
to the database.
Controls
-
I10 Informix
Syntax
1 |
OnlineIndex='<span>value</span>' |
Parameter |
Description |
---|---|
value |
Specifies that the Database painter should
|
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 DbParameter 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.

You cannot create a clustered index using online mode because
it is not supported by IDS.
Examples
To specify that the Database painter use the ONLINE keyword
when you create or drop an index in the Database painter:
-
Database profile
Select the Create or Drop Non-Clustered Indexes Without Dropping
Tables check box on the System page in the Database Profile Setup
dialog box. -
Application
Type the following in code:
1SQLCA.DbParameter="OnlineIndex=1"