Forum Discussion
ADODB performance problem
where have you find my test.cpp ?
If your batch sample use fields.getvalue and fields.putvalue, and if this takes less than 3sec, i am very interested...
My test.cpp, i only an extract off a very big client. The reading is very fast, only writing is slow, and the write algo is field by field, modifiing this is not very easy, the fields are stored in maps...
Regards
PS : have you seen the #import ".......msado15.dll" directive ?
Hi philippeillinger !
where have you find my test.cpp ?
Answer provided in private message.
If your batch sample use fields.getvalue and fields.putvalue, and if this takes less than 3sec, i am very interested...
As stated, set your RS LockType to adLockBatchOptimistic and then use RS->UpdateBatch when appropriate.
Therefore, I have had time to take a deeper look on your VB sample and more especially on its RS_out Cursor settings (state after opening the RS😞
- CursorLocation = 2 (-> adUseServer)
- CursorType = 1 (-> adOpenKeySet)
If you apply the same configuration in your C++ sample code RS parameters, then both (VB & C++ samples) RS settings will be aligned - more especially the DBPROP_MAXPENDINGROWS will be set to 1 in the C++ running sample. And performance also aligned (still < 3,000ms).
This time without modifying LockType (still set to adLockOptimistic as you seems to need it).
However, I still think the best option to fulfill your goal is to set that LockType to adLockBatchOptimistic : will be more scalable as you may increase drastically size of items to copy.
Hope that helps !
- philippeillingerAug 05, 2024Copper ContributorI have modified my test code with your suggestions...and i have 8 sec...thats really better...
My VB code takes only 1 sec...
But let us not be more royalist than the king...I will apply this tomorrow, on the big software...
I hope that the user experience will be 'satisfactory'.
PS : Private Message ? Where ? (en Francais ca irait probablement encore mieux...LOL )- philippeillingerAug 08, 2024Copper ContributorMy problem is solved !!!
It was a parameter problem...
ALL the sample code (and API), use the adUseClient parameter, and that is the problem !!! Using adUseServer, drops to 2sec, the duration !!!
In VB.net adUseServer is the default option !!! And that is the answer, that explain the difference
!!!
Regards...- philippeillingerAug 11, 2024Copper ContributorAnd i have read, that Microsoft don't continue ACCESS...
I have found an open source issue...Sqlite / ADO...the performance are identical...but just be care to put a transaction !!!