Re: Help optimize Dataset copy code



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
.



Relevant Pages

  • Re: Help with Delphi ASP Object
    ... because I just downloaded your project and tried it on my Windows 2003 machine and it worked just fine. ... Bob Swart Training & Consultancy Forever Loyal to Delphi ... CodeGear Technology Partner -- CodeGear RAD Studio Reseller ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Dr Bob Programming Clinic
    ... that you dod not say anything about it :-) ... To cut a long story short: I'm still here, still doing nothing but Delphi. ... Bob Swart Training & Consultancy Forever Loyal to Delphi ... CodeGear Technology Partner -- CodeGear RAD Studio Reseller ...
    (borland.public.delphi.non-technical)
  • Re: Dr Bob Programming Clinic
    ... I have been very busy with three concurrent projects, and have been working on the site today. ... To cut a long story short: I'm still here, still doing nothing but Delphi. ... Bob Swart Training & Consultancy Forever Loyal to Delphi ... CodeGear Technology Partner -- CodeGear RAD Studio Reseller ...
    (borland.public.delphi.non-technical)
  • Re: Delphi.net is Beta?
    ... Please make sure the connection settings are correct and that the database is online. ... To which SQL Server database? ... Bob Swart Training & Consultancy Forever Loyal to Delphi ... CodeGear Technology Partner -- CodeGear RAD Studio Reseller ...
    (borland.public.delphi.non-technical)
  • Re: AutoNumbers and ClientDatasets
    ... Well I guess I was expecting the value to appear when the record ... was commited (ApplyUpdates ?) to the Database. ... Did not think that I would have to specifically call "refresh" to get ...
    (borland.public.delphi.database.ado)