Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 142

Table of Contents

Advertisement

Working with tables
Optimizing storage and query performance
Difference between
UNIQUE and IQ
UNIQUE
122
If you use the
ALTER TABLE
table, or to designate an existing column as
automatically.
For complete information on IQ indexing, see Chapter 4, "Adaptive Server IQ
Indexes"
When you create a permanent table in an IQ database, Adaptive Server IQ
automatically stores it in a default index that facilitates a type of query called
a projection.
Adaptive Server IQ optimizes this structure for query performance and storage
requirements, based on these factors:
The
option of
IQ UNIQUE
The data type of the column and its width
The
option of
IQ PAGE SIZE
See the following table for implications of
Table 3-3: Effect of IQ UNIQUE
IQ UNIQUE 256 or
less
Storage optimized for
small number of unique
values
Faster query
performance, less main
IQ Store space required
Need a small amount of
extra cache for IQ
Temporary Store
Loads may be slower
gives an approximation of the number of distinct values that
IQ UNIQUE ( count )
can be in a given column. Each distinct value can appear many times. For
example, in the
employee
the
column, but each of those values could appear in many rows.
state
command to add a
UNIQUE
UNIQUE
.
CREATE TABLE
CREATE DATABASE
IQ UNIQUE
IQ UNIQUE 65536 or
less
Storage optimized for
medium number of
unique values
Faster query performance,
less main IQ Store space
required
Need extra cache for IQ
Temporary Store. The
amount depends on the
number of unique values
and the data type.
Loads may be slower
table, a limited set of distinct values could appear in
column to an existing
, an
index is created
HG
.
IQ UNIQUE unspecified
or greater than 65536
Storage optimized for large
number of unique values
Queries may be slower
No extra cache needed
Loads are faster

Advertisement

Table of Contents
loading

Table of Contents