Adaptive Server IQ index types
148
However, because multi-column primary keys are always unenforced, the
automatically created High_Group index for a multi-column primary key is a
phantom index: it includes all of the key columns, but does not contain any
data. This structure is used for query optimization, but not for resolving
queries. You need to create explicitly an
HG
(or
LF
) index on any multi-column
primary key columns that will be used in a join predicate.
The High_Non_Group (HNG) index type
Add an
HNG
index when you need to do range searches.
An
HNG
index requires approximately three times less disk space than an
HG
index requires. On that basis alone, if you do not need to do group operations,
use an
HNG
index instead of a
HG
index.
Conversely, if you know you are going to do queries that a
HG
index handles
more efficiently, or if the column is part of a join and/or you want to enforce
uniqueness, use a
HG
index.
Note
Using the
HNG
index in place of a
HG
index may seriously degrade
performance of complex ad-hoc queries joining four or more tables. If query
performance is important for such queries in your application, choose
HG
instead of
HNG
.
Recommended use
Use an
HNG
index when:
•
The number of unique values is high (greater than 1000)
•
You don't need to do
GROUP BY
on the column
Advantages and disadvantages of High_Non_Group
See the following table for advantages and disadvantages of using a
High_Non_Group index.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...