Re: Help optimize Dataset copy code
- From: Bob Swart <Bob@xxxxxxxxxx>
- Date: Fri, 09 May 2008 18:04:44 +0200
Hi Notradamus,
I find it too slow, probably due to the repeated Post call.
It could also be the assignment of values. I've used Assign myself, and posted all records in a clientdataset.
Is there a way to /speed/ things up? Can I delay the writes or use
TClientDataset or something like that? Any inputs greatly appreciated.
See http://www.drbob42.com/examines/examin98.htm where I've done exactly that, but I also did a call to ApplyUpdates after each post to make sure all records are written right away. If you delay the ApplyUpdates until all records have been added (or after every 10 or 20 records for example), you may experience some increase in performance.
Typically, I use this in a one-off way to migrate from one database to another, and I must say that performance is rarely an issue in those cases (while correctness is), so I must say that I wonder why you find the performance an issue here? Do you plan or expect to migrate from one database to another quite frequently?
Best Regards, ND
Groetjes,
Bob Swart
--
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
CodeGear Technology Partner -- CodeGear RAD Studio Reseller (BeNeLux)
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
.
- Prev by Date: Re: Help optimize Dataset copy code
- Next by Date: Re: Help optimize Dataset copy code
- Previous by thread: Re: Help optimize Dataset copy code
- Next by thread: Re: Help optimize Dataset copy code
- Index(es):
Relevant Pages
|