8i和9i都提供了表达式索引Function-based indexes, which are based on expressions. They enable you to construct queries that evaluate the value returned by an expression, which in turn may include functions (built-in or user-defined). The following statements creates a function-based index on the emp table based on an uppercase evaluation of the ename column: CREATE INDEX emp_i ON emp (UPPER(ename));
To ensure that Oracle will use the index rather than performing a full table scan, be sure that the value of the function is not null in subsequent queries. For example, the statement SELECT * FROM emp WHERE UPPER(ename) IS NOT NULL
ORDER BY UPPER(ename);建立一个substr(id,x,y)的函数索引
To ensure that Oracle will use the index rather than performing a full table scan, be sure that the value of the function is not null in subsequent queries. For example, the statement SELECT * FROM emp WHERE UPPER(ename) IS NOT NULL
ORDER BY UPPER(ename);建立一个substr(id,x,y)的函数索引
解决方案 »
- ORA-00933是什么问题
- plsql 8.0 large data editor 点击无法读取配置注册表项
- oracle 建立作业语法出错
- 怎样分析监控结果,改进数据库性能?
- 这样的sql怎么写啊?
- 请问,编写一个PL/SQL程序时,是不是要将Exception语句块放到程序的最后?
- 1年没来了,遇到了解决不了的问题,200分求助!!
- oralce734无法增加tablespace,请问是怎么回事?急!
- 如何让下面的语句快速执行?非高手别进来。
- hibernate 查询如何连接查询结果 字段
- 关于Enterprise Manager
- 救济:我打开Enterprise Manager Console,想连接数据库,却报如下错!!???
select * from table_name where instr(id,'date')>1;
注意使用函数索引要设置init.ora
query_rewrite_enabled=true
“也可以建立instr(id,'date')函数索引”要如何建立啊