Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speeding up APPEND
Message
De
14/02/2001 10:50:52
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00475722
Message ID:
00475739
Vues:
48
It's been quite some time since I worked with SBT, but I remember they keep all of the index expressions as metadata. You can mine the metadata for the index expressions & recreate only those you really have to have. I'd create the temporary table, recreate the indexes, then append the records.

If you actually need all of the indexes, then instead of creating a temp table and appending both files copy the history file with cdx to the temp file name, then use it and append from the current file. I just did a test with a 10MB file that has two indexes (deleted, recid) and here are the results;
copy to \temp\foo
Elapsed time; 3 seconds

copy to \temp\foo2 with cdx
Elapsed time; 7 seconds

copy stru to \temp\foo3 with cdx
use \temp\foo3
append from \temp\foo2
Elapsed time; 44 seconds
So, obviously the copy to is a better path than the create/append, and since the history will be bigger than the current it's the one that you will get the most benefit from copying.

Tom
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform