Hello all,
We have severe lock contention in one of our tables when it is being updated. I suspect contention for a specific row in the database. Is there anyway i can detect this hot block?
Thanks in advance,
Nikesh.
Printable View
Hello all,
We have severe lock contention in one of our tables when it is being updated. I suspect contention for a specific row in the database. Is there anyway i can detect this hot block?
Thanks in advance,
Nikesh.
This script will report the SQL text of some of the locks currently being held in the database:
set pagesize 60
set linesize 132
select s.username username,
a.sid sid,
a.owner||'.'||a.object object,
s.lockwait,
t.sql_text SQL
from v$sqltext t,
v$session s,
v$access a
where t.address=s.sql_address
and t.hash_value=s.sql_hash_value
and s.sid = a.sid
and a.owner != 'SYS'
and upper(substr(a.object,1,2)) != 'V$'
/