Subject Re: [IBO] Slow append of records
Author Steve Fields
I will try these suggestions. But did you notice
my second post? It seems that the TIB_Query(s)
components were slower with the same setings
than the TIBOQuery(s) ???

Steve Fields

Svein Erling Tysvær wrote:

> >I am populating a table with records from a
> >paradox table. There are approx 8100 records.
> >After the first 500 or so records the appends
> >slow down to about one second per append of
> >the IB records. In the same program I have another
> >dataset that appends/posts several hundred records
> >in only a few seconds. Any Ideas?
>
> Well, the number of inserts per second will of course vary depending on the
> row size. But your inserts are dead slow regardless of the size of records.
> I timed a program I've written, and it transferred about 2 000 records per
> second (24 fields of type integer, date or char - no blobs) from one
> Firebird (Interbase) database to another.
>
> >Local IB6 but on a server, IBO 3Di, Paradox 5.
> >Using tiConsistancy, AutoCommit, Server AutoCommit,
> >Forced writes, No synchs in the TIB_Query,
>
> Are these settings thoughtfully considered? I'd go for tiCommitted, no
> AutoCommits and a TIB_DSQL. Forced writes are OK :o}
>
> Add a TIB_Transaction, assign your TIB_Connection to it and set both of
> them for your TIB_DSQL. Your DSQL should have SQL like
>
> INSERT INTO MyTable (MyField1, MyField2 ... )
> VALUES (:MyValue1, :MyValue2 ... )
>
> Then in your program do
>
> MyConnection.Connect;
> if MyConnection.Connected then try
> MyConnection.BeginBusy(True);
> MyDSQL.Prepare;
> repeat
> MyDSQL.ParamByName(MyValue1) ... :=PdxTable.FieldByName ...
> MyDSQL.Execute;
> PdxTable.Next;
> until PdxTable.Eof;
> MyTransaction.Commit;
> finally
> if MyTransaction.TransactionIsActive then //shouldn't execute if successful
> MyTransaction.Rollback;
> MyConnection.EndBusy;
> MyConnection.DisConnect;
> end;
>
> If you also set PdxTable.Exclusive, your insertion should go down to a few
> seconds,
>
> Set
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/