I have a table MYTABLE
with a date column SDATE
which is the primary key of the table and has a unique index on it.
When I run this query:
Try not selecting both edges of the index in one query , Accessing the query in a different way like this :
select max_date, min_date
from (select max(sdate) max_date from mytable),
(select min(sdate) min_date from mytable)
will cause the optimizer to access the index in INDEX_FULL_SCAN(MIN/MAX) in nested loops (in our case , twice).