Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: index on null column
Queries against the non-null values should benefit greatly. Queries on the null values will not use the index since null values are not indexed (at least in single column indexes). It is an old trick to create an index on something like STATUS where the vast majority of records have a NULL (meaning perhaps "PROCESSED") and a small percentage of the records have other non-null values for STATUS ("PENDING","APPROVED", etc.).
Don Granaman
certified OraSaurus
I have a table with column A. there are 1000000 records in table out of which 500o records has not null in column A rest are null. if i created an index on A, will it benefit .
thanks,
ak
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Don Granaman
INET: granaman_at_cox.net
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Mar 27 2003 - 22:18:36 CST
![]() |
![]() |