Strange TCRBatchMove Progress and very slow behaviour- Fmx

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 23
Joined: Thu 13 Aug 2009 12:13

Strange TCRBatchMove Progress and very slow behaviour- Fmx

Post by starhu » Fri 19 Oct 2018 07:06

Zsolt Csillag - StarSoft <>
Wed 17 Oct, 10:53 (2 days ago)
to support


I use CRBatchMove to copy from MySql to LiteSql.

The problem is that the progress starts, and when it ends at 100%, it drops to about 70% (this varies, sometimes 71, sometimes 79 etc) and starts counting again. This can repeat 5-8 times.
It is also very slow. I copy about 5 000 records and it processes in about 20 minutes!

First of all the customer is confused, second, I don't know if the counting is bad, or it actually processes the import twice?

Here is the code:
MySqlDataSet.FetchAll := False;
MySqlDataSet.FetchRows := 1000;


{$REGION 'CRBatchMove'}
With CRBatchMove Do
Mode := bmAppend; //bmAppend, bmUpdate, bmAppendUpdate, bmDelete bmUpdate
FieldMappingMode := mmFieldIndex; //mmFieldIndex mmFieldName
OnBatchMoveProgress := OLF_Objektum.BatchMoveBatchMoveProgress;
CommitCount := 0; // 1000
Source := MySqlDataSet;
Destination := SqliteDataset;
FmxDebugToFile('CRBatchMove Termék'+#13);
procedure t_OLF_Objektum.BatchMoveBatchMoveProgress(Sender: TObject; Percent: Integer);
MainForm.HTMLTextProcess.Text := '<BODY bgcolor="clYellow"> <b>'+OLF_Objektum.BatchMove_AktualisTabla +' frissítés:'+IntToStr( Percent)+'%</b>';

Thank you for your help!

Devart Team
Posts: 1257
Joined: Mon 06 Jul 2015 11:34

Re: Strange TCRBatchMove Progress and very slow behaviour- Fmx

Post by MaximG » Tue 23 Oct 2018 10:41

Unfortunately, the provided information is not enough to reproduce and investigate the issue in our environment. Please, in order to investigate the issue, compose and send us a small sample, execution of which causes the mentioned problem. Additionally, we will need DDL script of MySQL table used in this sample, as well as a sample of its filling with data.
It is convenient to do using the e-support form

Post Reply