Subject Re: [firebird-support] CPU Usage shoots upto 100%
Author The Wogster
mahendra.nepali@... wrote:
> Hi,
>
> I am using Firebird 1.5.2 to load high volume of data from a thin table
> to main tables. This is done by using a procedure in which I have tuned
> the statements so that I don't use as distinct or aggregate functions.
> Also the columns in the thin tables are having appropriates indexes so
> that select is fast. Now the data in the thin tables is approx 0.7
> million. This is inserted into 5 main tables by using one procedure
> call. This procedure calls other inner respective procedures. I did some
> tracing by adding records into an external table and what I noticed
> after the last record is processed the CPU usage consumption by fbserver
> shoots upto a steady 99% and doesn't fall at all hence I have to restart
> the fbserver service. I can understand that this is due to the commit
> being fired by Firebird at the end. But does this mean that firebird has
> some issues with rollback segment. I am not able to diagnose this since
> the same procedure works with a mere thousand records in the thin table.
> Please advice.

I think the problem is that this all happens in one massive transaction,
and then it needs to commit the whole thing at the end. I don't
remember where you can start and end transactions within a procedures,
but if you could commit every 10,000 records or so, then it wouldn't
need to try and commit the whole thing at the end.

Also, if you just let it run, then it would end, eventually.

W