Subject RE: [ib-support] insert in Firebird
Author Leyne, Sean
> -----Original Message-----
> From: C R Zamana [mailto:zamana@...]
> Sent: Tuesday, August 28, 2001 4:36 PM

> > How often are you committing the changes?
>
> After each insert.

Try committing after inserting all the records -- this would be a true
batch model.


> > How many records are you processing?
>
> Exactly 3813.

Even with committing after each insert, you should be seeing performance
on the order of 10 records a second. By committing at the end of the
batch, you should be able to get performance on the order on 1000 rows
per second.

What is the length of the records?


> > What tools are you using to connect to the database? (i.e.
> ODBC, IBX,
> > IBO or API?)
>
> API ( ESQL/C ).

Check that you are preparing an INSERT statement, and then simply
assigning parameters for each row inside a loop. You are probably
having the server recompile each statements, this would explain a lot of
your performance problems.


> > What indexes are defined for the table?
>
> None.

Not even a primary key or foreign key? I find that a little surprising
(not impossible though)

What about triggers?


> > What is the database cache setting?
>
> I don't know how to check this. However a "show database"
> give me the following:

This value is set in the IBConfig/ISCConfig file.


> PAGE_SIZE 4096
> Number of DB pages allocated: 4441
> Sweep interval = 20000

A couple of other questions I had forgotten to ask:

- What OS is the server running on?

- What type of CPU/how much RAM?

- Are you running Classic or Superserver?

- Is your import routine running on the server or on a remote station?
If remote, what network protocol are you using?


Sean