Subject Re: [ib-support] Optimizer uses wrong index
Author Nando Dessena

> >...C has an
> >additional index on the first two fields of the primary key plus a bunch
> >of other (it is selective enough, but not as the primary key, I'd
> >suppose).
> >
> >It happens that my IB5.6 optimizer scans A in natural order, B using its
> >primary key index and C using that additional index instead of the
> >primary key index.
> One thing you might do is change the order of columns in the additional
> index on C, so that the two segments of the primary key aren't first.

I thought about that; I'd have to check whether this is going to screw
other queries up or not...
Maybe not... I'll let you know.