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: index on null column

Re: index on null column

From: Don Granaman <granaman_at_cox.net>
Date: Thu, 27 Mar 2003 20:18:36 -0800
Message-ID: <F001.00574EC0.20030327201836@fatcity.com>


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

Original text of this message

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