Re: IDS 11 optimistic locking
Posted in 2007
Topics: Server Administration, Transactions, Locking & Isolation, Platform-Specific Issues
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.
Hello,
the new feature
> 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.
could be helpful especially when porting applications from Oracle to Informix.
Oracle returns COMMITTED DATA always and only, but that data
may be 'outdated'. And that's still the difference: Oracle returns all the
data for a special timestamp (change number), Informix the last committed.
When you have long running SQLs/Transactions you may notice the difference.
Regards,
Andreas Kutsche
>
-------------------------------------------
SPAR Österreichische Warenhandels-AG
Hauptzentrale
A - 5015 Salzburg, Europastrasse 3
FN 34170 a
Tel: +43 662 4470 24223
Mobile: +43 664 6259575
E-Mail: Andreas.KUTSCHE@spar.at
Internet: http://www.spar.at
Wichtiger Hinweis: Der Inhalt dieser E-Mail kann vertrauliche und rechtlich
geschützte Informationen, insbesondere Betriebs- oder Geschäftsgeheimnisse,
enthalten, zu deren Geheimhaltung der Empfänger verpflichtet ist. Die
Informationen in dieser E-Mail sind ausschließlich für den Adressaten
bestimmt. Sollten Sie die E-Mail irrtümlich erhalten haben so ersuchen wir
Sie, die Nachricht von Ihrem System zu löschen und sich mit uns in Verbindung
zu setzen.
Über das Internet versandte E-Mails können leicht manipuliert oder unter
fremdem Namen erstellt werden. Daher schließen wir die rechtliche
Verbindlichkeit der in dieser Nachricht enthaltenen Informationen aus. Der
Inhalt der E-Mail ist nur rechtsverbindlich, wenn er von uns schriftlich
bestätigt und gezeichnet wird.
Sollte trotz der von uns verwendeten Virus-Schutzprogramme durch die Zusendung
von E-Mails ein Virus in Ihre Systeme gelangen, haften wir nicht für evtl.
hieraus entstehende Schäden.
Wir danken für Ihr Verständnis.
Important notice: The contents of this e-mail may contain confidential and
legally protected information that is in particular related to operational and
trade secrets, which the recipient is obliged to treat as confidential. The
information in this e-mail is made available exclusively for use by the
addressee. In the event that the e-mail may have been sent to you in error, we
would ask you to kindly delete this communication from your system and to
contact us.
E-mails sent via the Internet can be easily manipulated or sent out under
someone else's name. We therefore do not accept legal liability for the
information contained in this communication. The contents of the e-mail are
only legally binding if they have been confirmed and signed by us in writing.
If, in spite of our using Antivirus protection software, a virus may have
penetrated your system through the sending of this e-mail, we do not accept
liability for any damage that may possibly arise as a result of this.
We trust that you appreciate our position.
-------------------------------------------
-----Ursprüngliche Nachricht-----
> Von: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Im Auftrag von
> Mark Jamison
> Gesendet: Donnerstag, 15. November 2007 15:54
> An: ids@iiug.org
> Betreff: Re: IDS 11 optimistic locking [10377]
>
> 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.
>
>
> **************************************************************************
> *****
> Forum Note: Use "Reply" to post a response in the discussion forum.