Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Question on indexed nullable column

Re: Question on indexed nullable column

From: Garry <garry_at_weir.co.uk>
Date: Fri, 12 May 2000 13:44:12 +0100
Message-Id: <10495.105484@fatcity.com>


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.

++++++++++++++++++++++++++++++++++++

All internet traffic to this site is
automatically scanned for viruses
and vandals. Received on Fri May 12 2000 - 07:44:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US