Re: Multiple update problem

From: Mungo Henning <mungoh_at_itacs.strath.ac.uk>
Date: Thu, 21 May 1998 14:54:34 +0100
Message-ID: <3564321A.573E260_at_itacs.strath.ac.uk>


Thomas Kyte wrote:

> >[multiple update scenario snipped]
>
> Read consistency applies to Reads. Reads will not block in Oracle (unless of
> course they are select ... for update which is similar to updating the data).
>
> In order to have consistent data in the database however, Writes may (and will
> at times) block other writes. UserA is writing, UserB is writing -- UserA and
> UserB may block eachother.
Therefore would I be correct in concluding that the index for a table (I'm assuming
that there's only one, but I know better than that) similarly has some locking
mechanism applied to it to prevent two (or more) users from updating it at the same
time?

> No, the block would not be released until UserA commits. that is because UserA
> 'owns' the row with the value 10, the row with the value 90 (that doesn't exist
> anymore but does exist in reality -- it was there), and the row with the value
> 80 -- they are all the same row -- UserA just owns all of the index entries
> right now.
>
Is there high traffic on indexes then? Is it right to think that the index for
record ten is marked as "unavailable" whilst userA is altering it to ninety?
Further, if the user subsequently alters the deptno to eighty, we have two
values in the index which reference "unavailable" records?

Again, thanks in advance

Mungo Henning Received on Thu May 21 1998 - 15:54:34 CEST

Original text of this message