Number Of Unique Values In The Index; Types Of Queries - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Number of unique values in the index

Types of queries

Adaptive Server IQ indexes are optimized according to the number of unique
(distinct) values they include. When this number reaches certain levels, choose
indexes according to the recommendations in Table 4-1.
Table 4-1: Consideration order
Number of Unique Values
Below 1,000
1000 and over
Columns for which you specify
placed in a form of the default index that is optimized for reduced storage, and
improved performance for certain types of queries.
Here are some examples of columns with different numbers of unique values:
Columns that hold marital status will have just a few unique values (single,
married, NULL)
Columns that hold state or province names will have fewer than 100
unique values
Columns that hold date data probably have more than 100 but fewer than
65536 unique values
Columns that hold account numbers or social security numbers may have
thousands or millions of unique numbers
You should know in advance how data in the columns will generally be
queried. For example:
Will the column be part of a join predicate?
If the column has a high number of unique values, will the column be used
in a
clause, be the argument of a
GROUP BY
in the
SELECT DISTINCT
CHAPTER 4
Adaptive Server IQ Indexes
Recommended Index Type
LF
and/or
HG
HNG
or less are automatically
IQ UNIQUE 65536
COUNT DISTINCT
projection?
, and/or be
141

Advertisement

Table of Contents
loading

Table of Contents