Creating Adaptive Server IQ indexes
138
•
Because indexes are compact, more data can be kept in memory for
subsequent queries, thereby speeding throughput on iterative analysis.
•
Tuning is data-dependent, allowing data to be optimized once for any
number of ad hoc queries.
Creating Adaptive Server IQ indexes
You can create a column index explicitly using either the
CREATE INDEX
statement or Sybase Central. These two methods are discussed in the sections
that follow.
The CREATE INDEX statement
To create an Adaptive Server IQ column index, use this syntax:
CREATE [ UNIQUE ] [
index-type ] INDEX index-name
... ON [
owner.]table-name
... (
column-name )
... [ { IN | ON }
dbspace-name ]
... [ NOTIFY
integer ]
If you do not specify an index-type, Adaptive Server IQ creates an
HG
index.
Several front-end tools create an
HG
index automatically for this reason.
Examples
The first example creates a High_Non_Group (
HNG
) index called
ship_ix
on
the
ship_date
column of the
sales_order_items
table.
CREATE HNG INDEX ship_ix
ON dbo.sales_order_items (ship_date)
The second example creates a Low_Fast index called
sales_order_region
on the
region
column of the
sales_order
table.
CREATE LF INDEX sales_order_region
ON dbo.sales_order (region)
By default, after every 100,000 records are inserted and loaded into indexes,
you receive a progress message. To change the number of records, specify the
NOTIFY
option of
CREATE INDEX
. To prevent these messages, specify
NOTIFY
0
.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...