Re: IDS 11 optimistic locking [2651]
Posted in 2007
Hi Clifton,
Keep in mind this is for reads only.
If you have two writers:
Session A
===========
begin work;
update customer set fname="FRED" where fname="Fred"
Session B
===========
begin work;
update customer set fname="fred" where fname="Fred"
They will still wait the same as they have always waited.
Same goes for inserts.
----- Original Message ----
From: Clifton Bean <cbean@ctm.com>
To: classics@iiug.org
Sent: Thursday, November 15, 2007 8:10:38 AM
Subject: RE: IDS 11 optimistic locking [2651]
[Cross-posting only because we are discussing a v11 item under
"classics".]
This makes me wonder if this is a good way to handle those locks
associated
with active tables with serial values. Would this allow the engine to
obtain the next serial value for a table even though someone may have
performed an insert into the table but have not committed it yet due to
the
transaction(s) being "in progress"?
.... or for those values in which you have a decimal field that you
grab the
last value of, increment by one and then perform your insert?
Take care.
Clifton M. Bean
Informix DBA / AIX System Admin
Currency Technics & Metrics
Phone: (972) 812-1411 x244
-----Original Message-----
From: classics-bounces@iiug.org [mailto:classics-bounces@iiug.org] On
Behalf
Of Mark Jamison
Sent: Thursday, November 15, 2007 7:56 AM
To: classics@iiug.org
Subject: Re: IDS 11 optimistic locking [2650]
Well
IDS's optimistic locking is called DIRTY READ.
In 11.10, we introduced what we refer to as OPTIMISTIC CONCURRENCY.
Basically if your set the ONCONFIG variable USELASTCOMMITTED it means
that
IDS
returns the last valid value for that row that has been committed.
So for example, suppose you have session A
begin work;
update customer set fname = "FRED" where fname ="Fred";
And at the same time you have Session B;
set isolation to committed read last committed;
select fname from customer where fanme like 'F*';
In the above scenario, at session b would get the Value
Fred
from his select, even though session A is still holding a lock for the
row
holding the row or rows containing "Fred" for the column fname.
Hope this Helps,
Mark
----- Original Message ----
From: "Sharp, Kirk (USMS)" <Kirk.Sharp@usdoj.gov>
To: classics@iiug.org
Sent: Wednesday, November 14, 2007 3:40:29 PM
Subject: IDS 11 optimistic locking [2637]
Does anyone have any information on IDS 11's new 'optimistic locking'
feature?
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.