Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem Updating records in table via SCAN loop
Message
 
 
À
07/06/2002 09:37:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00665663
Message ID:
00665945
Vues:
20
>> 'SET ORDER TO TAG ordkey IN vitems' could significantly slow down SCAN FOR.
>
>Can you please explain why. I noticed that an order is also set in the data envinorment and that original programmer resets order to original order after updates.
>
>Should I change this or just not reset the order? I assumed reseting order to key field would speed SCAN up, is this incorrect?
>

The SCAN FOR w/o order set on table would be faster because VFP can use index on 'vitems.clordno' to Rushmore optimize FOR condition. If order is set it could make it impossible for VFP to use Rushmore optimization. It's the best to not set any order and let VFP decide what index to use. However, ff processing in SCAN requires specific order to be set than you cannot change it w/o rewriting the code.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform