Selecting An Index - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Adaptive Server IQ index types

Selecting an index

150
AND l_suppkey
AND c_nationkey
AND s_nationkey
AND n_regionkey
AND r_name
AND o_orderdate
AND o_orderdate
GROUP BY n_name
HAVING n_name LIKE "I%"
AND SUM(l_extendedprice*(1-l_discount)) > 0.50
ORDER BY 2 DESC
All columns referenced in this query except l_extendedprice and l_discount
should have an
or
LF
HG
Here is a quick chart that summarizes how to select an index type.
Criteria to identify
Note indexes created automatically on all columns.
Note indexes created automatically on columns with
or
UNIQUE
PRIMARY KEY
Identify all columns used in a join predicate and choose
the index type depending on the number of unique values.
Identify columns that contain a low number of unique
values and do not already use multiple indexes.
Identify columns that have a high number of unique
values and that are part of a
list in a
SELECT DISTINCT
Identify columns that may be used in the
of ad hoc join queries that do not already have
indexes.
Identify columns that have a high number of unique
values and that will not be used with
SELECT DISTINCT
or
DISTINCT COUNT
Look at any remaining columns and decide on additional
indexes based on the number of unique values, type of
query, and disk space. Also, for all columns, be sure that
the index types you select allow the data type for that
column.
= s_suppkey
= s_nationkey
= n_nationkey
= r_regionkey
= 'ASIA'
>= '1994-01-01'
< '1995-01-01'
index.
constraint.
clause in a select
GROUP BY
or
.
DISTINCT COUNT
clause
WHERE
or
HG
LF
,
GROUP BY
.
Index to select
Default index
with
HG
UNIQUE
enforced
HG
or
LF
LF
HG
HG
or
LF
HNG

Advertisement

Table of Contents
loading

Table of Contents