Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speeding up APPEND
Message
From
14/02/2001 10:50:52
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00475722
Message ID:
00475739
Views:
49
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform