BatchMove from ClientDataSet to TZTable?

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
magrossi
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 21.04.2009, 11:30

BatchMove from ClientDataSet to TZTable?

Post by magrossi »

Hello,

I'm converting some data from an old Paradox database to a new MySQL one and for that I'm using these great ZeosLib components for Delphi 6. Is there any easy way around this, like the BDE's TBatchMove component and/or property from the TDBEDataSet?
What happens is that I have a table with over 100,000 records in it and it takes a very long time to add them through Append -> FieldByName(First)...FieldByName(Last) -> Post. I've tried using CachedUpdates but it didn't improse performance at all.
Any help/ideas would be much appreciated.

Thank you very much,

Marcelo Grossi
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

First idea : Address fields by index. Using 'FieldByName' will search the field position at every call. Don't know if it makes that much difference, however.

Most performant solution would be dumping your table in the right structure (eg. inserts or something csv like.) Then load this file using the mysql command line tool or the mysqlimport utility.

Mark
Image
magrossi
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 21.04.2009, 11:30

Post by magrossi »

Thanks Mark,

I solved this by copying one record at a time. It's not as slow as one would expect and it serves my purpouses.

Cheers!
Post Reply