Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speeding up APPEND
Message
From
14/02/2001 10:54:47
 
 
To
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:
00475747
Views:
37
Hey, now there's a good idea. I never thought of copying the table... I like that idea better than just creating the needed indexes. I looked at that route already, but my concern is that if the code changes and it needs on of the other indexes, it would crash.

Thanks!

Michelle

>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
Reply
Map
View

Click here to load this message in the networking platform