Antonio F,
What do you mean by "memory and/or time"?
Maybe I should have said RAM and timing. In the past I have had programs crash when they ran out of RAM. And also, the OS sometimes lags and the program is expecting something to be done that isn't so you get a error that isn't trapped in your code. Both of these are very hard to solve since they are not exactly repeatable.
COPY TO and APPEND FROM the source area rdd calls ado_append and then ado_putvalue for each record. Both these functions call :update() each time. This might be the reason of taking so long?
Oh, it absolutely is the reason.
Do you mean we should change the :cursorType to adLockBatchOptimistic start a transaction and :updatebatch only at the end?
Well it does seem that there is very little chance of someone else trying to access a DBF while it is being created. This is generally a maintenance process, and probably being done when nobody is using the system. Or possibly an export to be used by another program.
May be there is a bug in locks as it should in COPY TO open the destination table exclusively only in APPEND FROM ADORDD locks record by record.
It would seem proper to COPY TO exclusively.
With the APPEND FROM, possibly there could be a programming option to set the locking interval; x records or all records. Like I mentioned in a previous post, my calculations were that it would take about 12 hours to append a million records to a local drive (longer on a network drive). So, initializing a large database could take several days with multiple millions of records. A business would have to shut down to do this.
If I remember correctly, it takes almost the same time to append 100 records (or even 500) followed by a single update, as it does to append 1 record and update. Updates are really slow for some reason.
Yesterday I showed a client a sample of one of his data tables running in an SQL engine. He was very pleased to see it.
Keep up the great work you are doing.
James