һֱѧϰoracle ϣҹͬ̽ вָ֮
:FOXPROЌFŴDQindex ֶnullʹ ƼĶ:ORACLESQLŻϵ()
Щ " n/a " null չϢ:ڵϴOracle9ista
================================================================================================================================
8i ʹûںindex null
create table t (n number);
create index ind_n on t(n,1); // t(n,a) ʡռselect v from t where n is null;
v
-------------------- lgexecution plan
---------------------------------------------------------- 0 select statement optimizer=choose (cost=3 card=614 bytes=6140) 1 0 table access (by index rowid) of t (cost=3 card=614 bytes=6140) 2 1 index (range scan) of ind_n (non-unique) (cost=3 card=614)Ҫס cbo
i doesnt need query rewrite to make that leap, it is a "safe" operation.==============================================================
null bitmap index ʹ
==============================================================
ʹöϵindex ʹindex
create table t ( f_seq int, t_seq int, x char(1) );
create index t_idx on t(f_seq,t_seq);select f_seq, t_seq from t where f_seq > 0 and t_seq is null;
execution plan
... һҳ