首页 > Linux操作系统 > Linux操作系统 > oracle常用SQL查詢
1.9i查詢命中率.sql
select a.value + b.value "logical_reads", c.value "phys_reads",
round(100 * ((a.value+b.value)-c.value) / (a.value+b.value)) "BUFFER HIT RATIO"
from v$sysstat a, v$sysstat b, v$sysstat c
where a.statistic# = 40 and b.statistic# = 41 and c.statistic# = 42;
2.擴展空間查詢:
select a.owner||'.'||a.segment_name,
a.segment_type ,
a.bytes/1024/1024 ,
a.next_extent/1024/1024 ,
a.tablespace_name
from sys.dba_segments a
where a. next_extent * &nun > (
select max(b.bytes)
from dba_free_space b
where a.tablespace_name = b.tablespace_name)
order by 3 desc
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12137615/viewspace-539808/ ,如需转载,请注明出处,否则将追究法律责任。