Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!philmtl!atha!augeas.AthabascaU.CA!ron From: ron@augeas.AthabascaU.CA (Ron Haukenfrers) Newsgroups: comp.databases Subject: Re: Lock problem on Ingres, Please help. Keywords: Ingres Message-ID: <1671@aurora.AthabascaU.CA> Date: 19 Feb 90 00:04:50 GMT References: <673@modulex.dk> Sender: news@cs.AthabascaU.CA Lines: 36 bni@modulex.dk (Bent Nielsen) writes: >Someone has explained to me how Ingres lock is working, but I >don't understand it, please help. >1) Is it correct that if I have a record length of 128 bytes > and uses SELECT .... FOR UPDATE on one record then 4 records, > one whole page (512 bytes on UNIX), will be locked? >2) I am familiar with Oracle SQL*Forms and Forms is using > SELECT .... FOR UPDATE, when a user start to change a > retrieved record and only this record will be locked. > How can I implement this in Ingres if 1) is correct? >-- >Bent Nielsen >A/S MODULEX >Lyskaer 15 >DK-2730 Herlev >Denmark Ingres has the concept of a page (2k). When it performs a lock, it locks the whole page. Because your record size is less then the page size, ingres is placing mutiple records in each page. This 2k page is also why you can not create a record larger than 2k in Ingres. If this method of locking is a problem, the only sugestion I have is to set the fill factor for that table to one record per page. (modify command) This increases the overall size of your database, but it will enable you to lock only one record at a time. Hope that helps. -- Ron Haukenfrers {alberta,cbmvax,decwrl}!atha!ron Educational Computing or ron@cs.AthabascaU.CA Athabasca University