Sybase 12.4.2 Server User Manual


 
Adaptive Server IQ index types
146
Advantages and disadvantages of Low_Fast
The following table lists advantages and disadvantages of Low_Fast indexes.
Table 4-5: LF advantages/disadvantages
Comparison with other indexes
HNG
/
HG
The main factor to consider is the number of unique values within
a column. Use
LF if the number is low.
Additional indexes
The High_Non_Group index type may also be appropriate for a Low_Fast
column.
Note It is almost always best to use an LF index if the number of unique values
is low (less than 1,000). Consider this index first, if the column appears in the
WHERE clause. Only when the number of unique values is high should other
indexes (
HG and HNG) be considered. For range queries with a high number of
unique values, also consider having an HNG index.
The High_Group (HG) index type
The High_Group index is commonly used for join columns with integer data
types. It is also more commonly used than High_Non_Group because it
handles
GROUP BY efficiently.
Recommended use
Use an HG index when:
The column will be used in a join predicate
A column has more than 1000 unique values
Advantages Disadvantages
This index is fast, especially for single
table
SUM, AVG, COUNT, COUNT
DISTINCT
, MIN, and MAX operations.
Can only be used for a maximum of
10,000 unique values.
Cannot use this index if data in your
columns is
BIT, or VARCHAR > 255
bytes.