Re: Row and Page locking - time difference
Posted in 1997
>> 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). > > > >Mark D. Stock Wrote: >>I think you're confusing row lock with byte lock. The latter does need >>to know the number of characters that changed. > > >I don't think I'm. As I understand there is no difference between the >two, OS needs to know from what offset to what offset of the disk needs >to >locked, getting the info. from the disk, either thru a file >descriptor/id >or a direct physical address. Direct physical address (i assume) is the >method used by Informix-online for rawdisk handling. Irrespective of >whether >it is rawdisk or cooked file, the basic difference the row (variable) >and >page (relatively constant) will result in the difference in time it >takes >to lock, as I explained before. > >Anybody with a difference of opinion or more input? Sorry --- The lock is simply a four byte entry in the lock table. We don't do an IO-lock. Thus the only amount of time extra that a page lock requires it the amount of time that it takes to see if there is a lock on any of the rows within that page. Madison Pruet