Subject Re: [firebird-support] Re: slow query
Author Dmitry Yemanov
Stephen Boyd wrote:
>
> So in the case where one is retrieving a small, ordered result set from a large dataset (realizing that small and large are relative terms) it would always be more efficient to sort rather than to order by an index?

There's an exception here: when you filter using the same field that's
used for sorting:

WHERE COL = <smth> -- could be greater-than or less-than as well
ORDER BY COL

In this case, the retrieval is going to be very fast (but only for a
selective search condition).


Dmitry