Hi all,
When oracle utilize index in ORDER BY Clause.
I've a table with UNIQUE KEY on two columns. Lets say TB_M_TEST1(col1 varchar2(10),col2 varchar2(10),col3 varchar2(10)).
and created unique key IX_UK_TEST1 on col1 and col2. and another index IX_MK_TEST_COL2 on col2 (is non-unique index).
now iam querying on the above table as follows select * from TB_M_TEST1 order by Col1, Col2. when i am checking the EXPLAIN PLAN, i found that the query is not utilizing the index.
And when i am querying like Select * from TB_M_TEST1 order by Col2, found that it is using INDEX
Question is that why first query is not using index where second query is using. And all answeres are really appreciated.