set lines 132
set pages 100
set time on
set timing on
col username format a20
col program format a30
spool redo_vol
--1) Query V$SESS_IO. This view contains the column BLOCK_CHANGES which indicates
-- how much blocks have been changed by the session. High values indicate a
-- session generating lots of redo.
-- The query you can use is:
SELECT s.sid, s.serial#, s.username, s.program, i.block_changes
FROM v$session s, v$sess_io i
WHERE s.sid = i.sid
AND i.block_changes > 200
ORDER BY 5 desc, 1, 2, 3, 4;
-- Run the query multiple times and examine the delta between each occurrence
-- of BLOCK_CHANGES. Large deltas indicate high redo generation by the session.
--2) Query V$TRANSACTION. This view contains information about the amount of
-- undo blocks and undo records accessed by the transaction (as found in the
-- USED_UBLK and USED_UREC columns).
-- The query you can use is:
SELECT s.sid, s.serial#, s.username, s.program, t.used_ublk, t.used_urec
FROM v$session s, v$transaction t
WHERE s.taddr = t.addr
AND t.used_ublk > 200
ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;
-- Run the query multiple times and examine the delta between each occurrence
-- of USED_UBLK and USED_UREC. Large deltas indicate high redo generation by
-- the session.
spool off
set pages 100
set time on
set timing on
col username format a20
col program format a30
spool redo_vol
--1) Query V$SESS_IO. This view contains the column BLOCK_CHANGES which indicates
-- how much blocks have been changed by the session. High values indicate a
-- session generating lots of redo.
-- The query you can use is:
SELECT s.sid, s.serial#, s.username, s.program, i.block_changes
FROM v$session s, v$sess_io i
WHERE s.sid = i.sid
AND i.block_changes > 200
ORDER BY 5 desc, 1, 2, 3, 4;
-- Run the query multiple times and examine the delta between each occurrence
-- of BLOCK_CHANGES. Large deltas indicate high redo generation by the session.
--2) Query V$TRANSACTION. This view contains information about the amount of
-- undo blocks and undo records accessed by the transaction (as found in the
-- USED_UBLK and USED_UREC columns).
-- The query you can use is:
SELECT s.sid, s.serial#, s.username, s.program, t.used_ublk, t.used_urec
FROM v$session s, v$transaction t
WHERE s.taddr = t.addr
AND t.used_ublk > 200
ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;
-- Run the query multiple times and examine the delta between each occurrence
-- of USED_UBLK and USED_UREC. Large deltas indicate high redo generation by
-- the session.
spool off
No comments:
Post a Comment