SELECT A.CREATOR ,
B.SQL_TEXT ,SUM(A.TOTAL_SIZE)/1024.0/1024.0 TOTAL_M,SUM(A.DATA_SIZE)/1024.0/1024.0 DATA_SIZE_M --实际使用量FROM V$MEM_POOL A,
V$SESSIONS B
WHERE A.CREATOR = B.THRD_ID
GROUPBY A.CREATOR,
B.SQL_TEXT
ORDERBY TOTAL_M DESC;
缓冲区
SELECT(SELECTSUM(CAST(PAGE_SIZE AS NUMBER)*CAST(N_PAGES AS NUMBER))/1024/1024FROM
V$BUFFERPOOL
)||'MB'AS 缓冲区总大小,(SELECTSUM(TOTAL_SIZE)/1024/1024FROM
V$MEM_POOL
)||'MB'AS 池总大小,(SELECTSUM(CAST(PAGE_SIZE AS NUMBER)*CAST(N_PAGES AS NUMBER))/1024/1024FROM
V$BUFFERPOOL
)+(SELECTSUM(TOTAL_SIZE)/1024/1024FROM
V$MEM_POOL
)||'MB'AS 总内存大小
FROM DUAL;