Subject | Re: [firebird-support] Re: Simpel query question - speed |
---|---|
Author | Martijn Tonies |
Post date | 2009-11-26T09:01:04Z |
>> > The selectivity to index POINT_KVIT_IDX1 is 0,00000142520 or lessBecause of the expression, it cannot use the index for sorting.
>>
>> Bad, if I recall correctly.
>
> Yes, but I have some that a worse ;-)
>
>
> Select
> ID, BonNr, Tekst
> from Point_Kvit
> Where BonNr = 2236136
> Order by ID+0
>
>
> Also works perfect.
>
> But I would like to know why.
Given that your result returns just a few rows, it should sort those
rows without the index, as hopping arround the index to find the
row, put them in sorting order etc takes more time.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com