index selection
Posted in 1993
i think this may have been posted previously, but here it goes.
how does informix sql determine which index to use when executing
a query? the problem we are having is we have a table that has
several indexs which include a given column (lets say column_001);
all but one are composite indexes as follows (as listed by the
isql - tables - info - indexes ):
create index idx1 on tab1 (columne_001,column_002);
create index idx2 on tab1 (columne_001,column_009);
create index idx3 on tab1 (columne_001);
create index idx4 on tab1 (columne_001,column_005);
when you execute the following query, the idx1 index is used:
select * from tab1 where column_001 >= somevalue;
i know that if i drop the idx1 and idx2 indexes isql will use the
idx3 index.
why is this? anyone else have this problem? has it been resolved
in 5.01?
------------------------------------------------------------------------------
| . .
Bob Baskett | ... ...
Software Engineer, DBA | ..... .....
Business Systems Integration Group | .. ... ..
Semiconductor Products Sector | . . .
Mesa, AZ |
| Motorola, Inc
------------------------------------------------------------------------------
Sun 690-MP
Informix Versions:
Online - 5.00.UC2
ISQL - 4.10.UD1
4GL-RDS- 4.10.UC1
------------------------------------------------------------------------------