Subject Re: [IBO] Order By
Author Frank Ingermann
Hi Rod,

rodbracher wrote:
> I have a query which returns instantly, until I add the 'Order By'
> clause and order the result with three fields. The query then takes
> 50 seconds ( The plan stays the same ).
> Surely a result set should be ordered afterwards - if not is there a
> way the tiboquery can order the result once the 'non-ordered' query
> has been executed ?

Does your query do a Select <something> From a *stored procedure* ?
In that case, adding an order by clause gives a dramatic decrease in
performance, even if you Order By the order that the stored proc
returns anyway. (For obvious reasons, IB can't use any indexes when
selecting from a stored proc - you can't create indexes on SPs... :)

just a thought...

regards & hth,