>>Hello, can I ask You a question?
>>Why does REQUERY function work much longer than SELECT-SQL command and
>>the BROWSE command from the View menu in the case of large number of
>>records in the the base table (more than 50000)?
>>
>>Code:
>>SELECT * FROM db_price!pricelst ;
>>WHERE LEFT( pricelst.code, ?gnKeyCurrentLength ) BETWEEN ?guRangeLow ;
>> AND ?guRangeHigh ;
>>AND SUBSTR( PriceLst.Code, ?gnRemainStart, ?gnRemainLength ) = ;
>> ?guRemainFill ;
>>ORDER BY code
>>
>>Processing time of SELECT-SQL command is less than 1 second, but in the case of using REQUERY() function it consists 70-80 seconds.
>>
>>Can I do anything to accelerate this process?
>>
>>Excuse me for bad English.
>There are differences but not to this extent. Now to accelarate it:
>LEFT( pricelst.code, ?gnKeyCurrentLength ) BETWEEN ?guRangeLow ;
> AND ?guRangeHigh ;
>Should be replaced by :
>pricelst.code between BETWEEN ?guRangeLow ;
> AND ?guRangeHigh ;
>So it could benefit a code index (set exact off).
>Cetin
I think the main Rushmore-related problem here is that pricelst.code field is seemingly some compound key, with SUBSTR parts containing different info. It's normal to dissect the field to separate ones and create appropriate tags.
Edward Pikman
Independent Consultant