Myth: NULL values are never stored in indexes

The Oracle documentation (“Oracle Database 11g: The Complete Reference”) states:
“NULL values are not stored in indexes. Therefore, the following query will not use an index; there is no way the index could help to resolve the query:”

select Title
  from BOOKSHELF
 where CategoryName is null;

Well … Oracle documentation is not always 100 % right. Just read this blog by Charles Hooper:

http://hoopercharles.wordpress.com/2012/02/28/repeat-after-me-null-values-are-not-stored-in-indexes/

Leave a Reply