Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Distinct with index use

Distinct with index use

From: Steve Robin <ocmaman_at_gmail.com>
Date: 3 Mar 2007 02:27:34 -0800
Message-ID: <1172917654.070600.151320@8g2000cwh.googlegroups.com>


select distinct dname from scott.dept;

         In this query oracle is not using index on dname. select distinct ename from scott.emp;

         In this query oracle is using index on ename and improving speed.

         How it is possible that some time oracle uses index and some time it doesn't. Can anyone pls help me and tell, when oracle uses index in distinct. Is index help to improve distinct query. If not then how can I increase speed because distinct ename are 315 and total rows are 80546220. Right now it is taking huge time to distinct. Please give any suggestion.

I apologise, I don't have full details right now. But you understand the situation and pls help me.

Thanks

Oracle : 9.2.0.8
OS : Sun Solaris , Windows XP Received on Sat Mar 03 2007 - 04:27:34 CST

Original text of this message

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