Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem Updating records in table via SCAN loop
Message
 
 
To
07/06/2002 09:37:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00665663
Message ID:
00665945
Views:
19
>> '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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform