Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program running very slow
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Program running very slow
Miscellaneous
Thread ID:
00849854
Message ID:
00849854
Views:
55
I get a cd of data every month that I have to process to extract the needed data. There is a set of routines I run to pare it down to what I need. One of the routines, for some reason, is running VERY slow this month. While the data increases every month, it hasn't increased that significantly. This program usually takes 20-30 minutes to run. This month, I let it run all night and it's only half way done. Can anyone spot a problem or more efficient way to do this? Thanks...
USE data\old IN 0 EXCL
USE data\new IN 0 EXCL
SELECT new
INDEX ON ssn+holder_num+DTOS(date_rem) TAG shd
SET ORDER TO shd

SELECT ssn, holder_num, date_rem;
	FROM old;
	INTO CURSOR ssn;
	GROUP BY 1,2,3

SELECT old
USE

SELECT ssn
INDEX ON ssn+holder_num+DTOS(date_rem) TAG shd
SET ORDER TO shd
GOTO TOP

lnRecCount = 0
SCAN
	lnRecCount = lnRecCount + 1
	WAIT WIND 'Record old ssn = '+ ALLTR(STR(lnRecCount)) NOWAIT
	lcSsn = ssn.ssn + ssn.holder_num + DTOS(ssn.date_rem)
	SELECT new
	SEEK lcSsn
	IF FOUND()
		DELETE FOR new.ssn+new.holder_num+DTOS(new.date_rem) = lcSSN
	ENDIF
	SELECT new
	GOTO TOP
	SELECT ssn
ENDSCAN
Next
Reply
Map
View

Click here to load this message in the networking platform