RE: Index Read Errors
Posted in 1996
> We're using stored procedures to update a set of tables on a data server > which are maintained by an invoice payment app used concurrently by 100 > or so users. The application sets isolation to DIRTY READ for each > session, yet during periods of heavy usage, stored procs are failing due > to index read errors. Row locking is used on all tables and a row is > locked while a user is modifying an invoice that is in the tables. > > Looking for suggestions as to how we can eliminate this problem. How about this suggestion? Don't keep a lock on the row all the time the user is editing the data (if that is indeed what you are doing). Instead: Read the data. Allow the user to modify it on the screen. Begin transaction. Read the row again. If the row is the same as before, do the update, and commit the transaction; if the row is different from before, roll back the transaction and inform the user. In this way, a lock is only held momentarily, instead of all the while the user is editing the data. Also, set lock mode to wait, if you haven't already. Brian Wilkins bew@cix.compulink.co.uk