Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed up ADO
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00452944
Message ID:
00453292
Views:
29
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>I have sometime a table of 4000 records how needs to be added to another table
>>
>>It is possible that one off the records already exits in that table.
>>In that case i have to replace it
>>
>>Now i first check if the record exit if not i append it.
>>Because it are all sub calls, it take a lot off time.
>>
>>Does someone have an idee to speed this up
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Which provider are you using, and are you optimizing on a key field and seeking, or just Finding?

If you can't optimize/seek, you might consider ordering the recordsets so that likely matches from recordset B are closer to the top of recorset A.

It sounds as if a client-side cursor would be much better than a server side cursor in this case. Be sure to use that.

Finally, are you sure there are no duplicates in Recordset B? If so, as you scan through, append any new required records into an entirely different recrdset (C) and then at the end, append this record set to the other. This way, Recordset A does not grow in size as the searching proceeds.

Hope one or more of these ideas helps.
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform