Use the index type recommended for your query.
Type of Query Usage |
Recommended Index Type |
---|---|
In a SELECT projection list |
Default |
In calculation expressions such as SUM(A+B) |
Default |
As AVG/SUM argument |
LF, HG, default |
As MIN/MAX argument |
LF, HG |
As COUNT argument |
Default |
As COUNT DISTINCT, SELECT DISTINCT or GROUP BY argument |
LF, HG, default |
As analytical function argument |
LF, default |
If field does not allow duplicates |
HG |
Columns used in ad hoc join condition |
Default, HG, LF, |
As LIKE argument in a WHERE clause |
Default |
As IN argument |
HG, LF |
In equality or inequality (=, !=) |
HG, LF; also CMP |
In range predicate in WHERE clause (>, <, >=, <=, BETWEEN |
LF or HG; also CMP, DATE, TIME, DTTM |
In DATEPART equality, range, and IN list predicates |
DATE, TIME, DTTM |
In a CONTAINS predicate |
WD, TEXT |