Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql statement not being rushmore optimized
Message
From
20/12/2012 04:08:29
 
 
To
19/12/2012 17:23:53
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01560225
Message ID:
01560253
Views:
56
First, is your looping code MUCH faster ?
- and it might be faster if you use Scan Rest and put the seek into additional for.
Just walking the index as you do is often a bit faster than SQL.
Also got top when an index is active is not optimal,
locate is better, if it is needed at all, due to following seek.

>*--- replacement code because can't get the above update statement optimized.
>Set Order To xchange In curaccount
>Go Top In curaccount
>If Seek("Y","curaccount","xchange")
> Do While Not Eof("curaccount") And curaccount.cchanged="Y"
> If Seek("curaccount.clineid","account","clineid")
> Replace cacc With curaccount.cacc, cid With curaccount.cid In account
> Endif
> Skip In curaccount
> Enddo
>Endif
Previous
Reply
Map
View

Click here to load this message in the networking platform