Subject Re: [Firebird-Architect] Some benchmarks about 'Order by' - temporary indexes?...
Author Pavel Cisar
m_theologos wrote:
>
> I made some benchmarks on some FDBs and I found some interestning
> results running two sets of commands.
>
> 1. Set 1: Select * from <table> order by <field>;
> 2. Set 2: Create index idx1 on <table>(<field>);
> Select * from <table> order by <field>;

If you didn't fetched all the records from the query in second case,
then your benchmark is pointless. Sort via read in index order is known
to be faster to return first row, but slower to return the whole set
(from almost the same speed to way way worse, depends on actual data
distribution on the disk).

best regards
Pavel Cisar
IBPhoenix