楼主: dai_zhy

这个是我昨天的statspack报告,请帮我看看有什么问题?

[复制链接]
论坛徽章:
131
2006年度最佳技术回答
日期:2007-01-24 12:58:48福特
日期:2013-10-24 13:57:422014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:142013年新春福章
日期:2013-02-25 14:51:24
31#
发表于 2008-4-9 14:59 | 只看该作者
做个总结:
1。Tune 一下
select spool.username, spool.sender, spool.message, spool.sid, u
sers.mobilephone from spool, users where  spool.username = users
.username and users.status = '0' and spool.sender!='pica' and sp
ool.sender!='@pica' and users.mobilephone is not null and rownum
<= 30

2。可能的话,改应用,做绑定变量
或者在测试环境中修改 optimizer_dynamic_sampling 看看是否还有大量
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE NO_PA

使用道具 举报

回复
论坛徽章:
0
32#
发表于 2008-4-9 15:00 | 只看该作者
采集时间这么长 不怕数据库宕掉啊
Library Hit   %:   87.72  sql共享池命中偏低

log file sync                                  808,319       5,028      6    7.2
log file parallel write                        808,564       4,383      5    6.3
db file parallel write                         440,969       3,373      8    4.8
瓶颈都在写上  
LGWR的写出效率低下
可以参考下这篇文章
http://www.eygle.com/archives/20 ... 14-logfilesync.html


select spool.username, spool.sender, spool.message, spool.sid, u
sers.mobilephone from spool, users where  spool.username = users
.username and users.status = '0' and spool.sender!='pica' and sp
ool.sender!='@pica' and users.mobilephone is not null and rownum
<= 30
这条语句消耗的时间这么长 可以查下原因
总体来看 sql还是有优化的余地

使用道具 举报

回复
论坛徽章:
5
会员2006贡献徽章
日期:2006-04-17 13:46:34会员2007贡献徽章
日期:2007-09-26 18:42:10ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44生肖徽章2007版:鼠
日期:2008-01-02 17:35:53ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51
33#
 楼主| 发表于 2008-4-9 15:09 | 只看该作者
原帖由 rollingpig 于 2008-4-9 14:59 发表
做个总结:
1。Tune 一下
select spool.username, spool.sender, spool.message, spool.sid, u
sers.mobilephone from spool, users where  spool.username = users
.username and users.status = '0' and spool.sender!='pica' and sp
ool.sender!='@pica' and users.mobilephone is not null and rownum


我已经设了这个参数

这个语句我已经调试过了,走的索引的确有问题!但是估计要等等才能上线,我到时会把结果发上来,谢谢!

还有我把cursor_sharing设为了force,不知道这样有没有问题!!

使用道具 举报

回复
论坛徽章:
5
会员2006贡献徽章
日期:2006-04-17 13:46:34会员2007贡献徽章
日期:2007-09-26 18:42:10ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44生肖徽章2007版:鼠
日期:2008-01-02 17:35:53ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51
34#
 楼主| 发表于 2008-4-9 15:10 | 只看该作者
原帖由 sisney100 于 2008-4-9 15:00 发表
采集时间这么长 不怕数据库宕掉啊
Library Hit   %:   87.72  sql共享池命中偏低

log file sync                                  808,319       5,028      6    7.2
log file parallel write                        808,564       4,383      5    6.3
db file parallel write                         440,969       3,373      8    4.8
瓶颈都在写上  
LGWR的写出效率低下
可以参考下这篇文章
http://www.eygle.com/archives/20 ... 14-logfilesync.html


select spool.username, spool.sender, spool.message, spool.sid, u
sers.mobilephone from spool, users where  spool.username = users
.username and users.status = '0' and spool.sender!='pica' and sp
ool.sender!='@pica' and users.mobilephone is not null and rownum
  


我是一个小时收集一次!!

使用道具 举报

回复

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

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表