Subject Re: [firebird-support] help for firebird
Author unordained
---------- Original Message -----------
From: Qi Han <dake1024@...>
> hi, I'm from China, is a firebird rookie, recently Iencountered a
> problem and hope to get your help, the problem described as follows:
> Start a transaction, update a table in a 1-million records, about 3
> seconds to complete, do not submit; Then update it just update 1-
> million records. Problem, and then you see a hard drive light Always,
> about 2 minutes and 30 seconds to complete. I would like to ask is
> why? Then what do firebird server operation. Hope to get your help.
> Thank you
------- End of Original Message -------

Could you be describing the effects of cooperative garbage collection? Are you
always performing the test this way, doing two updates, with one being canceled?

If a first transaction updates a lot of records, then rolls back (I assume that's
what you mean by "do not submit"), and then a second transaction updates a lot of
records, such that it notices the "garbage" created by the first transaction's
rollback (it could potentially see garbage not directly related to the updates
being performed,) it will try clean that up. Cleaning up takes time, and your
second transaction pays the cost of the first transaction having rolled back.

Try this: do a batch update, commit. Then do the same batch update, and commit
again. The second time around, there probably won't be any garbage collection
that needs to be done, so you should only be seeing the cost of the operation you
requested, instead of the operation that Firebird felt was necessary.

-Philip