Re: LOCK TABLE in exclusive mode
Posted in 1998
Yes, Informix promotes the lock to exclusive on the table. Thus when you update/delete all the rows in the table there is only 1 lock entry in the lock table for that table. In a logged database you must precede the lock table statement with a begin work; In that case there is no "unlock." It's unlocked when the database receives a commit work; The main benefits of locking the table include, needing less locks (resource issue), increased speed of transaction (no locks to check for on each row). The drawbacks are that the whole table is locked and no one else can read (except for dirty read). That may also be a benefit if you are doing massive updates. Also don't forget you still need enough log for the whole transaction, assuming a logged database. Scott Kolaya BlackStar wrote in message <35a446c8.11829319@news>... >When I lock a table in exclusive mode using the LOCK TABLE statement >on a table with row locking as default, does INFORMIX automatically >promote the locking of this table to TABLE/PAGE LEVEL locking? > >Thanx > >Standard Disclaimer