20.04.2012 18:06, Leyne, Sean wrote: > It depends on the size of the dataset being returned and the number of > sorting levels (size of the sort key) which are applied.
Most likely you are right. I've got an idea: what if to apply DISTINCT (and may be GROUP BY) filter to intermediate results of phase 1 and 3. IMHO, it could significantly speed up whole operation if input stream is mostly sorted and has a big number of duplicates. What do you think? -- SY, SD. ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel