Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How can I use Index on a DATE Field

How can I use Index on a DATE Field

From: Allen <allen500_at_ms15.hinet.net>
Date: Wed, 17 Nov 1999 14:50:42 +0800
Message-ID: <80tj7g$pjg@netnews.hinet.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US