>>Filter expressions are optimizable if the index exactly matches the filter expression but a SEEK is always going to be faster.
>>
>>Try the following:
>>select appur
>>seek the_ident
>>scan while ident = the_ident
>> * do stuff
>>endscan
>
>>The WHILE inhibits the SCANs behavior of going to the top.
>
>...and keeps the SCAN from going all the way to the bottom....
Unless, of course, the last record in the "the_ident" group happens to be the last record in the table. ;-)
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao