数据库性能问题!!

[复制链接]
查看11 | 回复9 | 2012-1-4 11:51:22 | 显示全部楼层 |阅读模式
第一个问题
Recursive Call %:93.85
Parse CPU to Parse Elapsd %: 93.85
递归太高!
第二个问题
Top 5 Timed Events
Avg %Total
~~~~~~~~~~~~~~~~~~
wait Call
Event
WaitsTime (s) (ms) Time
----------------------------------------- ------------ ----------- ------ ------
CPU time
22,425
95.5
latch: library cache
15,573 305 201.3
latch: cache buffers chains
5,998 247 411.1
latch: library cache pin
5,495 245 451.0
control file parallel write
6,594
92 14 .4
请高手帮忙分析一下!
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
完整的report
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
斑竹我怎么给你呢?
这个不好外露的!
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
最初由 rollingpig 发布
[B]完整的report [/B]

我贴出来
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
Instance Efficiency Percentages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Buffer Nowait %:100.00 Redo NoWait %: 99.99

BufferHit %:100.00In-memory Sort %: 99.87

Library Hit %: 99.97Soft Parse %: 96.00
Execute to Parse %: 99.56 Latch Hit %: 99.42
Parse CPU to Parse Elapsd %: 93.85 % Non-Parse CPU: 97.68
这些指标都还可以,应该是以下sql过渡解析造成。
CPU
CPU per
Elapsd
Old
Time (s) ExecutionsExec (s)%Total Time (s)Buffer GetsHash Value
---------- ------------ ---------- ------ ---------- --------------- ----------
Module: JDBC Thin Client
select * from( selectdistinct a.restaurantid as restaurantid,a
.SQUESEID,e.ADMISSION fromclientinfo_view a ,w_category b ,cli
entinfoforservice ewhere a.restaurantid = e.restaurantid and b
.dishmenuid in(select dishmenuid from w_category start with dish
menuid= (select dishmenuid from w_category where dishmenuname =:
252.41 47 5.371.2 264.03 5,239,702 2093053261
Module: JDBC Thin Client
select F_GET_CLIENT_CITYLETTER(clientId,clientType) letter,clien
tId,clientType from W_CHANGEFORPURGE where F_GET_CLIENT_CITYLETT
ER(clientId,clientType) is not null and PURGEFLAG=0 and clientty
pe=1
220.88
250 0.881.0 239.7827,975,320 1870490799
Module: JDBC Thin Client
BEGIN pkg_restaurantSearch.getSearchClient(:1,:2,:3,:4,:5,:6,:7,
:8,:9,:10); END;
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
时间 329.98 (mins)
其他的看起来不错
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
你只取snap1和snap12,那你中间的几个岂不是白做?
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
最初由 alantany 发布
[B]你只取snap1和snap12,那你中间的几个岂不是白做? [/B]

老大,我是从1开始,到12结束!
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
还有
latch: library cache
15,573 305 201.3
latch: cache buffers chains
5,998 247 411.1
latch: library cache pin
5,495 245 451.0
按EYGLE说的,超过0.5%就要仔细看看问题!
大家再分析一下
回复

使用道具 举报

千问 | 2012-1-4 11:51:22 | 显示全部楼层
最初由 zhouwf0726 发布
[B]Instance Efficiency Percentages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Buffer Nowait %:100.00 Redo NoWait %: 99.99

BufferHit %:100.00In-memory Sort %: 99.87

Library Hit %: 99.97Soft Parse %: 96.00
Execute to Parse %: 99.56 Latch Hit %: 99.42
Parse CPU to Parse Elapsd %: 93.85 % Non-Parse CPU: 97.68
这些指标都还可以,应该是以下sql过渡解析造成。
CPU
CPU per
Elapsd
Old
Time (s) ExecutionsExec (s)%Total Time (s)Buffer GetsHash Value
---------- ------------ ---------- ------ ---------- --------------- ----------
Module: JDBC Thin Client
select * from( selectdistinct a.restaurantid as restaurantid,a
.SQUESEID,e.ADMISSION fromclientinfo_view a ,w_category b ,cli
entinfoforservice ewhere a.restaurantid = e.restaurantid and b
.dishmenuid in(select dishmenuid from w_category start with dish
menuid= (select dishmenuid from w_category where dishmenuname =:
252.41 47 5.371.2 264.03 5,239,702 2093053261
Module: JDBC Thin Client
select F_GET_CLIENT_CITYLETTER(clientId,clientType) letter,clien
tId,clientType from W_CHANGEFORPURGE where F_GET_CLIENT_CITYLETT
ER(clientId,clientType) is not null and PURGEFLAG=0 and clientty
pe=1
220.88
250 0.881.0 239.7827,975,320 1870490799
Module: JDBC Thin Client
BEGIN pkg_restaurantSearch.getSearchClient(:1,:2,:3,:4,:5,:6,:7,
:8,:9,:10); END; [/B]

斑竹同志,我对SQL的优化不是很熟悉,能否给详解一下!
CPU时间是252, 这个SQL执行次数是47,BUFFER GETS 一共是5239702,这样算一次执行应该是11483.然后需要和总的BUFFER比较,到这里就不大清楚了!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行