SELECT COUNT(COUNT(*)) AS NUM FROM numprefixslog a,NumprefixBiz b WHERE 1=1 AND 1=1 AND to_char(a.SendingTime,'yyyy-mm-dd') >= '2007-07-06' AND to_char(a.SendingTime,'yyyy-mm-dd') ='2007-07-06' used at line ID 5 of the execution plan contains an expression on indexed column "SENDINGTIME". This expression prevents the optimizer from efficiently using indices on table "DBUSER"."NUMPREFIXSLOG".
Rewrite the predicate into an equivalent form to take advantage of indices. Alternatively, create a function-based index on the expression. The optimizer is unable to use an index if the predicate is an inequality condition or if there is an expression or an implicit data type conversion on the indexed column.
请教如何优化此sql
以下是正在优化的 SQL 语句的原始解释计划。
全部展开 | 全部隐藏
操作 行 ID 对象 对象类型 顺序 行 大小 (KB) 成本 时间 (秒) CPU 成本 I/O 成本
SELECT STATEMENT 0