The cross tab report generates a listing showing the statistics of concern as
headers across the page rather than listings going down the page and summarizes
them by object. This allows us to easily compare total buffer busy waits to the
number of ITL or row lock waits. This ability to compare the ITL and row lock
waits to buffer busy waits lets us see what objects may be experiencing
contention for ITL lists, which may be experiencing excessive locking activity
and through comparisons, which are highly contended for without the row lock or
ITL waits. AN example of the output of the report, edited for length, is shown
below.
Object ITL Waits Busy
Waits Row Lock Waits Physical Reads Logical Reads
------------- --------- ----------------- --------------
-------------- -------------
BILLING 0 63636 38267
1316055 410219712
BILLING_INDX1 1 16510
55 151085 21776800
...
DELIVER_INDX1 1963 36096 32962
1952600 60809744
DELIVER_INDX2 88
16250 9029
18839481 342857488
DELIVER_PK 2676
99748 29293
15256214 416206384
...
All Objects 12613 20348859 1253057 1139977207
20947864752
In the above report the BILLING_INDX1 index has a large
amount of buffer busy waits but we can't account for them from the ITL or Row
lock waits, this indicates that the index is being constantly read and the
blocks then aged out of memory forcing waits as they are re-read for the next
process. On the other hand, almost all of the buffer busy waits for the
DELIVER_INDX1 index can be attributed to ITL and Row Lock waits. In situations
where there are large numbers of ITL waits we need to consider the increase of
the INITRANS setting for the table to remove this source of contention.
ORA-00060 and INITRANS shortage
There can also be a ORA-00060 "deadlock detected"
where the table and index INITRANS is set too low. The "Interested Transaction
List" and deadlocks caused by an ITL-shortage as described in MOSC note
62354.1. The eBook "Oracle
Space Management Handbook" also has notes on the internals of ITL.
You can also see
ITL waits in a STATSPACK or AWR report, in the segments section we see this
section: Segments by ITL Waits:
Includes segments that had a large contention for Interested Transaction List (ITL).
The contention for ITL can be reduced by increasing INITRANS storage parameter
of the table.
Also,
Arup Nanda shares scripts for detecting ITL waits:
Select
s.sid
SID,
s.serial# Serial#,
l.type type,
' ' object_name,
lmode held,
request request
from
v$lock l,
v$session s,
v$process p
where
s.sid = l.sid and
s.username <> ' ' and
s.paddr = p.addr and
l.type <> 'TM' and
(l.type <> 'TX' or l.type = 'TX' and l.lmode <> 6)
union
select
s.sid
SID,
s.serial# Serial#,
l.type type,
object_name object_name,
lmode held,
request request
from
v$lock l,
v$session s,
v$process p,
sys.dba_objects o
where
s.sid = l.sid and
o.object_id = l.id1 and
l.type = 'TM' and
s.username <> ' ' and
s.paddr = p.addr
union
select
s.sid
SID,
s.serial# Serial#,
l.type type,
'(Rollback='||rtrim(r.name)||')' object_name,
lmode held,
request request
from
v$lock l,
v$session s,
v$process p,
v$rollname r
where
s.sid = l.sid and
l.type = 'TX' and
l.lmode = 6 and
trunc(l.id1/65536) = r.usn and
s.username <> ' ' and
s.paddr = p.addr
order by 5, 6;
|
If you like Oracle tuning, see the book "Oracle
Tuning: The Definitive Reference", with 950 pages of tuning tips and
scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |