Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore
Message
From
25/05/2006 13:41:00
 
 
To
24/05/2006 19:57:21
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01124743
Message ID:
01124951
Views:
19
>>If I'm searching a lookup table with a command like:
>>
>>locate for alltrim(str(n)) = alltrim(strtran(crsTemp.fnode,"-","")) and ;
>>	alltrim(st_name) <> alltrim(strtran(crsTemp.on_str,"-","")) and ;
>>        alltrim(st_name)<>""
>>
>>
>>how should the indexes be setup to maximize rushmore speed? Both tables are under 10000 records. The lookup loop will execute about 15000 times so I'm trying to speed it up as much as I can.
>>
>>Or perchance would an SQL select be a better option?
>>
>>Thanks for any wisdom.
>
>Don,
>What's n and st_name? Memvar or fields in current table? Purpose of it is not clear but still yet you might start by getting rid of alltrim() and str().
>Cetin
Cetin -
N and st_name are both fields in the current table. The locate is followed by an if found() and replace statement. What I'm doing is populating a street name field based on the node numbers of a grid. There are actually 3 of these locate statements in the loop. The current table is just 2 fields containing a list of points (nodes) and the streets that intersect at that point. What I'm doing here is populating crsTemp with the names of the streets that intersect the endpoints of a roadway. I'm hesitant to drop the trim for fear I won't find the match or I'll find the wrong match because "Bourbon" is really not the same street as "Bourbon St."

Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform