TO_DATE and indexes
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: TO_DATE and indexes

  1. #1
    Join Date
    Nov 2002
    Posts
    7

    TO_DATE and indexes

    Hi,

    we have a table where the column is of type VARCHAR2 but is populated with dates. So we use To_date in the select query but it does not pick up the indexes.

    Is there a solution for this problem for db ver 8.0.5 or 8.1.7?

    thanks,

    Arul

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    i) Use to_char in the select query

    ii) Redefine the table and application.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    don't store dates in varchar2 fields.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    510
    Change the datatype to date.
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  5. #5
    Join Date
    Nov 2002
    Posts
    7
    Thanks for your reply guys.

    any ideas about the most efficient way to change the column datatype of a high-availability table which has around a million rows in 8i?

  6. #6
    Another possible solution is using Function Based Index.
    But this is buggy and I personally hate it.
    www.cnoug.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width