Subject [firebird-support] Re: My query plan does not use correct index
Author Svein Erling Tysvær
>Thanks for your response. Actually, my indexes is not that many. I was just trying to find a
>best one for my queries. I will delete most of them after.
>
>Back to my problem.
>
>It seems that if i removed the "order by" clause, the query works very fast. So it must be
>that order by part that consumes all the performance. Any idea how to fix this?

Does the query return the first few rows or the entire result set quicker without ORDER BY? The ORDER BY shouldn't be much slower to return the entire result set, but sometimes the first few rows are returned a lot faster without ORDER BY (I would guess particularly if you return a large result set).

Set