|
SQL> select event,count(*) from v$session_wait
2 group by event order by count(*);
EVENT COUNT(*)
---------------------------------------------------------------- ----------
SQL*Net message to client 1
async disk IO 1
buffer busy global CR 1
buffer busy waits 1
ges remote message 1
pmon timer 1
wakeup time manager 1
smon timer 1
db file sequential read 2
gcs remote message 2
rdbms ipc message 10
EVENT COUNT(*)
---------------------------------------------------------------- ----------
SQL*Net message from client 591
12 rows selected.
select sid,event,p1,p2,p3,seconds_in_wait from v$session_wait
where event not like '%SQL*Net%'
and event not like '%timer%'
and event not like '%message%'
order by event;
** °úµµÇÑ logical read¸¦ ¼öÇàÇÏ´Â SQL¹®À» V$SQLAREA ¿¡¼ °Ë»öÇØÁÜ.
**
** ¿øÀÎ => 1) À妽º Ä÷³¿¡ distinctÇÑ °ªÀÌ ÀûÀº, ºÎÀûÀýÇÑ À妽ºÀÇ »ç¿ë. (´ëü·Î À妽º¸¦ Áö¿ö¾ß ÇÒ °æ¿ì)
** 2) ÃÖÀûÈ µÇÁö ¾ÊÀº SQL ¹®Àå
*/
select buffer_gets, sql_text from v$sqlarea
where buffer_gets > 200000
order by buffer_gets desc;
°úµµÇÑ disk read¸¦ ÇÏ´Â SQL¹®À» ã¾ÆÁÖ´Â ½ºÅ©¸³Æ®
select disk_reads, sql_text from v$sqlarea
where disk_reads > 10000
order by disk_reads desc;
SGAÀÇ shared pool ÀÇ ÇöÀç »ç¿ëµµ¸¦ Ãâ·ÂÇØÁÖ´Â SQL
/*
** shared_pool_sizeÀÇ ÇöÀç »ç¿ë ÇöȲÀ» º¸¿©ÁÜ. <¹ÚÁ¦¿ë>
**
** shared_pool_sizeÀÇ ÇöÀçÀÇ »ç¿ëÇöȲÀ» º¸¿©ÁØ´Ù.
** ÀÌ µ¥ÀÌÅ͸¦ ÁÖ±âÀûÀ¸·Î º¸°üÇÏ¿© ºÐ¼®ÇÑ´Ù.
*/
col value for 999,999,999,999 heading "Shared Pool Size"
col bytes for 999,999,999,999 heading "Free Bytes"
select to_number(v$parameter.value) value, v$sgastat.bytes,
(v$sgastat.bytes/v$parameter.value)*100 "Percent Free"
from v$sgastat, v$parameter
where v$sgastat.name = 'free memory'
and v$ parameter .name = ¡®shared_pool_size;
|