Re: Row and page locking
Posted in 1997
Vijay R. Anisetti wrote: > > Bill Glidden wrote: > > > > davin_harvey@dsti.co.uk wrote: > > : Hi everybody, > > : =20 > > : Does anyone know if there is a difference in the time it takes to=20 > > : place a row lock rather than a page lock? > > : =20 > > : Ta > > : Davin > > > > no difference that I can think of. > > Though there might be a difference between the two, it will be > negligible > should play no importance in the decision making. > > My theory is that a Page lock is quicker as there is a defined no. of > bytes > to lock all the time. Whereas for a row lock it requires to know the no. > of > bytes to lock and task of calculating the rowsize is compounded if it > has any > variable columns in size (varchar). No. Informix only has create a lock for the rowid. The only difference between a page lock and a row lock is that a page lock is a lock on slot number zero on the page. Since the rowid contains the page and slotno, (the slot contains the actual row length) this is sufficient. The Informix code just checks for any lock on the desired page for slot zero if the table mode is page or for the specific slot/rowid if the table's lock mode is row. Art S. Kagel