Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SpeedUp SCAN
Message
 
 
To
02/04/2010 06:52:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01458484
Message ID:
01458515
Views:
81
This message has been marked as the solution to the initial question of the thread.
>Hi all
>I have a table XXX with 25 fields (ctype, nNum, ... filed25) and aprox 100.000 records and following code:
>
>scan for ctype=cvar1 and nnum=nvar2
>...
>endscan
>
>
>Recently this scan became very slow. I've indexed the table in cType and nNum to optimyze speed but it does no work...
>Any ideas would be great.
>
>Thank's in advance,
>NPedro

Try instead of scan for
if seek(m.cVar1,'myTable','cType')
   set order to tag cType
   scan while cType = m.cVar1 for nNum = m.nVar
     ...
   endscan
endif
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform