Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I optimize this form? It's SLOW
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00112049
Message ID:
00112131
Views:
27
>>
>>Why don't you use SEEK ? You will only need to index the view on cID...
>>
>>seek this.value
>>
>>BOb
>
> Well, it kept giving me a "Table has no index order set" error - and LOCATE didn't ;-). According to the help, LOCATE should do a Rushmore optimization on it anyways (and it's a small file). Those were the only >real< reasons I didn't.


That's the reason!
You would be opened the table with setting order tag!!
e.g.

Use MyTable Again in 0 Shared Order Tag KeyField1
.....

Select MyTable
Seek "ORD0310"
ThisForm.refresh

Then, the form will quick jump to "ORD0310" Keyfield record!!


Locate for ....
is using a calculation on search. So, the speed will be much much slower than seek.

Seek Only take care KeyField where the keyfield has special mark that it will jump more faster to desire record!
But Locate for [Condition ] will be much slower...

Even you can:
Locate for BuyQty * SellPrice > 20000
Locate for Like("PR??J3*69", Keyfield1)
Locate for "J600" $ KeyField1
....
The Calculation cause Much slow and thus avoid locate unless you really need special condition satisfy!! ~_^
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Reply
Map
View

Click here to load this message in the networking platform