Re: index on null

From: Stefan Koehler <contact_at_soocs.de>
Date: Fri, 28 Aug 2015 22:49:09 +0200 (CEST)
Message-ID: <1731097654.46731.1440794949121.JavaMail.open-xchange_at_app02.ox.hosteurope.de>



Hi CP,

> would it make a difference adding an index on the column. Assume the query accesses the table using business_unit column only.

Depends on your query (does it contain a predicate like "business_unit IS NULL" or not) and on the index you want to create (B*Tree or Bitmap). If you just index column business_unit, then NULL values are not included in a standard B*Tree index. You can also outwit this implementation, but it all depends on your query as well of course :-)  

Best Regards
Stefan Koehler

Freelance Oracle performance consultant and researcher Homepage: http://www.soocs.de
Twitter: _at_OracleSK

> Cee Pee <carlospena999_at_gmail.com> hat am 28. August 2015 um 22:15 geschrieben:
>
>
> Hi
>
> We have a table with data distribution like this:
>
> COUNT(*) BUSINESS_UNIT
> -------------------- -----
> 539 AB340
> 242,808 XY410
> 81 AB941
> 11,890,271
> 81,494 XY411
> 71,532 TY810
>
> Give that majority of the values are null for the Business_unit column, would it make a difference adding an index on the column. Assume the query
> accesses the table using business_unit column only. So far I am trying to tune the query that supplies values for the bus_unit column. the query is
> a multi table join; trying to make this specific table driving table.
>
> CP.
 

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Aug 28 2015 - 22:49:09 CEST

Original text of this message