Subject: Record Locking
Posted in 1994
This feature still appears in later versions of Online. If the select for update does a sequential scan, it can't go past a locked record therefore all records having a higher rowid will appear locked. The only solution is to make sure the SQL stmt has an index to use. On a related subject, it is possible to totally eliminate deadlock contention by ordering updates to a table by its unique key. For example, let's say one process has to update records 4, 7, 3, 9, and another updates 9, 4, 2, 7. Deadlock will never occur if the first updates 3, 4, 7, 9 and the second does 2, 4, 7, 9. If deadlocks appear across tables then order the updates by table name. -- David W Chan, Objective Research Ltd, London E1, England -- Email: dwc@cix.compulink.co.uk