ITPub博客

首页 > IT基础架构 > 网络安全 > use the function_based index to access the null value

use the function_based index to access the null value

原创 网络安全 作者:wmlm 时间:2007-05-31 13:51:25 0 删除 编辑

select .... from ... where lxr is null;

this statement can't use the idnex!!!


[@more@]

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博客 ” ,链接:https://blog.itpub.net/271063/viewspace-916958/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 自觉-浮躁
请登录后发表评论 登录
全部评论

注册时间:2008-04-08

  • 博文量
    398
  • 访问量
    3716796