RE: How to index nulls....

RE: How to index nulls....

 

  

If you are creating a function based index the create an index with nvl(fieldx,-999999). This would put the nulls on top of the index.

Deepak

-----Original Message-----
From: Yves [mailto:oracledba-ezmlmshield-x63907235.[Email address protected]
Sent: Tuesday, May 30, 2006 10:42 AM
To: LazyDBA Discussion
Subject: How to index nulls....

I have a query that needs to look at the records in a table where fieldx is null. It would be nice if I could index this field because the number of null values are 79K and the number of rows in the table is 12M.

Since less than 1% of the rows would be returned, I think that an index would help.

Is there a work around so that I could sort of index this column? Function-based index maybe?

Merci / Thanks
Yves Leonard,
Chef de Projet / Project Leader,
DDS / SDD,
RH Coats, 13-I
Téléphone / phone : 613-951-3233,
couriel / email : yves.[Email address protected]




--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html


Oracle LazyDBA home page