Subject Re: [ib-support] Ordering problem
Author Paul Reeves
Ivan Prenosil wrote:
>
> IB can use index for ordering only if existing index has _all_ required
> fields, in right _order_, and in right _direction_ (asc,desc).
> I.e. index I_CSNR_D_U can be used only for
> ORDER BY NRFIRST DESC
> or
> ORDER BY NRFIRST DESC,NRLAST DESC


This is indeed true, although I swear when I tested this at 8am that

ORDER BY NRFIRST DESC, NRLAST

returned a plan using the correct index!

Either I was wasn't awake properly or Firebird needs a good strong cup of
coffee in the morning. I guess the former.


Paul
--

Paul Reeves
http://www.ibphoenix.com
taking InterBase further