Re: Row and page locking - yet to di(e)
Posted in 1997
Vijay R. Anisetti (rambabu@sprynet.com) wrote: : Still, in the page-lock mode Informix needs to check only the zero : slot(s) : lock 'em and move on. Whereas in row-lock mode need to check for : slot/rowid : and maybe individual bytes (for varchar) within the page. So, that : does : take little more effort from the engine (though, might be negligible). Think of it like this: To read a row and lock it...we locate the row via rowid and partnum Then we look in the lock table for an entry where rowid=whatever and partnum=whatever. If not found, we can lock this row, so insert entry into the lock table. This is the same whether row or page. The only difference is the value of rowid. If row level locking, use actual rowid. If page level locking, zero out rightmost byte of rowid. This should help clear up why there is no difference in placing a row vs. page level lock.