Re: Key-Value locking with RR (was Re: Does Informix do Versioning ...)
Posted in 1995
June Tong (junet@informix.com) wrote: : Graeme Sargent <graeme@pyramid.com> wrote: : :I guess I was thrown a bit by the data getting inserted into a new page, : :when I didn't think it should be. I've just rerun my tests and this : :didn't happen again. : : : :I think this can be explained as follows: : : : : I forgot to change the table to row level locking before I : : started. : Well, that will certainly make a difference ;-) : : I think I must have attempted an insert before I noticed the : : omission. : : I think that must have updated an "insert next row" pointer in : : the tablespace header in shmem. : : All subsequent inserts got pointed at the new page instead of : : the partially full page. : : Tablespace was reopened causing the shmem pointer to revert to the : : partially full page. : To tell the truth, I've never really looked at how OnLine decides which page : to put new rows on. I don't know if there's an "insert next row" pointer in : the tablespace header. It makes sense to me that, if page x, the only I believe this was put in circa 5.0 or 4.1 to speed up bulk load. : partially full datapage, is locked, it picks page y, an empty page, to receive : new rows; and having done that, it would keep using page y until either it is : full, or until an insert finds page y locked. Further tests would indicate that it drops back to page x as soon as x is unlocked. Either I'm wrong about the shmem pointer, or it is not incremented in the way that I thought it was. : But while you were trying to insert other new rows, did you keep page x : locked, or did you free it, and see new inserts still going to page y? : Obviously, if x stayed locked, new inserts will have to go to y. I thought I definitely saw inserts into y while x was unlocked. Now I begin to doubt my memory. -- graeme -- Disclaimer: The author's opinions are his own, and not necessarily those of Pyramid Technology Ltd. or Pyramid Technology Inc. --------------------------------------------------------------------------- -m------- Graeme Sargent Voice: +44 (0)252 373035 ---mmm----- Senior Database Consultant Fax : +44 (0)252 373135 -----mmmmm--- Pyramid Technology Ltd. Telex: Tell who??? -------mmmmmmm- Farnborough, Hants GU14 7PL Email: graeme@pyra.co.uk --------------------------------------------------------------------------- We have the technology. The tricky bit is learning how to use it.