Considerations For Create Index - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

NO POPULATE
specifies that the index is not to be populated when it is created. The indexes are created,
but no data is written to the index, and it is marked offline. You can drop an offline
index with the DROP INDEX statement. The DROP TABLE statement also drops offline
indexes of the specified table. DML statements have no effect on offline indexes. By using
the POPULATE INDEX utility, you can populate an offline index and remove its offline
designation.
POPULATE
Specifies that the index is to be created and populated. If you omit the populate-option,
the default is POPULATE.
file-option is:
{HASH PARTITION BY (partitioning-column, partitioning-column...)}
specifies the partitioning columns. If you do not specify the partitioning columns, the
default is the same partitioning column or columns as the base table for a non-unique
index, and all the columns in the index for a unique index.
Partitioning columns cannot be floating-point data columns.

Considerations for CREATE INDEX

Indexes are created under a single transaction. When an index is created, the following steps
occur:
Transaction begins (either a user-started transaction or a system-started transaction).
Rows are written to the metadata.
Physical labels are created to hold the index (as non audited).
The base table is locked for read shared access which prevents inserts, updates, and deletes
on the base table from occurring.
The index is loaded by reading the base table for read uncommitted access using side tree
inserts.
NOTE:
optimizations because the partitions are not audited and empty.
After load is complete, the index audit attribute is turned on and it is attached to the base
table (to bring the index online).
The transaction is committed, either by the system or later by the requestor.
If the operation fails after basic semantic checks are performed, the index no longer exists and
the entire transaction is rolled back even if it is a user-started transaction.
Authorization and Availability Requirements
An index always has the same security as the table it indexes, so roles authorized to access the
table can also access the index. To create a Neoview SQL index, you must have one of the following
privileges:
be the table or materialized view owner.
be the schema owner.
have the ALTER privilege.
have the ALTER_TABLE privilege for tables.
have the ALTER_MV privilege for materialized views.
When the POPULATE option is specified, CREATE INDEX locks out INSERT, DELETE, and
UPDATE operations on the table being indexed. If other processes have rows in the table locked
when the operation begins, CREATE INDEX waits until its lock request is granted or timeout
A side tree insert is a fast way of loading data that can perform specialized
CREATE INDEX Statement
61

Advertisement

Table of Contents
loading

Table of Contents