Title: Query Tuning Help
The FILE_DTS column is VARCHAR2(12) NOT NULL and has data in the following format:  072203000001.
 

Best regards,

David B. Wagoner
Database Administrator
Arsenal Digital Solutions
Phone: 919-466-6723
Cell:     919-412-8462
Pager: [EMAIL PROTECTED]
Fax:     919-466-6783
E-Mail: [EMAIL PROTECTED]
Web: http://www.arsenaldigital.com

"the most trusted source for
            STORAGE MANAGEMENT SERVICES"


The contents of this e-mail message may be privileged and/or confidential. If you are not the intended recipient, any review, dissemination, copying, distribution or other use of the contents of this message or any attachment by you is strictly prohibited. If you receive this communication in error, please notify us immediately by return e-mail or by telephone (919-466-6700), and please delete this message and all attachments from your system.
Thank you.

-----Original Message-----
From: David Wagoner
Sent: Monday, October 27, 2003 10:34 AM
To: Multiple recipients of list ORACLE-L
Subject: Query Tuning Help

I'm trying to tune the following query to use an index on the FILE_DTS column, rather than a FTS on the CLASS_CONFIG table (~350,000 rows).

SELECT  a2.class_config_id, a1.schedule_name
FROM    class_config a2, class_schedule a1
WHERE a2.class_config_id = a1.class_config_id
AND       to_date(a2.file_dts, 'mmddyyhh24miss') > SYSDATE - 35


I created a function-based index on FILE_DTS, like this:

CREATE INDEX CLASS_CONFIG_FILE_DTS_FX_IDX ON CLASS_CONFIG to_date(file_dts, 'mmddyyhh24miss')

and analyzed the table, but the explain plan still shows a FTS.  I can change the query to something simpler and get it to use the new index, but I assume the calculation (> SYSDATE - 35) is causing the problem.  Any suggestions?


Best regards,

David B. Wagoner
Database Administrator
Arsenal Digital Solutions
Web: http://www.arsenaldigital.com

<<...OLE_Obj...>>


The contents of this e-mail message may be privileged and/or confidential. If you are not the intended recipient, any review, dissemination, copying, distribution or other use of the contents of this message or any attachment by you is strictly prohibited. If you receive this communication in error, please notify us immediately by return e-mail or by telephone (919-466-6700), and please delete this message and all attachments from your system.
Thank you.

Reply via email to