sql实例之《D33513-ORACLE9i Performance Tuning Vol1.pdf》

上一篇 / 下一篇  2008-05-11 19:07:03 / 个人分类:oracle ocp 033性能调优

select name,class,value from v$sysstat
/

select * from v$sgastat
/

select sid,username,type,server from v$session
/

select username,name, value
  from v$statname n, v$session s, v$sesstat t
 where s.sid=t.sid
   and n.STATISTIC#=t.STATISTIC#
   and s.TYPE='USER'
   and s.USERNAME is not null
   and n.NAME ='session pga memory'
   and t.VALUE>300
/

select sid,event from v$session_wait where wait_time=0
/

select name,parameter1,parameter2,parameter3 from v$event_name
/

select event,total_waits,total_timeouts,time_waited,average_wait from v$system_event
/

select sid,event,total_waits,average_wait from v$session_event where sid=13
/

select sid,seq#,event,wait_time,state from v$session_wait
/

select gethitratio from v$librarycache where namespace='SQL AREA'
/

select sql_text,users_executing,executions,loads from v$sqlarea
/

select * from v$sqltext where sql_text like 'select %'
/

select namespace,gethitratio from v$librarycache
/

select sum(pins) "Executions",sum(reloads) "Cache Misses", sum(reloads)/sum(pins) from v$librarycache
/

select count(*) from hr.employees
/

select namespace,pins,reloads,invalidations from v$librarycache
/

analyze table hr.employees compute statistics
/

select count(*) from hr.employees
/

select namespace,pins,reloads,invalidations from v$librarycache
/

select sum(sharable_mem) from v$db_object_cache
/

select sum(sharable_mem) from v$sqlarea where executions>5
/

select sum(sharable_mem) from v$db_object_cache where type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
/

select sum(250*users_opening) from v$sqlarea
/


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-05-17  
    123
45678910
11121314151617
18192021222324
25262728293031

我的存档

数据统计

  • 访问量: 71
  • 日志数: 16
  • 图片数: 1
  • 书签数: 3
  • 建立时间: 2008-05-10
  • 更新时间: 2008-05-16

RSS订阅

Open Toolbar