Right, I understand that... but we are talking about crazy small amounts
of time here.... especially as I had show it coded, with no big chunks of
logic that would cause a gap in time. Everything would happen within a
couple milliseconds or faster. My point was that it would be so very
unlikely, and if it was a regular occurrence then there is probably need
for commitment control or program/process design review.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
Barbara Morris <bmorris@xxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
05/27/2011 08:20 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
rpg400-l@xxxxxxxxxxxx
cc
Subject
Re: Embedded SQL - performance question
On 5/27/2011 2:47 PM, Bryce Martin wrote:
essentially... the record would need to be added within the amount of
time
that it takes to do an "if %found" check...
It's not just the time taken to do the "if %found"; its the time between
when database determined there was no record to the time that your WRITE
request reaches database.
Say some other job was starting a WRITE at around the same time as your
CHAIN, but when when database does the check for the record for your
CHAIN, the WRITE operation in the other job hasn't reached database yet.
When your job finds that the record is not there, it will start its own
WRITE operation, but that other job had a head start, and would have got
the record in first.
As an Amazon Associate we earn from qualifying purchases.