Subject | Archiving data into another database |
---|---|
Author | rihoe |
Post date | 2005-11-22T17:55:56Z |
I use IBO 4.2Hc and Firebird 1.5 in Windows XP SP2
I have 2 databases - one for working data and another for archiving
old data. I regularly dump older data from one base to another based
by records timestamp.
For this I have 2 TIB_Connections, 1 TIB_Transaction that contains
both connections in his properties and TIB_Cursor for reading and
TIB_Query for writing data:
Trans->StartTransaction();
for(...)
{sRowData = QFrom->Fields->RowData;
QTo->Insert();
QTo->Fields->RowData = sRowData;
QTo->Post();
}
DeleteSQL->ExecSQL(); //deletes transfered old records
Trans->Commit();
I noticed that approximately after 100 records the program hangs a
minute or more in Post() and then continues.
I'm interestedto get rid of this longish delay in datatransfer.
Am I doing something wrong in my coding - maybe there is more
correct solution?
Riho
I have 2 databases - one for working data and another for archiving
old data. I regularly dump older data from one base to another based
by records timestamp.
For this I have 2 TIB_Connections, 1 TIB_Transaction that contains
both connections in his properties and TIB_Cursor for reading and
TIB_Query for writing data:
Trans->StartTransaction();
for(...)
{sRowData = QFrom->Fields->RowData;
QTo->Insert();
QTo->Fields->RowData = sRowData;
QTo->Post();
}
DeleteSQL->ExecSQL(); //deletes transfered old records
Trans->Commit();
I noticed that approximately after 100 records the program hangs a
minute or more in Post() and then continues.
I'm interestedto get rid of this longish delay in datatransfer.
Am I doing something wrong in my coding - maybe there is more
correct solution?
Riho