Scripts:查询sga中各组件使用率的脚本perf_sga_usage.sql
2014-06-02 17:08
405 查看
-- +----------------------------------------------------------------------------+
-- | Jeffrey M. Hunter |
-- | jhunter@idevelopment.info |
-- | www.idevelopment.info |
-- |----------------------------------------------------------------------------|
-- | Copyright (c) 1998-2011 Jeffrey M. Hunter. All rights reserved. |
-- |----------------------------------------------------------------------------|
-- | DATABASE : Oracle |
-- | FILE : perf_sga_usage.sql |
-- | CLASS : Tuning |
-- | PURPOSE : Report on all components within the SGA. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
SET LINESIZE 145
SET PAGESIZE 9999
SET FEEDBACK off
SET VERIFY off
COLUMN bytes FORMAT 999,999,999
COLUMN percent FORMAT 999.99999
break on report
compute sum of bytes on report
compute sum of percent on report
SELECT
a.name
, a.bytes
, a.bytes/(b.sum_bytes*100) Percent
FROM sys.v_$sgastat a
, (SELECT SUM(value)sum_bytes FROM sys.v_$sga) b
ORDER BY bytes DESC
/
-- | Jeffrey M. Hunter |
-- | jhunter@idevelopment.info |
-- | www.idevelopment.info |
-- |----------------------------------------------------------------------------|
-- | Copyright (c) 1998-2011 Jeffrey M. Hunter. All rights reserved. |
-- |----------------------------------------------------------------------------|
-- | DATABASE : Oracle |
-- | FILE : perf_sga_usage.sql |
-- | CLASS : Tuning |
-- | PURPOSE : Report on all components within the SGA. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
SET LINESIZE 145
SET PAGESIZE 9999
SET FEEDBACK off
SET VERIFY off
COLUMN bytes FORMAT 999,999,999
COLUMN percent FORMAT 999.99999
break on report
compute sum of bytes on report
compute sum of percent on report
SELECT
a.name
, a.bytes
, a.bytes/(b.sum_bytes*100) Percent
FROM sys.v_$sgastat a
, (SELECT SUM(value)sum_bytes FROM sys.v_$sga) b
ORDER BY bytes DESC
/
相关文章推荐
- Scripts:查询数据文件IO使用率的脚本 perf_file_io.sql
- Scripts:查询db_block_buffer使用率的脚本perf_db_block_buffer_usage.sql
- Scripts:查询每个数据文件等待时间的脚本perf_file_waits.sql
- Scripts:查看数据文件使用率的脚本(包括临时表空间的文件哦)dba_file_space_usage.sql
- Scripts:查询每个数据文件使用效率的脚本perf_file_io_efficiency.sql
- Scripts:查询每个session命中率的脚本perf_hit_ratio_by_session.sql
- Scripts:查询log file sync 等待的脚本lfsdiag.sql
- [转] 使用SQL脚本查看表空间使用率和使用dba_tablespace_usage_metrics视图的差别
- Scripts:根据sid,ospid来查询进程信息的脚本os_pid.sql
- Scripts:找出使用最多buffer get的SQL脚本perf_top_sql_by_buffer_gets.sql
- Scripts:查询回滚段信息的脚本rollback_segments.sql
- Scripts:报告sga中空闲内存的情况perf_sga_free_pool.sql
- Scripts:查询所有参数修改信息的脚本parm_mods.sql
- Scripts:查询物理读最多的10个SQL的脚本hphy10.sql
- [转] 使用SQL脚本查看表空间使用率和使用dba_tablespace_usage_metrics视图的区别
- sql语句脚本之查询PGA,sga等命中率
- Scripts:找出使用最高的10个表的脚本perf_top_10_tables.sql
- Scripts:查询参数信息的脚本parms.sql
- Scripts:查询等待事件的SQL脚本owi_event_names.sql
- Scripts:查询没有统计信息的对象perf_objects_without_statistics.sql