以下的文章主要描述的是Oracle性能检测sql语句中的一些项目的介绍 ,以及Oracle性能检测sql语句中的一些项目实际操作。以下就是文章的详细内容介绍,望大家浏览之后会有在此方面所收获。
监控 MTS
- select busy/(busy+idle) "shared servers busy" from v$dispatcher;
此值大于0.5时,参数需加大
- select sum(wait)/sum(totalq) "dispatcher waits"
from v$queue where type='dispatcher';- select count(*) from v$dispatcher;
- select servers_highwater from v$mts;
servers_highwater接近mts_max_servers时,参数需加大
碎片程度
- select tablespace_name,count(tablespace_name) from
dba_free_space group by tablespace_name- having count(tablespace_name)>10;
- alter tablespace name coalesce;
- alter table name deallocate unused;
- create or replace view ts_blocks_v as
- select tablespace_name,block_id,bytes,blocks,
'free space' segment_name from dba_free_space- union all
- select tablespace_name,block_id,bytes,blocks,
segment_name from dba_extents;- select * from ts_blocks_v;
- select tablespace_name,sum(bytes),max(bytes),
count(block_id) from dba_free_space- group by tablespace_name;
查看碎片程度高的表
- SELECT segment_name table_name , COUNT(*) extents
- FROM dba_segments WHERE owner NOT IN ('SYS', 'SYSTEM')
GROUP BY segment_name- HAVING COUNT(*) = (SELECT MAX( COUNT(*) )
FROM dba_segments GROUP BY segment_name);
在Oracle性能检测sql语句中表、索引的存储情况检查很重要。如以下
- select segment_name,sum(bytes),count(*)
ext_quan from dba_extents where- tablespace_name='&tablespace_name' and segment_type=
'TABLE' group by tablespace_name,segment_name;- select segment_name,count(*) from dba_extents where
segment_type='INDEX' and owner='&owner'- group by segment_name;
找使用CPU多的用户session
12是cpu used by this session
- select a.sid,spid,status,substr(a.program,1,40)
prog,a.terminal,osuser,value/60/100 value- from v$session a,v$process b,v$sesstat c
- where c.statistic#=12 and c.sid=a.sid and a.paddr=
b.addr order by value desc;
上述的相关内容就是对Oracle性能检测sql语句中的项目的描述,希望会给你带来一些帮助在此方面。
当前题目:Oracle性能检测sql语句中的项目
本文网址:http://www.shufengxianlan.com/qtweb/news31/439081.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联