V$segstat
select * from v$segstatwhere obj#=&objid;[@more@]select * from v$segstatwhere obj#=&objid;特别要注意那些 能够标示争用的条目(buffer busy waits、gc buffer busy、 ITL waits、row lock waits)以及表扫描和索引快速全扫描(segment scans)明显的突出点,顺便STATISTIC#缺少8and13 两个值,两者分别为 老化的时间标记和服务的ITL等待——对于块分割来说,后者更有用
表空间sql
COL use_rage FOR a10SELECT UPPER(f.tablespace_name) tablespace_name,d.Tot_grootte_Mb total_Mb,d.Tot_grootte_Mb - f.total_bytes used_Mb,TO_CHAR(ROUND((d.Tot_grootte_Mb - f.total_bytes) / d.Tot_grootte_Mb * 100,2),'990.99') use_rage,f.total_bytes free_Mb,f.max_bytes max_block FROM (SELECT tablespace_name,ROUND(SUM(bytes)/(1024*1024),2) total_bytes,ROUND(MAX(bytes)/(1024*1024),2) max_bytesFROM sys.DBA_FREE_SPACEGROUP BY tablespace_name) f,(SELECT dd.tablespace_name, ROUND(SUM(dd.bytes)
Runstats 脚本
转Thomas Kyte's Runstats 功能对比sql之间的parse,latch等等[@more@]Requirements In order to run this test harness you must at a minimum have: Access to V$STATNAME, V$MYSTAT, v$TIMER and V$LATCH You must be granted select DIRECTLY on SYS.V_$STATNAME, SYS.V_$MYSTAT, SYS.V_$TIMER and SYS.V_$LATCH. It will not work to have select on these via a ROLE. (conn / as sysdbagrant select on SYS.V_$STATNAME to USER...)The ability to create a table -- run_stats -- to hold the before, during and after informati