Importing data interactively, Inserting into tables of a join index – Sybase 12.4.2 User Manual

Page 215

Advertising
background image

CHAPTER 5 Moving Data In and Out of Databases

195

Importing data interactively

If you are inserting small quantities of data, you may prefer to enter it
interactively through DBISQL, using the

INSERT

statement

For example, you can insert listed values a single row at a time with the
following command:

INSERT INTO T1

VALUES ( ... )

For more information about the

INSERT

command, see “Using the INSERT

statement”.

Inserting into tables of a join index

You load or insert data into the tables underlying a join index, just as you would
any other indexes. There are only two differences:

The data in a join index must be synchronized before you can use the join
index to resolve queries.

You cannot perform a partial-width insert for tables that participate in a
join index.

When you first create a join index, Adaptive Server IQ synchronizes the join
index for you automatically. It does not matter whether you create the join
index before or after loading. The order also does not affect performance of the
load or synchronization.

Once you have created a join index, however, if you insert or load data into any
of its underlying tables except the top table in the join hierarchy, you must
synchronize it explicitly. To do so, use the

SYNCHRONIZE

command. For the

syntax of this command, see “Synchronizing join indexes” or see the Adaptive
Server IQ Reference.

Once any user has updated any of the tables in a join index, no other user can
update any of the tables underlying that join index until the join index has been
synchronized.

Updating from
different connections
may cause errors

When more than one user inserts into or deletes from different tables that
participate in the same join index, the second user's update will fail unless the
synchronize commits before the second user’s transaction starts. This failure
occurs if either of the following conditions exist:

Advertising