RE: Column with NULLs, how would it impact an index

From: Chitale, Hemant K <Hemant-K.Chitale_at_sc.com>
Date: Fri, 11 Apr 2014 11:13:55 +0800
Message-ID: <0BDF2A25A09ADD40908745EEFC0A0FB601A8323A_at_HKMGAXMB103A.zone1.scb.net>



NULL values wouldn't be included in the index. So, the index would be "smaller" being only on non-NULL values.  

What sort of queries would you be running ? Queries for C2 IS NULL would be out of luck, doing a Full Table Scan.  

Hemant K Chitale    

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Nik Tek Sent: Friday, April 11, 2014 3:42 AM
To: ORACLE-L
Subject: Column with NULLs, how would it impact an index  

Hi,  

I have question on index in Oracle.  

Say, I have a table T1  

CREATE TABLE T1(C1 INT NOT NULL, C2 VARCHAR2(50) NULL, CONSTRAINT PK_T1_C1 PRIMARY KEY (C1));   CREATE INDEX IDX_T1_C2 ON T1(C2);   The column C2 accepts NULLS,

Question: Does this have any impact on the index?

The table could have millions of rows(15-20 million).  

Can anyone send me some pointers on it, to read about indexes on null columns.  

Thank you

Nik  

This email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please delete all copies and notify the sender immediately. You may wish to refer to the incorporation details of Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at https://www.sc.com/en/incorporation-details.html.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 11 2014 - 05:13:55 CEST

Original text of this message