Subject | Re: [firebird-support] Re: Limiting fetched rows doesn't offer much performance benefit |
---|---|
Author | Ivan Prenosil |
Post date | 2006-03-07T20:24:25Z |
>> My guess is, that Firebird will "materialize" the resultset forFirebird will first use the index to create list of potentially matching records,
>> FROM TABLE WHERE FLAG='Y'
>> before applying the FIRST 50 to it.
>>
> That is certainly what we are observing. It's too bad it is not smart
> enought to realize there are no ordering clauses and quit when it has
> the desired number of records.
then it retrieves first 50 and stops, it will not read all rows internally.
The rows will be retrieved in the most convenient order to minimize
disk head moving, i.e. by dbkey.
Ivan
http://www.volny.cz/iprenosil/interbase/