Oracle is trying to return a result set with minimal I / O (this usually makes sense because I / O is slow). Indexes occupy at least 2 I / O calls. one to the index and one to the table. Usually more, depending on the size of the index and tables, the number of returned records, where they are in the data file, ...
Here you can find statistics. Suppose your query is designed to return 10 records. The optimizer can calculate that using an index will require 10 I / O calls. Let's say your table, according to statistics, is in 6 blocks in the data file. Oracle will perform a full scan faster (6 I / O), then read the index, read the table, read the index for the next matching key, read the table, etc.
So, in your case, the table can be very small. Statistics may be disabled.
I use the following to collect statistics and customize it for my exact needs:
begin DBMS_STATS.GATHER_TABLE_STATS(ownname => '&owner' ,tabname => '&table_name', estimate_percent => dbms_stats.AUTO_SAMPLE_SIZE,granularity => 'ALL', cascade => TRUE); -- DBMS_STATS.GATHER_TABLE_STATS(ownname => '&owner' ,tabname => '&table_name',partname => '&partion_name',granularity => 'PARTITION', estimate_percent => dbms_stats.AUTO_SAMPLE_SIZE, cascade => TRUE); -- DBMS_STATS.GATHER_TABLE_STATS(ownname => '&owner' ,tabname => '&table_name',partname => '&partion_name',granularity => 'PARTITION', estimate_percent => dbms_stats.AUTO_SAMPLE_SIZE, cascade => TRUE,method_opt => 'for all indexed columns size 254'); end;
source share