Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: NULL Values in Indexes - Confused
A copy of this was sent to Dipen Kotecha <dkotecha_at_ford.invalid>
(if that email address didn't require changing)
On Thu, 12 Aug 1999 15:01:20 +0200, you wrote:
>We have a table with 1.2 million records which is regularly queried to
>see whether a date field is NULL. I understand that NULL values are not
>stored in indexes, so if I created an index on this date field, would it
>be used in the query? Approx. 10% of the data contains a NULL date
>field.
>
>Dipen
A query such as:
select * from T where X is null;
will never use an index. The rows where X is null would not be stored in an index on X.
A full scan would result.
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Aug 12 1999 - 08:41:36 CDT
![]() |
![]() |