Skip to Main Content

SQL & PL/SQL

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!

Update statement takes Long time

JaKes9Dec 15 2017 — edited Dec 15 2017

Hi All,

I have a procedure in which i insert a row into a table and commits the transaction, after few statements i am updating the same row. But when execution reaches the 'UPDATE' statement, it goes into a hang state, means keeps on executing. I have to kill the execution after a long time (say 2-3 hours).

Its a simple update statement, but dont know why this happens.

'Update t set state = '999' where pl_id = &cid;'

If I try to update another record in the same table, it's working fine.

I executed the explain plan 'SELECT * FROM table(DBMS_XPLAN.DISPLAY);' for the Update statement

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

| Id  | Operation         | Name       | Rows  | Bytes | Cost  |

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

|   0 | UPDATE STATEMENT  |            |     1 |    38 |     3 |

|   1 |  UPDATE           | T   |       |       |       |

|   2 |   INDEX RANGE SCAN| ND_PK |     1 |    38 |     2 |

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

Could someone please help , if there is any lock on the record, then how to remove it.

Thanks&Regards

JaKes

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2018
Added on Dec 15 2017
10 comments
6,565 views