Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to speed this loop and/or SQL up?
Message
From
18/03/2005 10:58:49
 
 
To
18/03/2005 10:50:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00997258
Message ID:
00997270
Views:
13
OK thanks, Tore. I'll give that a try.

Terry

>I have not studied your case thoroughly, but I notice the line
>Select DISTINCT TIME from RZStop where ALLTRIM(RZStop.RTE_NO)  == lcRteNo ...
>To optimeze this, you need an index on ALLTRIM(RTE_NO), which is not advicabe, an index key must ALWAYS give a fixed length, which alltrim() does not give! A better solution is an index on ADDBS(RTE_NO,10) (adjust 10 if necessary), and this change in the select:
>Select DISTINCT TIME from RZStop where ADDBS(RTE_NO,10)  = lcRteNo ...
>You must also change the other alltrim() functions accordingly.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform