Home » SQL & PL/SQL » SQL & PL/SQL » Row Locks and Physical blocks
Row Locks and Physical blocks [message #235306] Fri, 04 May 2007 17:29 Go to next message
g-rz
Messages: 3
Registered: May 2007
Junior Member
It is true that when a oracle locks a row because a DML operation was executed, all the records in the same physical block are also blocked?

Thanks in advance

Re: Row Locks and Physical blocks [message #235307 is a reply to message #235306] Fri, 04 May 2007 18:07 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>It is true that when a oracle locks a row because a DML operation was executed, all the records in the same physical block are also blocked?


IMO, No & not sure why you were unable or unwilling to do as below.
Frome session#1

SQL> set time on
15:52:35 SQL> create table test1 (rec_id number, rec_val varchar2(31));

Table created.

15:53:33 SQL> insert into test1 values (1,'a');

1 row created.

15:54:11 SQL> insert into test1 values (2,'b');

1 row created.

15:54:28 SQL> commit;

Commit complete.

16:01:10 SQL>  update test1 set rec_val = 'z' where rec_id = 1;

1 row updated.

16:01:44 SQL> commit;

Commit complete.

16:02:21 SQL> 


From session #2

16:01:52 SQL> update test1 set rec_val = 'x' where rec_id = 2;

1 row updated.

16:02:07 SQL> commit;

Commit complete.

16:02:11 SQL> 


If your hypothesis was correct, I should not have been able to
UPDATE WHERE rec_id = 2

QED!
icon10.gif  Re: Row Locks and Physical blocks [message #235310 is a reply to message #235307] Fri, 04 May 2007 19:32 Go to previous message
g-rz
Messages: 3
Registered: May 2007
Junior Member
Thank you indeed, I was sure of it, but I listened it from an OCP as result of the process "row migration", surely that he got confused with some term. May be with the column "Block" of the v$lock view.
Previous Topic: POSITIONAL HIERARCHY
Next Topic: Need help in query
Goto Forum:
  


Current Time: Sat Dec 10 06:46:07 CST 2016

Total time taken to generate the page: 0.04161 seconds