Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any ideas to index/speed this up?
Message
From
21/07/2003 16:14:13
 
 
To
21/07/2003 02:27:04
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00810823
Message ID:
00812140
Views:
12
Thanks so much Agnes for all your help, I finally got your code running and unfortunately it took just about as long as my seek, replace and delete system.

It gave me an idea though that I think might work. I'm thinking about selecting my rate tables into 13 rate tables based on the length of the rate code. Then do an inner join with the cdr on the 13 digit rates, replace them with the rate info. Next join with all the matches for 12 digit rate codes for empty(cdr.dest) , then the same for 11 digit rates, and so on.

I noticed with Dan's code that the set relation was almost instant, it was just not selecting the right matches.

Think this might be a quicker way?

If you don't understand, here's psuedocode for what I plan to do.


select rate
index on code tag code

select cdr
index on len(dnis)+dnis tag dnislength

for i=13 to 1 step -1
SELECT * FROM rate WHERE len(ALLTRIM(code))=i INTO cursor rate+(i)
set relation to rate+(i).code into cdr
set skip to cdr
replace rate table info for empty(cdr.dest) into cdr table
endfor
Previous
Reply
Map
View

Click here to load this message in the networking platform