Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How can I use Index on a DATE Field
Hi, All:
Need Your Help!
I have created an index on a table, but the index field which data type
is DATE.
I found if I execute the sql statement like that :
select * from table where fdate > sysdate - 10;
oracle will use index searching,
but if I execute the sql statement:
select * from table where to_char(fdate,'yyyymmdd') => '19991001'
oracle will use FULL table scan,
Can anyone let me know How to force Oracle to use INDEX SCAN ?
Thanks for your help
Allen
Received on Wed Nov 17 1999 - 00:50:42 CST