Subject | Re: [firebird-support] Re: slow query |
---|---|
Author | Dmitry Yemanov |
Post date | 2009-08-11T14:54:12Z |
Stephen Boyd wrote:
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
>There's an exception here: when you filter using the same field that's
> 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?
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