1.0

Table Of Contents
Information for the gateway sender is added to the GATEWAYSENDERS table.
CREATE GLOBAL HASH INDEX
Creates an index that contains unique values across all of the members that host a partitioned table's data.
Syntax
CREATE GLOBAL HASH INDEX index-name
ON table-name (
column-name [ , column-name ] * )
Description
A global hash index in SQLFire is like a partitioned table with hash partitioning on the index columns. Only
equality based JOIN Operations involving index columns use the hash index for pruning the set of members
required to service the query. SQLFire creates global hash index implicitly for foreign key and unique key
constraints when the partitioning column differs from the primary key of a table.
The index data itself can reside in multiple members, including members other than those that host the table's
data but restricted to data stores (i.e. members booted with 'host-data' as true).
Example
- create a hash based globally unique index
CREATE GLOBAL HASH INDEX fl_idx ON FLIGHTS (flight_id,
segment_number)
CREATE INDEX
Creates an index on one or more columns of a table.
Syntax
CREATE [ UNIQUE ] INDEX index_name
ON table-name (
column-name [ ASC | DESC ]
[ , column-name [ ASC | DESC ] ] * )
Description
The CREATE INDEX statement creates an index on one or more columns of a table. Indexes can speed up
queries that use those columns for ltering data, or can also enforce a unique constraint on the indexed columns.
The maximum number of columns for an index key in SQLFire is 16. An index name cannot exceed 128
characters. A column must not be named more than once in a single CREATE INDEX statement. Different
indexes can name the same column, however.
SQLFire can use indexes to improve the performance of data manipulation statements. In addition, UNIQUE
indexes provide a form of data integrity checking. However, the UNIQUE constraint only applies to the local
member's data and not globally in the whole table. To enforce a unique index globally for a partitioned table,
use the CREATE GLOBAL HASH INDEX statement.
Index names are unique within a schema. Some database systems allow different tables in a single schema to
have indexes of the same name, but SQLFire does not. Both index and table are assumed to be in the same
schema if a schema name is specied for one of the names, but not the other. If schema names are specied for
both index and table, an exception will be thrown if the schema names are not the same. If no schema name is
specied for either table or index, the current schema is used.
445
SQL Language Reference