Subject Re: [ib-support] %100 CPU usage with interbase, is it usual?
Author Paul Schmidt
On 28 Dec 2001, at 16:04, KURSAT TASKIN wrote:

> Hi,
> when I importing data into GDB the CPU usage rate becomes %100
> is it possible or I am making an error,
> if it usual how can I decrease the CPU usage. because I can not run
> any other application thanks kursat

Are you performing an Insert statement for every record? That is
notoriously slow, because the engine needs to process the
statement for every record, 90% of the time to insert this way is
used in preparing the statement for inserting. A better way is to,
use parameters, because then your preparing the statement once,
and after that it's just mapping the fields to the records, Disable all
indexes you have on the table before you import, and re-enable
them afterwards. You want to commit every so often, say every
10,000 records or so.

Another thing that can slow the process down, is if your client
application updates the screen with every record write, Windows
screen painting is a real resource hog. So maybe update the
screen when you commit.

BTW when refering to more then one index in normal English it's
indicies, however when refering to more then one index on a file or
database it's indexes. Go figure?


Paul Schmidt
Tricat Technologies