Sybase 12.4.2 Advantages and disadvantages of HighGroup, Automatic creation of HighGroup index

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 167
Image 167

CHAPTER 4 Adaptive Server IQ Indexes

Advantages and disadvantages of High_Group

The following table lists advantages and disadvantages of High_Group indexes.

Table 4-6: HG advantages/disadvantages

Advantages

Disadvantages

Quickly processes queries with

This index needs additional disk space

GROUP BY.

compared to the HNG index (it can take up

 

as much as three times more space than raw

 

data).

 

 

This index facilitates join index

This index type takes the longest time to

processing. It is one of indexes

populate with data, and to delete.

recommended for columns used in join

Cannot use this index if data in your

relationships. LF is the other.

columns is BIT, or VARCHAR > 255 bytes.

 

 

 

Comparison with other indexes

LF The determining factor is the number of unique values. Use High_Group if the number of unique values for the column is high. Use Low_Fast if the number of unique values is low.

HNG The determining factor is whether the column is a join column, and/or whether GROUP BY may be processed on the column. If either of these is true, use High_Group, either alone or in combination with High_Non_Group.

Otherwise, use High_Non_Group to save disk space.

Additional indexes

In some cases, a column that meets the criteria for a High_Group index may be used in queries where a different type of index may be faster. If this is the case, create additional indexes for that column.

Automatic creation of High_Group index

Adaptive Server IQ creates a High_Group index by default whenever you issue a CREATE INDEX statement without specifying an index type.

Adaptive Server IQ automatically creates a High_Group index for any column with a UNIQUE or PRIMARY KEY constraint.

147

Page 167
Image 167
Sybase 12.4.2 manual Advantages and disadvantages of HighGroup, Automatic creation of HighGroup index, 147