Subject | Re: [firebird-support] Is this query using an index? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2011-09-23T10:27:10Z |
>Flamerobin shows the plan as: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?).
>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)
Set