Re: Locking problem in INFORMIX
Posted in 1997
>> What are the difference between lock mode row and lock mode page? The difference is the number of items which are locked by a single lock. Assume you have a rowsize of 200 bytes, thus you have 9 rows/page on a 2K page, after subtracting timestamp, page header, and slot table entries. With page level locking, when you update a single row, the lock is placed on the page and prevents changes to ANY of the other 8 rows. Page level locking can result in fewer locks being held by an application, at the expense of possibly locking another application/user out of the update they want to perform. Additionally, if the program is changing an adjacent row in the database (i.e., a row on the same page), there is no need to set another lock. SET LOCK MODE TO WAIT 30 will allow a second program to wait up to 30 seconds for the lock to be released by the first program. >> Should I create the tables with lock mode row? Depends. If you have a transaction processing application, with many users accessing the database at the same time, and updates to just one or a few rows at a time, probably the answer is yes. If the application is batch and performs updates to a large percentage of the rows in the database and you don't have to worry about the impact on other users, the answer might be no. The performance of the second type of application could have a small improvement because it would not have to create as many locks. >> Since I upgraded to Online 7.20 from 5.03, Do I need to create the tables >> with extent size next size in order to keep less than 8 extents? Does >> Online 7.20 handle it automatically? On 5.03, I created each table with >> extent size next size in the past. It is still a good idea to provide extent size information if you know the appropriate values. Mark Collins mcollins@us.dhl.com