>Flamerobin shows the plan as: >PLAN JOIN (users NATURAL, group_users INDEX (INTEG_14)) > >Also, I got the following tables: >Group users key (composite): col1, col2, col5 >Users key: col2, col3 > >When I do an inner join between the two tables I get: >PLAN JOIN (users NATURAL, group_users INDEX (INTEG_14)) > >How can that use an index when the full composite key of users (col2, col3) >is not defined for groups. Only partial col2 is defined. And because col1 is >the first column in the composite key index, how come firebird uses the index? > >(the tables have no rows, I'm just using the show plan option in flamerobin)
Please show us the query and the definition of INTEG_14, is this the same as "Group users key" or something completely different (e.g. a unique constraint on col2 or a different index altogether?). Set
