Sybase 12.4.2 manual HighGroup HG index type, Advantages and disadvantages of LowFast, 146

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 166
Image 166

Adaptive Server IQ index types

Advantages and disadvantages of Low_Fast

The following table lists advantages and disadvantages of Low_Fast indexes.

Table 4-5: LF advantages/disadvantages

Advantages

Disadvantages

This index is fast, especially for single

Can only be used for a maximum of

table SUM, AVG, COUNT, COUNT

10,000 unique values.

DISTINCT, MIN, and MAX operations.

Cannot use this index if data in your

 

 

columns is BIT, or VARCHAR > 255

 

bytes.

 

 

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

146

Page 166
Image 166
Sybase 12.4.2 manual HighGroup HG index type, Advantages and disadvantages of LowFast, Comparison with other indexes, 146