I created a copy of the employees table in the HR schema. Then added a non-unique index on the employee_id column.
create table employees1 as select * from employees;
create index temp_idx on employees1(employee_id);
Then checked its execution plan of "select employee_id from employees;", it performed full table scan and the cost was 3. However, when I created a unique index, it performed index full scan and the cost was 1.
As far as I know, how oracle creates the unique and non-unique indexes are identical. So the leaf count etc should be the same in both indexes. So in this case, while it could select index full scan with the non-unique index and decrease the cost to 1, why it chose full table scan and resulted in a worse plan? Btw, I did not delete or inserted any rows after creating the table.