Re: Lock
Date: Sat, 10 Mar 2012 14:57:21 -0300
Message-ID: <CAJ2dSGS-SAqDBJJfL=EW20iec=jf=eWLa7D8jzJTQh_FZgoApQ_at_mail.gmail.com>
Have you tested this?
create table test_update (name varchar2(200)); insert into test_update values('Name1'); insert into test_update values('Name2'); insert into test_update values('Name3'); insert into test_update values('Name4');commit;
Table created. 1 row created. 1 row created. 1 row created. 1 row created.
Commit complete.
select * from test_update;
NAME
Name1
Name2
Name3
Name4
v$lock for my sessions shows nothing relevant: (only AE locks)
update test_update set name='test';
v$lock shows this:
00002B363BD5B9B0 00002B363BD5BA10 293 TM 70363 0 3
0 5 0
0000000212725240 00000002127252B8 293 TX 655393 78826
6 0 6 0
in case you are wondering (from v$lock_type) TM DML Synchronizes accesses to an object TX Transaction Lock held by a transaction to allow other transactions to wait for it
this to me means there's only one lock holding all four rows.
hth...
Alan.-
On Sat, Mar 10, 2012 at 1:56 PM, Paul Harrison <cure_at_austin.rr.com> wrote:
> Hello,
>
>
> I have a table with four rows. I issue the sql statement: update table set
> name = 'test'; this will update 4 rows. Will Oracle create 4 locks one for
> each row or 1 lock for the 4 rows?
>
>
>
> Thanks,
>
> Paul
>
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Sat Mar 10 2012 - 11:57:21 CST