Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 8 query runs slow in VFP 9 SP1
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01106254
Message ID:
01106338
Vues:
42
>>>>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.
>>
>>Is there a list of functions that are not Rushmore optimizable?
>>
>>Thanks again!
>
>Your own thread with the same problem
>Re: Same query in VFP 9 runs slower than VFP 8 Thread #1051638 Message #1051648

Yes, I had this problem when VFP 9 first came out. Because of the bug to STR(), I postponed the upgrading of the program to VFP 9 until VFP 9 SP 1 came out. VFP 9 SP 1 fixed the STR() but not TRANSFORM() as you mentioned.

I was hoping that there was a workaround so that I would not have to create a new index. Using SET ANSI is not a good solution for me, but at least STR() is fixed. I think IIF(lFtdAdversary, "Y", "N") will be a good substitute for TRANSFORM in my index.

Thanks again for your help!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform