Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code takes too long to run
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Code takes too long to run
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01144231
Message ID:
01144231
Vues:
58
Hi everybody,

The process takes about 2h. to finish against the table on a Network drive. When I'm running against my local data, it takes ~ 1min.

Should I blame the corrupted indexes?
select curProcess			
			scan
				lnRecords = m.lnRecords + 1
				
				lcAccount = alltrim(transform(evaluate('curProcess.' + ;
					field(m.lnFieldAccount,'curProcess'))))
				
				lcFinClass = alltrim(transform(evaluate('curProcess.' + ;
					field(m.lnFieldFinClass,'curProcess'))))					
	
				if seek(m.lcAccount, 'Trans')
					select Trans
					locate while cClient_Account_Number = m.lcAccount ;
					for cFinancial_Class = m.lcFinClass and ;
					cClient_Code = m.tcClient_Code ;
					and cDepartment_Code = m.tcDepartment
					
					if found()
						lyBalance = m.lyBalance + Trans.yCurrent_Balance_Amount
						if empty(Trans.tResolution_Date)
							=seek(Trans.cStatus_Codes_fk, 'VisCodes')
							replace stat_date WITH TTOD(trans.tStatus_date), ;
							reso_date with null, ;
							cStatus with "OPEN", ;
							cDescr with VisCodes.cCode_Description in curProcess
						else
						=seek(Trans.cResolution_Codes_fk, 'VisCodes')
						replace reso_date WITH TTOD(trans.tResolution_date), ;
							stat_date with null, ;
							cStatus with "CLOSED", ;
							cDescr with VisCodes.cCode_Description in curProcess					
						endif
					else
						replace cStatus with 'NOT FOUND', ;
						reso_date with null, stat_date with null in curProcess	
					endif	
				else
					replace cStatus with 'NOT FOUND', ;
					reso_date with null, stat_date with null in curProcess	
				endif
			endscan	
08/09/2006 11:35:16 AM Started to run Client Status Update process
08/09/2006 01:01:32 PM Started to commit changes...
08/09/2006 01:01:32 PM Committed all changes...
08/09/2006 01:01:32 PM Finished to run Client Status Update
And this is for the local drive:
***************************************************************************

08/09/2006 01:15:25 PM Started to run Client Status Update process
08/09/2006 01:15:49 PM Started to commit changes...
08/09/2006 01:15:49 PM Committed all changes...
08/09/2006 01:15:49 PM Finished to run Client Status Update
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform