如何查看一个SESSION占的内存大小

[复制链接]
查看11 | 回复6 | 2007-9-26 18:42:10 | 显示全部楼层 |阅读模式
如何查看一个SESSION占的内存大小
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层

回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
v$sesstat / v$statname just ok
and v$session for more session info
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
select * from v$statname where name like '%memory%';
then
join v$sessstat
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
最初由 zhang_yong88 发布
[B]select * from v$statname where name like '%memory%';
then
join v$sessstat [/B]

运行了,但还是行不到内存值,具体怎样做呢?
SQL> select * from v$statname where name like '%memory%';
STATISTIC# NAME
CLASS
---------- ---------------------------------------------------------------- ----------
15 session uga memory
1
16 session uga memory max
1
20 session pga memory
1
21 session pga memory max
1
226 workarea memory allocated
64
242 sorts (memory)
64
6 rows selected
SQL> select * from v$sesstat where value > 0;
SID STATISTIC#VALUE
---------- ---------- ----------
1
0
1
1
1
1
1
6
2
1 1576960
1 1676960
1 20 199760
1 21 199760
1 25
1
1 27
1
2
0
1
2
1
1
2
6
2
2 12
1
2 1576960
2 1676960
2 17 77
2 18109
2 19 1448
2 201852840
2 211852840
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
SELECT SUM(VALUE) || ' BYTES' "TOTAL MEMORY FOR ALL SESSIONS"
FROM V$SESSTAT, V$STATNAME
WHERE NAME = 'session uga memory'
AND V$SESSTAT.STATISTIC# = V$STATNAME.STATISTIC#;
用以查看所有回话的内存大小
回复

使用道具 举报

千问 | 2007-9-26 18:42:10 | 显示全部楼层
G:\Oracle 10g\a.jpg
这个可以用来查看每个回话的内存
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行