RE: update impossible in spite of row locking
Posted in 2009
Silly question: where can I find instructions how to implement "optimistic locking" with IDS 11.50. My search in the manuals and on the IBM-Website was rather unsuccessful. Regards, Reinhard. > -----Original Message----- > From: informix-list-bounces@iiug.org > [mailto:informix-list-bounces@iiug.org]On Behalf Of Fernando Nunes > Sent: Thursday, June 25, 2009 12:03 AM > To: informix-list@iiug.org > Subject: Re: update impossible in spite of row locking > > > Ian Michael Gumby wrote: > > > > > > > From: mpruet1@verizon.net > > > Subject: Re: update impossible in spite of row locking > > > Date: Wed, 24 Jun 2009 14:07:07 +0000 > > > To: informix-list@iiug.org > > > > > > Ian Michael Gumby wrote: > > > > Hey! > > > > > > > > If you're locking a row for update/delete and your > other thread/app is > > > > trying to access the row, then you have your blocking > condition. > > > > > > > > There is no way around the fact that the row will be > locked/blocked > > for > > > > some period of time. > > > > The issue it appears is that you need to limit the > amount of time it > > > > takes for the row to be blocked. > > > > > > > > That's the key. Look at the application(s) and see > what is in the > > > > transaction and how long you have to hold the > delete/update locks. > > > > > > Or move to 11.50 and take advantage of last committed reads. > > > > Even still, you're focusing on half the problem. > > > > No matter how much you improve the engine, there will > always be some > > time (t) that a lock will be held on a row as you change the row. > > I don't want to vote for bad application code, but I believe > Madison's point > was that the existence of the lock will not matter for people > reading the row > or index entry... It would of course still matter if you also > want to change > the same row. > > IDS 11.50 also facilitates the use of "optimistic locking", > meaning you can > easily test if the row was changed when you try to update it. > So the classical > "seat reservation" application would not block the row. > This can be done in any database or any IDS version but it's > easier and lighter > to do on IDS 11.50. > > Regards. > > -- > Fernando Nunes > Portugal > > http://informix-technology.blogspot.com > My email works... but I don't check it frequently... > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list >