Subject | Re: Archiving data into another database |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-11-23T09:54:40Z |
--- In IBObjects@yahoogroups.com, Riho wrote:
appropriate than TIB_Queries for inserting records. Though I must
admit that I don't use RowData myself. Also, deleting could be time
consuming if you use indexes with poor selectivity.
Set
> I use IBO 4.2Hc and Firebird 1.5 in Windows XP SP2Well, using a TIB_DSQL and Params or ParamByName is normally more
>
> 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
appropriate than TIB_Queries for inserting records. Though I must
admit that I don't use RowData myself. Also, deleting could be time
consuming if you use indexes with poor selectivity.
Set