Page 1 of 1

BatchMove from ClientDataSet to TZTable?

Posted: 28.04.2009, 11:08
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

Posted: 03.05.2009, 23:25
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

Posted: 19.05.2009, 14:00
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!