Subject Re: [IBO] How to improve bulk insert
Author Aage Johansen
henry FRANQUET wrote:
> Hi,
> I use TIB_DataPump and IB_cursor to insert data into a database (a
> empty one created with backup and restore only metadata).
> As I have Tables with about one hundrer thousand records, I perform a
> commit retainning on after execute event. When looking to statistics,
> I see then next transaction counter growing.
>
> How can I improve inserting ? Is there a counter I could use, for
> doing a commit every 1000 inserts ?
>
> I have seen in forums, somebody's speaking of inserting thousand's
> insert a second, but even when doing insert without IB_DataPump and
> committing every 1000 insert, I can't go further 400 inserts a second
> with 2 fields table. Should I use virtual disk for temporary files,
> disable forced write and enable it after inserts done ?
>

It depends on several factors: hardware (cpu/disk). Aslo, are records
produced by a fast system?, do you prepare more than once?, are there
triggers?, any indexes to be maintained?
I haven't used the Datapump, but TIB_DSQL is quite fast when you're doing
simple inserts (and otherwise, as well).
I wouldn't worry if commits were done every 10.000 records (or even less
frequently).
A few thousand inserts a second is not an ambitious goal. Even on
equipment that isn't "state of the art".


--
Aage J.