Re: What does it mean when CREATE INDEX

  • From: David Fitzjarrell <oratune@xxxxxxxxx>
  • To: "ecandrietta@xxxxxxxxx" <ecandrietta@xxxxxxxxx>, ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 29 Mar 2013 15:26:05 -0700 (PDT)

Yes, it applies to 11g.  The addition of the 1 in the column list ensures that 
NULL values for the key column will be indexed.  Normally a b-tree index will 
not contain entirely NULL keys so this  is a way to 'fix' that.  I blogged on 
this sometime back:
 
http://dfitzjarrell.wordpress.com/2008/04/09/a-tale-of-two-indexes/
David Fitzjarrell



________________________________
From: Eriovaldo Andrietta <ecandrietta@xxxxxxxxx>
To: ORACLE-L <oracle-l@xxxxxxxxxxxxx> 
Sent: Friday, March 29, 2013 4:05 PM
Subject: What does it mean when CREATE INDEX

Hi Friends,
I saw a command like this:

CREATE INDEX emp_ename ON emp(ename desc, 1);

The benefit pointed of this solution is that when we use in the where clause

--> where name IS NULL

sometimes the optimizer does not use the index.

In the test that person did, using  ... emp(name,desc,1) the optimizer
used the index.

Does it apply to Oracle 11g ?

Did anybody have any experience using this resource ?

I will test it too.

Regards
Eriovaldo


--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l


Other related posts: