use the function_based index to access the null value
select .... from ... where lxr is null;
this statement can't use the idnex!!!
grant query rewrite to scott;
alter system set query_rewrite_enabled=true; --the default is false
alter system set query_rewrite_integrity=trusted; -- the default is enforced
create index idx_c_khxx_zb_lxr on c_khxx_zb(case when lxr is null then 1 end);
-- alter the index created, gather the table's stats
begin
dbms_stats.gather_table_stats(user,'C_KHXX_ZB',cascade=>true);
end;
/
set autotrace traceonly explain (if not , system @rdbms/admin/utlxplan.sql)
select * from emp.......
set autotrace off
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271063/viewspace-916958/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Use index_descIndex
- null與indexNullIndex
- oracle hint_use_concat_use_nl_with_indexOracleIndex
- Exclusive access could not be obtained because the database is in useAIDatabase
- attempt to index local ‘result‘ (a nil value)Index
- index fast full scan 和 nullIndexASTNull
- mysql遇到Variable can’t be set to the value of ‘NULL’MySqlNull
- 錯誤解決:Attempting to use uninitialized value VariableZed
- index 包含null值得簡單測試IndexNull
- 0317TABLE ACCESS BY INDEX ROWID BATCHEDIndexBAT
- Hashtable/HashMap與key/value為null的關係HashMapNull
- Golang Cannot use ss(type AAA) as type AAA in map indexGolangIndex
- MySQL5.6之use_index_extensions優化MySqlIndex優化
- duplicate ORA-01405: fetched column value is NULLNull
- 317TABLE ACCESS BY INDEX ROWID BATCHED2IndexBAT
- 317TABLE ACCESS BY INDEX ROWID BATCHED3IndexBAT
- What is the difference between Mysql InnoDB B+ tree index and hash index? Why does MongoDB use B-tree?MySqlIndexMongoDB
- Can't use function return value in write context 使用empty遇到報錯FunctionContext
- Mysql:Variable 'XXXt' can't be set to the value of 'NULL'解決MySqlNull
- 解決問題:Variable 'time_zone' can't be set to the value of 'NULL'Null
- [20180808]Null value to Dynamic SQL.txtNullSQL
- mysql:Variable 'character_set_client' can't be set to the value of 'NULL'解決MySqlclientNull
- VUE前端打包報錯:TypeError: Class extends value undefined is not a constructor or nullVue前端ErrorUndefinedStructNull
- ORA-31600: invalid input value INDEX PARTITION for parameterIndex
- 從Access轉到MySql以後遇到的關於null問題MySqlNull
- Variable 'character_set_client' can't be set to the value of Null的解決方法clientNull
- [Err] 1231 - Variable 'sql_mode' can't be set to the value of 'NULLSQLNull
- Oracle 12c新特性之——TABLE ACCESS BY INDEX ROWID BATCHEDOracleIndexBAT
- [mysql] 批量匯入提示: Variable ‘character_set_client’ can’t be set to the value of ‘NULLMySqlclientNull
- mysql匯入報錯Variable 'sql_notes' can't be set to the value of 'NULL'MySqlNull
- Not-null property references a transient value - transient instance must be saved before current opeNull
- [Vue warn]: The data property "dialogVisible" is already declared as a prop. Use prop default valueVue
- ((NULL) null).printNULL();((NULL) null).printnull();Null
- IS NULL和IS NOT NULLNull
- 【轉載】Kano Model — Ways to use it and NOT use it
- 瀏覽器報`The value of the ‘Access-Control-Allow-Origin‘ header in the response must not be the wildcard瀏覽器Header
- not null與check is not nullNull
- the "in" use in mysqlMySql