Subject UPDATE command hangs
Author tdtappe
Hi folks,

I have some strange problem with two (there might be more) of our
customers databases.
When trying to execute an UPDATE command on all rows of a table
firebird doesn't seem to be able to "finish" this command. It
seems to hang.
I tried it with version 1.0.3 on windows (SS) and linux (CS)
and also with version 1.5 on windows (ss) and linux (CS).
It always seems to be the same behaviour: extensive CPU usage
and (almost) no disk activity.

The databases were freshly restored from backup and I also
validated them => no errors.

The table which is to be updated has no triggers. Page size of the
databases is 4096.
The table of these two databases has about 130.000 records.
The UPDATE command is as easy as "UPDATE <table> SET
<newly_added_column> = <default_int_value>"

Other databases with the same metadata run smoothly with the same
update script.

Even if I move this single update command to a another script and
execute it after a restart of
the firebird service, firebird hangs.

I then tried to update the rows of the table via a stored procedure -
record by record (UPDATE ... SET ... WHERE PrimaryKey = :PrimaryKey)
with no success.

I also tried to force a garbage collection before the update command
via "SELECT COUNT(*) FROM <table>".
Also without success.

BTW, while the CPU is busy with the update command I cannot connect
this database via another connection nor any other database on that
firebird server.

Another idea is to make another backup/restore of the databases before
executing the update command. This will take some time.
I am going to present the results of this here later.
But this of course is not a really a solution. I really would like
(need?) to have one script that does all the necessary steps
to update the database to the required state.

Any suggestions?
Thanks in advance.