Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 8 query runs slow in VFP 9 SP1
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01106254
Message ID:
01106305
Views:
20
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform