It depends.
You can verify this by providing Oracle with an explanation of the execution plan:
EXPLAIN PLAN FOR
SELECT * FROM Table_Y WHERE Col_A = 'STACKOVERFLOW';
and then
select * from table(dbms_xplan.display);
So, for example, with
create table table_y (
col_a varchar2(30),
col_b varchar2(30),
col_c varchar2(30)
);
create unique index table_y_ix on table_y (col_a, col_b);
and then a
explain plan for
select * from table_y
where col_a = 'STACKOVERFLOW';
select * from table(dbms_xplan.display);
The plan (for my installation) is as follows:
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 51 | 1 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| TABLE_Y | 1 | 51 | 1 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | TABLE_Y_IX | 1 | | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("COL_A"='STACKOVERFLOW')
ID 2 shows you what the index is TABLE_Y_IXreally used for index range scan.
Oracle , . Oracle, .
. , ( , Oracle , + index_asc(...) (. )
, -
SELECT *
FROM Table_Y
WHERE Col_A = 'STACKOVERFLOW';
, , .
select last_analyzed from dba_tables where table_name = 'TABLE_Y';
select column_name, last_analyzed from dba_tab_columns where table_name = 'TABLE_Y';
, dbms_stats, ββ.
, .