某一张表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博客 ” ,链接:http://blog.itpub.net/30201626/viewspace-2096707/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30201626/viewspace-2096707/