【发布时间】:2015-06-21 08:50:08
【问题描述】:
我有一个查询,例如 select * from table1 where :iparam is null or iparam = field1;
在 field1 上有一个非唯一索引,但 oracle (11g) 不想使用它。据我了解,它不是在运行时优化查询,而是在编译时优化查询。我在存储过程中使用这样的查询。我想知道,是否有办法告诉 oracle 使用索引?
我知道“提示”,但我想在所有项目中使用一些东西,比如一些优化器参数,以优化运行时的查询。
【问题讨论】:
-
此stackoverflow.com/questions/29630354/… 的可能副本。 (当天问)
标签: oracle indexing oracle11g runtime