CHAPTER 3 Working with Database Objects
133
Indexes are created on a specified table, or on a set of tables for join indexes.
You cannot create an index on a view.
Creating indexes
You can create column indexes in three ways:
•
With the
CREATE INDEX
command
•
With the Add Index option in Sybase Central
•
With the
UNIQUE
or
PRIMARY KEY
column constraint of
CREATE TABLE
,
which creates a unique index automatically.
You can create a join index in two ways:
•
With the
CREATE JOIN INDEX
statement
•
With the Join Index Editor in Sybase Central
See Chapter 4, “Adaptive Server IQ Indexes” for details on selecting and
creating indexes. See the Adaptive Server IQ Reference Manual for command
syntax.
Indexes in the system tables
Information on indexes is in the system tables
SYSINDEX
,
SYSIQINDEX
,
SYSIXCOL
, and for join indexes,
SYSIQJINDEX
. See the Adaptive Server IQ
Reference Manual for a description of these tables. See Introduction to
Adaptive Server IQ for an explanation of how to browse system tables in
DBISQL and in Sybase Central.
Displaying indexes
using stored
procedures
You can also use the stored procedure
sp_iqindex
to display a list of indexes and
information about them. For example, to list the indexes in the sales_order
table, issue the command:
sp_iqindex ’sales_order’
The following information displays. (A remarks column also appears, but is not
shown here.)
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 ...