环境是oracle 9i win2k3 2g内存
语句如下
select ID, classcode, title, addtime, Hit, picture, typeid
from (select ID, classcode, title, addtime, Hit, picture, typeid
from mic_news
order by hit desc)
where rownum <= 11
执行计划如下
从执行计划看是走了索引的,但是一致性读和物理读却非常高,应该是sort引起的
表和索引都统计过信息了
这个表的数据有60多万笔
请各位大侠给出出主意呗~~
谢谢啦
Execution Plan
----------------------------------------------------------
0SELECT STATEMENT Optimizer=CHOOSE (Cost=1771 Card=5 Bytes=55
10890)
10 COUNT (STOPKEY)
21 VIEW (Cost=1771 Card=1870 Bytes=5510890)
32 SORT (ORDER BY STOPKEY) (Cost=1771 Card=1870 Bytes=232
4410)
43 TABLE ACCESS (BY INDEX ROWID) OF 'MIC_NEWS' (Cost=14
41 Card=1870 Bytes=2324410)
54 INDEX (RANGE SCAN) OF 'IDX_CLA_IS_TH_AT' (NON-UNIQ
UE) (Cost=10 Card=1870)
Statistics
----------------------------------------------------------
3recursive calls
0db block gets
42061consistent gets
3016physical reads
0redo size
4633bytes sent via SQL*Net to client
1968bytes received via SQL*Net from client
17SQL*Net roundtrips to/from client
2sorts (memory)
0sorts (disk)
5rows processed
[ 本帖最后由 wtdragon 于 2009-5-6 09:58 编辑 ]
|