|
......,如果你想让它走索引,可以用提示的方式(HINT),否则,还是让系统自己选吧。
根据您的建议,采用hint,sql为:
select /*+INDEX(mytable_INDEX) */ dd, sum(aa) from mytale
where end>= to_date('2008-07-31 12:00:00','yyyy-mm-dd hh24:mi:ss')
and end<= to_date('2008-08-02 00:00:00','yyyy-mm-dd hh24:mi:ss')
and begin>= to_date('2008-07-31 12:00:00','yyyy-mm-dd hh24:mi:ss') group by dd
还是没有走索引,em看到的结果如下:
数据源 游标高速缓存
捕获时间 2008-7-25 15:10:19
对方案进行语法分析 player
优化程序模式 ALL_ROWS
计划: 行
SELECT STATEMENT
HASH GROUP BY 468
TABLE ACCESS FULL 681551
为什么hint也失效了呢? |
|