Subject | Re: [Firebird-Architect] Some benchmarks about 'Order by' - temporary indexes?... |
---|---|
Author | Pavel Cisar |
Post date | 2006-09-20T11:33:04Z |
m_theologos wrote:
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
>If you didn't fetched all the records from the query in second case,
> 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>;
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