ITPub博客

首页 > 数据库 > Oracle > oracle伪复合索引

oracle伪复合索引

原创 Oracle 作者:masheng0925 时间:2016-05-09 21:28:10 0 删除 编辑

某一张表mytable中含有三列 A\B\C,其中A列中含有NULL值

现在有索引 create index ind _a on mytable(A)

select * from mytable where a is null(is not null) 均不走索引


如果有伪复合索引 create index ind_a1 on mytable(A,0)

则:select * from mytable where a is null(is not null) 走索引

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30201626/viewspace-2096707/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-04-11

  • 博文量
    43
  • 访问量
    44267