|
团队执行官
 
E.S.T核心成员 社区主管 - 帖子
- 3923
- 精华
- 128
- 积分
- 209640
- 阅读权限
- 200
- 性别
- 男
- 在线时间
- 1096 小时
- 注册时间
- 2007-10-23
- 最后登录
- 2008-7-24
|
椅子
大 中
小 发表于 2006-2-12 11:10 只看该作者
2.检查trace文件
检查发现以下语句是可疑的
代码:
********************************************************************************
select auditstatus,categoryid,auditlevel
from
categoryarticleassign a,category b where b.id=a.categoryid and articleId=
20030700400141 and auditstatus>0
callcountcpuelapseddiskquerycurrentrows
------- -------------- ---------- ---------- ---------- --------------------
Parse10.000.000000
Execute10.000.000000
Fetch10.810.810389201
------- -------------- ---------- ---------- ---------- --------------------
total30.810.810'3892'0&nb
这里显然是根据articleId进行新闻读取的. 很可疑的是query读取有3892
这个内容引起了我的注意. 如果遇到过类似的问题,大家在这里就应该知道是怎么回事情了. 如果没有遇到过的朋友,可以在这里思考一下再往下看.
代码:
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 41
RowsRow Source Operation
----------------------------------------------------------
1NESTED LOOPS
2INDEX RANGE SCAN (object id 25062)
1TABLE ACCESS BY INDEX ROWID CATEGORY
2INDEX UNIQUE SCAN (object id 25057)
********************************************************************************
select auditstatus,categoryid
from
categoryarticleassign where articleId=20030700400138 and categoryId in ('63',
'138','139','140','141','142','143','144','168','213','292','341','346',
'347','348','349','350','351','352','353','354','355','356','357','358',
'359','360','361','362','363','364','365','366','367','368','369','370',
'371','372','383','460','461','462','463','621','622','626','629','631',
'634','636','643','802','837','838','849','850','851','852','853','854',
'858','859','860','861','862','863','-1')
callcountcpuelapseddiskquerycurrentrows
------- -------------- ---------- ---------- ---------- --------------------
Parse10.000.000000
Execute10.000.000000
Fetch14.914.910283571
------- -------------- ---------- ---------- ---------- --------------------
total34.914.910283571
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 41
RowsRow Source Operation
----------------------------------------------------------
1 'TABLE ACCESS FULL CATEGORYARTICLEASSIGN'
我们注意到,这里有一个全表扫描存在
********************************************************************************
|