Hi Cetin
Hmm I know what you mean but the essential code is just as was before. Only main difference is that instead of LL looking thru text file I scan thru several tables. Not too many SQL selects - only what's necessary to see how many stops already allocated to a route, when I encounter a new route rec, but this is as was. I have to seek each time I encounter a new route, to make sure it's not already there (all recs for a route are not necessarily contiguous in the source) but, again, as was.
As for time for the run - about 15-20 minutes - real pain for debug as when you wait for it to get to a place where you suspect - takes even longer cos the debug window open.
Anyway, thanks for the input. I said I'd let you know how it went.
Cheers
Terry
>Terry,
>Whenever it takes longer than expected (in VFP for 186K records longer might mean longer than a second or few) I revise my code. Believe it or not I managed to get a routine that was taking less than a second to last over 30 mins few weeks ago. I noticed the pitfall just at the same time I clicked 'execute code' and it was too late, worse I needed the recent code there I could't break it forcefully and had to wait!
>What might be making it to run slowly is something you should identify. First thing comes to mind is multiple select calls in a scan...endscan loop. That's something I try to avoid and use much faster xBase instead. It might be that with a one pass logic it'd take say 3 secs but unintentionally using a routine that takes a second and operates per record it might also mean 186000 seconds.
>I'd test it in a small set say 20 recs with stepping (and profiler - warning:small set only).
>Cetin
>
>>Hi Cetin
>>
>>It's a bummer. I've converted all the source data to the tables. Counting the no. recs for the thermo. as I said, is now much quicker with RECCOUNT(). However, creating the Journery records (there are several of these per route, each starting at different times during the day) is taking forever! - seemingly as long as before and possible longer! I don't understand it. There are some 186000 recs to process, mind you but I see no improvement uin speed.
>>
>>Cheers
>>
>>Terry
- 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.