Board index » cppbuilder » LoadFromDataSet - how it works?

LoadFromDataSet - how it works?


2008-06-03 05:31:12 PM
cppbuilder47
Hey all.
I have two datasets (of TMemTableEh type). I fill them using code
like:
for (int j = 0; j < 60000; ++j)
{
mdtTestEh->Append();
mdtTestEhId->Value = j;
mdtTestEhName->Value = "Everybody lies";
mdtTestEhValue->Value = random(100);
mdtTestEhComment->Value = "Ehlib 4.0";
mdtTestEhTime->Value = Now();
mdtTestEh->Post();
}
With the records count == 60000 this procedure lasts about 42 seconds.
But when I'm copying the content of one dataset to another using
LoadFromDataSet, it lasts about 900 ms.
I just can't figure out the big difference, because in LoadFromDataSet
there is a function fetchRecord which is
callin for every record of source dataset.
Thanks in advance for your explanations.
 
 

Re:LoadFromDataSet - how it works?

Hey all.
I have two datasets (of TMemTableEh type). I fill them using code
like:
for (int j = 0; j < 60000; ++j)
{
mdtTestEh->Append();
mdtTestEhId->Value = j;
mdtTestEhName->Value = "Everybody lies";
mdtTestEhValue->Value = random(100);
mdtTestEhComment->Value = "Ehlib 4.0";
mdtTestEhTime->Value = Now();
mdtTestEh->Post();
}
With the records count == 60000 this procedure lasts about 42 seconds.
But when I'm copying the content of one dataset to another using
LoadFromDataSet, it lasts about 900 ms.
I just can't figure out the big difference, because in LoadFromDataSet
there is a function fetchRecord which is
callin for every record of source dataset.
Thanks in advance for your explanations.