Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this be faster?
Message
De
27/03/2001 06:48:49
 
 
À
27/03/2001 05:33:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00488878
Message ID:
00488893
Vues:
8
One thing you don't mention..

Are you opening the tables exclusively? if not could you?
That speeds things up as record locking is not required

The table you are inserting into, is it stored locally or over a network?
Maybe you could store it locally and when it is finished copy it back onto the network.

Depending on what it does, you could also experiment with indexseek (2nd parameter .f.) - find out if any records are there before bothering to do any work.

ie
If Indexseek(xxx,.F.,'table')
	=Indexseek(xxx,.T.,'table')
	Scan While
		**Process
	EndScan
EndIf
I don't know what the performance gains would be on this - it depends how many matches the first indexseek finds.

The other thing you could try is some preprocessing - get subsets of the data locally before doing the real work
Select fieldsrequired from child where field in (select field from parent where 1stRunCondition)
I did this quite a bit at Eurotunnel and it can make a fair difference.

HTH

Will


>I have a program that runs overnight and processes records from a Parent table, for each of these records it processes around 17 Child tables.
>
>The program uses Rushmore all the way through using SEEK's and SCAN WHILE's, and for each Child record found, it inserts the info into a Table (the program is effectively making a copy of the DB).
>
>This program runs 7 times, and for each time is processing different Parent records, in total it runs from 17:00 to 23:25.
>
>I took the 1st run which is 1112 records from the Parent table and obtained the time taken for this process. It is taking (on average) around 0.679 seconds per Parent record, I know this is quite fast, but I want to know if it can be speeded up!
>
>Does anyone have any suggestions on the best way of tackling this, or am already doing it the fastest way, I thought that using SEEK's was the best way of getting info quickly.
>
>Suggestions greatly appreciated.
>Thanks
>Kev
Will Jones
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform