Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Question on indexed nullable column
I agree that there is no problem with an index on a nullable column
BUT when the column is null then no index entry is created for
that row.
If your query where clause is C2 IS NULL then the index will NOT be used.
Garry
> If an index is created on nullable column, it will not create any problem
> and put the null value at first place of the index. I think if you make
any
> query against that table for null values than it might be fatser.
>
> -----Original Message-----
> Sent: Friday, May 12, 2000 3:17 AM
> To: Multiple recipients of list ORACLE-L
>
>
> Hi:
>
> In Oracle database, if I do:
>
> create table T1 (
> C1 number(9) NOT NULL,
> C2 number(9));
>
> create index INDX1 on T1(C1);
> create index INDX2 on T1(C2);
>
> Is here a performance penalty, or other problems if an indexed column is
> nullable (such as C2 here)? If yes, why?
>
> Thanks.
++++++++++++++++++++++++++++++++++++
![]() |
![]() |