>>>I have a VFP 8 application that runs the following query in 0.01 seconds. When I run it in VFP 9 SP1, it takes about 7 seconds:
>>>
>>>SELECT * ;
>>>FROM File ;
>>>WHERE ;
>>> cUoCode + cFtcCentury + cFtcCode + TRANSFORM(lFtdAdversary, "Y") + ;
>>> cFteCode + STR(iFtfEntry) + TTOC(tFtfEntered, 1) = lcKey ;
>>>INTO CURSOR Sql1a
>>>
>>>I read that VFP 9 SP1 corrected the problem with the STR() function not being optimized with Rushmore. Is there a similar problem with TRANSFORM() and/or TTOC? Do you have any ideas to speed up the query without recreating a new index?
>>>
>>>Thanks in advance for your help!
>>
>>I believe the problem is in TRANSFORM. I would probably use STR instead. This would mean you need to change the index :(
>
>You were right about the TRANSFORM. I changed TRANSFORM(lFtdAdversary, "Y") to IIF(lFtdAdversary, "Y", "N") and that sped up the query.
>
See this thread
Re: Index optimizing in SP1 Thread #
1059937 I also found that you already asked a related question while back.
If it's not broken, fix it until it is.
My Blog