1
SQL> select (u.used/a.bytes)*100 shared_pool_usage
2 from (select sum(bytes) used
3 from v$sgastat
4 where pool = 'shared pool'
5 and name <> 'free memory') u,
6 (select sum(bytes) bytes from v$sgastat
7 where pool='shared pool') a
8 /
SHARED_POOL_USAGE
-----------------
45.8586752414703
说明:
共享池利用率 40%-60% 属于安全
60%-80% 适当
>80% 分配不足
2
SQL> select (f.bytes/u.bytes)*100 shared_pool_usage_free_ratio
2 from (select sum(bytes) bytes from v$sgastat
3 where pool='shared pool' and name <> 'free memory') u,
4 (select sum(bytes) bytes from v$sgastat
5 where pool='shared pool' and name = 'free memory') f
6 /
SHARED_POOL_USAGE_FREE_RATIO
----------------------------
118.938190200381
说明:
空闲内存与共享池当前使用内存的比率,最佳比率 20%
<20% 适当
20%-100% 关注过多
>100% 过度分配
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/593324/viewspace-376185/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/593324/viewspace-376185/
本文提供了两个SQL查询,用于分析数据库的Shared Pool利用率。第一个查询显示了共享池的使用率,指出40%-60%为安全范围,60%-80%需适当关注,超过80%则可能表示分配不足。第二个查询展示了空闲内存与当前使用内存的比例,比率在20%以下为适当,20%-100%需关注,超过100%则可能过度分配。
1184

被折叠的 条评论
为什么被折叠?



