Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Blocking due to Select For Update clause

Vinod Kumar G MJun 13 2019 — edited Jun 14 2019

Hi Team,

I have a select for update query like below.

select c1,c2 from tab1 where c1= 100 for update;

I have queried the V$ACTIVE_SESSION_HISTORY dynamic view. In the time waited column its showing some amount of time.

Below is the output from  V$ACTIVE_SESSION_HISTORY:

SESSION_ID SQL_ID        SQL_CHILD_NUMBER SESSION_TY SESSION BLOCKING_SESSION BLOCKING_SE EVENT                                                              EVENT_ID WAIT_CLASS                                                    TIME_WAITED

---------- ------------- ---------------- ---------- ------- ---------------- ----------- ---------------------------------------------------------------- ---------- ---------------------------------------------------------------- -----------

      5259 39m7f1a752hs7                0 FOREGROUND WAITING                  NO HOLDER   db file sequential read                                          2652584166 User I/O                                                                    35208

Here the time waited is 35208.

My question is:

1) is there any session or the transaction which is blocking this transaction.? if yes then in which dynamic view i will get the details.

2) Does select for update causes any performance issues

Comments
Post Details
Added on Jun 13 2019
6 comments
1,914 views