RE: lock table & update cursors problems
Posted in 2000
Manuel
This performs as expected with share mode lock. There are several ways to
overcome your design.
1. Lock all tables in exclusive mode.
2. Alter the lock mode to page.
3. Perform regular commits, say every 10000 rows updated.
Murray Wood
-----Original Message-----
From: owner-informix-list@iiug.org
[mailto:owner-informix-list@iiug.org]On Behalf Of Manuel A. Daponte
Santiago
Sent: Monday, January 17, 2000 9:29 AM
To: informix-list@iiug.org
Subject: lock table & update cursors problems
Hi,
We have a 4gl program that updates, inserts & deletes more than a million of
records in 3 tables, and all the tables in our system have "lock mode row".
Our server has 600.000 locks and the memory is scarce so we can't increase
that number.
The first thing we do after the "begin work" is lock the three tables in
"share" mode. Then, we declare the update cursors and start the processing.
But the onmode -k shows an increasing number of locks and the process fails
with a "no more locks" error. The process is run with no other users logged.
Seems that the "update cursor" uses a lock for each row without considering
the "lock table" statement. Is this the standard behavior of the engine? We
are using Informix Dynamic Server Version 7.31.UC2 on a SCO Release =
3.2v5.0.4
Thanks in advance for your help
--
Manuel A. Daponte Santiago
Systems Consultant, ICP