Subject Re: [Firebird-Architect] Re: Some benchmarks about 'Order by' - temporary
Author Adriano dos Santos Fernandes
Vlad Horsun wrote:
> If we separate sort record on two parts {key, offset} and
> {not_key_fields} and sort only first part we will do much less work at
> merge stage but final stage will cost more as we will load {not_key_fields}
> in random order from secondary temp file.
In others words:
FIRST n on sorted stream and merge joins faster.
Large resultset slower.