I have a pretty big table that among many other columns has a date-column that I have indexed. When I try to run a select-statement that selects records within a date-range the index isn't used and a full table scan is made instead, which means that the select takes very long time to run. The select looks something like this (simplified):
select name, age, time
from table_a
where time between to_date('2002-02-25 08:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2002-02-25 17:00:00','yyyy-mm-dd hh24:mi:ss')
Does anydody know why the index on column "time" isn´t used? Can't date-columns be used in indexes or what?
/PeJo
select name, age, time
from table_a
where time between to_date('2002-02-25 08:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2002-02-25 17:00:00','yyyy-mm-dd hh24:mi:ss')
Does anydody know why the index on column "time" isn´t used? Can't date-columns be used in indexes or what?
/PeJo