Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem Updating records in table via SCAN loop
Message
 
 
À
07/06/2002 10:26:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00665663
Message ID:
00665973
Vues:
26
>>>> '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.
>
>Do you know how R.O. affects SCAN WHILE? I often use a SEEK < parent key>, followed by a SCAN WHILE < still on same parent key >.
>

There's no R.O. is involved in this case because WHILE clause is not R.O. optimizable.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform