- Oracle Database 12c Backup and Recovery Survival Guide
- Francisco Munoz Alvarez Aman Sharma
- 253字
- 2021-04-02 10:19:59
Finding sessions that generate lots of redo
To find sessions generating lots of redo, you can use either of the following methods. Both methods examine the amount of undo generated. When a transaction generates undo, it will automatically generate redo as well.
- Query
v$sess_io
: This view contains the columnblock_changes
, which indicates how many blocks have been changed by the session. High values indicate a session generating lots of redo. - The query you can use is:
SQL> SELECT s.sid, s.serial#, s.username, s.program, i.block_changes 2 FROM v$session s, v$sess_io i 3 WHERE s.sid = i.sid 4 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. - Query
v$transaction
: This view contains information about the amount of undo blocks and undo records accessed by the transaction (as found in theused_ublk
andused_urec
columns). - The query you can use is:
SQL> SELECT s.sid, s.serial#, s.username, s.program, t.used_ublk, t.used_urec 2 FROM v$session s, v$transaction t 3 WHERE s.taddr = t.addr 4 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
andused_urec
. Large deltas indicate high redo generation by the session.
You use the first query when you need to check for programs generating lots of redo when these programs activate more than one transaction. The latter query can be used to find out which particular transactions are generating redo.
推薦閱讀
- C++程序設(shè)計(jì)教程
- 精通Nginx(第2版)
- Docker技術(shù)入門與實(shí)戰(zhàn)(第3版)
- GraphQL學(xué)習(xí)指南
- 零基礎(chǔ)學(xué)Scratch少兒編程:小學(xué)課本中的Scratch創(chuàng)意編程
- JMeter 性能測試實(shí)戰(zhàn)(第2版)
- R語言數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南
- Web全棧工程師的自我修養(yǎng)
- 面向?qū)ο蟪绦蛟O(shè)計(jì)(Java版)
- Python機(jī)器學(xué)習(xí)基礎(chǔ)教程
- C/C++程序員面試指南
- LabVIEW虛擬儀器程序設(shè)計(jì)從入門到精通(第二版)
- Delphi開發(fā)典型模塊大全(修訂版)
- 深度實(shí)踐KVM:核心技術(shù)、管理運(yùn)維、性能優(yōu)化與項(xiàng)目實(shí)施
- 網(wǎng)頁設(shè)計(jì)與制作