您的位置:首页 > 其它

排序区大小对于排序时产生的内存与文件交换I/O次数影响

2011-02-28 22:47 295 查看
select a.name, b.value
from v$statname a, v$sesstat b
where a.statistic# = b.statistic#
and b.sid = 159
and (a.name like '%ga %' or a.name like '%direct temp%')

查询UGA,PGA,I/O的大小

sort_area_size=65536

1 session uga memory 2304288
2 session uga memory max 152710332
3 session pga memory 8646228
4 session pga memory max 161476180
5 physical reads direct temporary tablespace 2623
6 physical writes direct temporary tablespace 2623

执行排序查询//

1 session uga memory 2304288
2 session uga memory max 152710332
3 session pga memory 8646228
4 session pga memory max 161476180
5 physical reads direct temporary tablespace 4545
6 physical writes direct temporary tablespace 4545

4545-2623=1922,1922次I/O操作

sort_area_size=1048576

执行排序查询//

1 session uga memory 2304288
2 session uga memory max 152710332
3 session pga memory 8646228
4 session pga memory max 161476180
5 physical reads direct temporary tablespace 5243
6 physical writes direct temporary tablespace 5243

5243-4545=698,698次I/O操作,说明排序区内存增加,I/O读写次数减少
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐