Re: Online bug? Tech Support clam it isn't
Posted in 1998
Peter Tashkoff wrote: > > It is not a bug. This is true. > You need the index to navigate the table. If you have no index each row = > must be tested in a sequential read to see whether it meets the criteria = > for update. The first thing that Online does is to place a lock on the = > row, for the committed read. Since you are operating within a singleton = > transaction this lock will not be released until your transaction is = > committed. Not only is this 'Just the way it works', it is IMO, sound = > design. Actually, Committed Read does not place locks. It only TESTS for existing locks. Committed Read will not lock anything, but it will bomb out if someone else has your row locked. What Peter says here is true for Repeatable Read isolation level. > >>> Dave Cook <dave.cook@excelsis.co.uk> 7/02/98 06:10:29 >>> > > Any opinions on whether the following is a bug? Tech Support tell me it > isn't as it's "just the way it works". > > When performing an update, a lock is placed on all rows scanned in the > table, unless the update statement uses a unique index This depends on your isolation level. If you are using Repeatable Read, then all rows looked at are locked. This is a requirement of Repeatable Read. If you do a sequential scan, the whole table is locked. If you are not using Repeatable Read, then just the rows updated are locked. However, this can have the same effect, because without an index, the second user will also have to do a sequential scan, and this will fail as soon as it reaches the locked row. You say "But the locked row doesn't meet the criteria for the second user." But since the row is locked, OnLine doesn't know for sure whether it does or not. That's why you need an index. -- June ---- June Tong Informix Software ---- ---- Senior Consultant (650) 926-6140 ---- ---- International Support junet@informix.com ---- ---- Location-du-jour: Menlo Park ---- * * Standard disclaimers apply * - Please do not send me requests/questions by mail. When I have the knowledge - and time permits, I try to answer questions on comp.databases.informix, but - travel schedule, time, and volume make responding to personal requests - difficult and often slow. Please call your local Informix Technical Support - organization for assistance with technical issues.