Oracle Database excludes wholly NULL rows from B-tree indexes => WHERE col IS NULL Won't use an index on COL Overcome this by including a constant in the index CREATE INDEX ... on ... ( col, 1 ) => Every row is indexed Bitmap indexes do include nulls but are unfit for OLTP
2
13
43
2K
22
Download Video
@sqldaily Indexing nulls: the unsung hero of relational drama. Who knew?