[筆記]Oracle9i Monitoring Automated SQL Execution Memory Management
監控9i自動管理PGA的一些指令碼。
0.The following query returns a percentage of work areas used with optimal memory size.
select
trunc (
(sum(case when name like 'workarea executions - optimal'
then value else 0 end) *100) /
(
sum(case when name like 'workarea executions - optimal'
then value else 0 end) +
sum(case when name like 'workarea executions - one pass'
then value else 0 end) +
sum(case when name like 'workarea executions - multipass'
then value else 0 end)
)
) optimal_percent
from v$sysstat
where name like 'workarea executions - %'
/
1. Finding top ten work areas requiring the most cache memory:
select *
from
(select workarea_address, operation_type, policy, estimated_optimal_size
from v$sql_workarea
order by estimated_optimal_size DESC)
where ROWNUM <=10;
2. Finding the percentage of work areas using maximum memory:
select operation_type, total_executions * 100 / optimal_executions "%cache"
From v$sql_workarea
Where policy='AUTO'
And optimal_executions > 0
Order By operation_type;
3. Finding the top ten biggest work areas currently allocated in the system:
select c.sql_text, w.operation_type, top_ten.wasize
From (Select *
From (Select workarea_address, actual_mem_used wasize
from v$sql_workarea_active
Order by actual_mem_used)
Where ROWNUM <=10) top_ten,
v$sql_workarea w,
v$sql c
Where w.workarea_address=top_ten.workarea_address
And c.address=w.address
And c.child_number = w.child_number
And c.hash_value=w.hash_value;
4. Finding the percentage of memory that is over and under allocated:
select total_used,
under*100/(total_used+1) percent_under_use,
over*100/(total_used+1) percent_over_used
From
( Select
sum(case when expected_size > actual_mem_used
then actual_mem_used else 0 end) under,
sum(case when expected_size<> actual_mem_used
then actual_mem_used else 0 end) over,
sum(actual_mem_used) total_used
From v$sql_workarea_active
Where policy='AUTO') usage;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/6906/viewspace-21624/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Memory Management in RustRust
- SQL Server 2012 記憶體管理 (memory management) 改進SQLServer記憶體
- 12. 記憶體管理(Memory Management)記憶體
- memory management unit (MMU)
- Linux Memory ManagementLinux
- Java Monitoring, Management and Troubleshooting ToolsJava
- Oracle Shared Pool Memory ManagementOracle
- Oracle Automatic PGA Memory ManagementOracle
- Oracle Memory Management and HugePage (連載一)Oracle
- Oracle Memory Management and HugePage (連載二)Oracle
- Oracle Memory Management and HugePage (連載三)Oracle
- Oracle Memory Structure 1. Overview And ManagementOracleStructView
- Oracle9i Table monitoring 及10g table預設monitoring屬性Oracle
- Linux Memory Management or 'Why is there no free RAM?' (zt)Linux
- oracle11g memory management系列(一)Oracle
- PGA Memory Management for Dedicated Mode (102)
- Parallel Execution of SQL StatementsParallelSQL
- oracle9i學習筆記Oracle筆記
- sql monitoring實驗SQL
- jconsole - Java Monitoring and Management ConsoleJava
- SQL management baseSQL
- SQL Plan ManagementSQL
- ORACLE APP培訓筆記(2) -- Order ManagementOracleAPP筆記
- Oracle Real Time SQL MonitoringOracleSQL
- 11gR2 新特性之—In-Memory Parallel executionParallel
- SQL Plan Management(SPM)SQL
- [筆記] 解碼Nginx:記憶體池(Memory Pool)筆記Nginx記憶體
- sql筆記SQL筆記
- MSSQL2005-QUERY EXECUTION學習筆記一SQL筆記
- SQL Plan Management介紹SQL
- Oracle9i standby 資料庫筆記(zt)Oracle資料庫筆記
- rh131筆記---unit2-package management筆記Package
- Monitoring Tempdb in SQL Server 2005SQLServer
- C++ atomic 和 memory ordering 筆記C++筆記
- MSSQL2005-QUERY EXECUTION學習筆記之二SQL筆記
- Oracle9i, 10g Table monitoring 設定 及 STATISTIC_LEVELOracle
- sql net message from|to client與sql execution countSQLclient
- Linux memory management——(程式虛存空間的管理)(轉)Linux