Version: 5.25.44.0
Using Direct Mode I am having trouble with certain queries involving date parameters.
SELECT col
FROM tbl
WHERE dateCol>:dateParameter
and dateCol2to_date(:dateParameter, 'yyyymmddhh24miss')
and dateCol2<=to_date(:dateParameter2, 'yyyymmddhh24miss')
What can cause this? Is it a bug or the Oracle instance to blame?
Date parameter causes query to run slowly
Could you please try the 5.25.49 version? If the problem persists, please send us ( http://www.devart.com/company/contact.html ) a small test project with the DDL/DML script. We will try to reproduce the issue.
Re: Date parameter causes query to run slowly
Does the query run slowly when you run it through a query utility (ie Toad)? If so then it could be that the dateCol is needs and index or the query execution plan needs to be updated on the server. If date columns are not indexed in Oracle it'll have to do a full table scan since it doesn't know the min/max date....same thing happens if the execution plan gets out of whack and a record has a value outside of the plan's expected min/max.vzczc wrote: SELECT col
FROM tbl
WHERE dateCol>:dateParameter
and dateCol2<=:dateParameter2