which one is faster for appending, TMyTable or TMyQuey

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
easyblue
Posts: 64
Joined: Wed 02 Feb 2005 13:02
Location: Shanghai

which one is faster for appending, TMyTable or TMyQuey

Post by easyblue » Tue 07 Sep 2010 12:58

Helllo

I have millions of records, each one after very complicated calculation, need to be insert back to the result table.

I first clear up the result table. then for millions of result, I need to

Code: Select all

source_dataset.first;
while not source_dataset.eof do
begin
  dest_dataset.append;
  // now copying selected fields of source into dest
  // finished copying
  dest_dataset.post;
  source_dataset.next;
end;
I have already set the CashedUpdate, StrictUpdate, UniDirection, AutoPrepare etc for speed tunning, but performance is not satisfying.

I would like to know:
1. is this the best way for dataset append operation?
2. for append speed, which component I should use for faster speed? a TMyQuery or a TMyTable;

AndreyZ

Post by AndreyZ » Tue 07 Sep 2010 13:18

Hello,

You can use the TMyLoader component which serves for fast loading of data to the server.
You can look at the example of using it in MyDACDemo.

easyblue
Posts: 64
Joined: Wed 02 Feb 2005 13:02
Location: Shanghai

MyLoader saves 50% time

Post by easyblue » Thu 09 Sep 2010 10:44

it is really an amazing component!

Post Reply