Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

SQL Reference

Commands

Syntax

Options

Example

 

SQL Reference

Joins

Nested Queries

Set Operations

ON CURSOR | INSTANCE

WITH Options

Commands

Functions

 

INSERTINDEX

INSERTINDEX, UPDATEINDEX, and DELETEINDEX are used to maintain the Omnidex index files, without affecting the data in the database. An application can control exactly what is stored in the Omnidex index files by separating the data updates and index updates.

In some OLTP (On-Line Transaction Processing) applications, like retail sales applications, where data is being added to a database at a nearly constant rate, it may be more efficient to separate the Omnidex index updates from the data updates, eliminating the time it takes to update the indexes from the total transaction time. The index updates can be performed by a separate process using the INSERTINDEX, UPDATEINDEX, and DELETEINDEX commands.

ODXAIM is an Omnidex utility that automatically updates the Omnidex indexes using database triggers. It is the preferred method to perform these types of updates when using the an RDBMS to host an application. The INSERTINDEX, UDPATEINDEX, and DELETEINDEX commands are provided for applications that cannot make use of RDBMS triggers, for instance, flat file database applications.

 

Syntax

INSERTINDEX INTO table [(column-list)] VALUES (value-list) ROWID rowid [ON [INSTANCE] instance] [WITH options]

INSERTINDEX INTO
Required.

table
Required. The name of the table as defined in the Omnidex environment catalog, that the indexes correspond to.

[(column-list)]
Optional. This is a comma-separated list of columns in the table. This list must contain all MDK columns and all columns that are part of a pseudo-column. If any of these columns are omitted, an error will occur. The column list can contain non-MDK columns and can contain a * to include all columns in the table. Non-MDK columns will simply be ignored.

(value-list)
Required. This is a comma-separated list of values that are to be inserted into the index files. The number of elements in the value list must match the number of columns in the column list. Values for non-MDK columns that were included in the column list, can be blank.

ROWID rowid
Required. This is the ROWID (4-byte integer) of the new record. If the table uses redefined rowids, this parameter must contain the redefined rowid value.

[ON [INSTANCE] instance]
Optional. Specify the instance that this command will be executed on. If omitted, the current instance will be used.

[WITH options]
Optional - Specify options to be used for this command.

 

Options

 

 

Example

Assume a record was inserted with the following SQL INSERT INTO statement:

INSERT INTO CUSTOMERS (COMPANY, CONTACT, STATE) VALUES ('Dynamic Information Systems Corporation','Dave Smith','CO')

The INSERTINDEX statement would look like the following:

INSERTINDEX INTO CUSTOMERS (COMPANY, CONTACT, STATE) VALUES ('Dynamic Information Systems Corporation','Dave Smith','CO') ROWID 1001


 

Top