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

  • From: "Chitale, Hemant K" <Hemant-K.Chitale@xxxxxx>
  • To: <niktek2005@xxxxxxxxx>
  • Date: Fri, 11 Apr 2014 11:13:55 +0800

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@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] 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.

Other related posts: