Oracle Cast to TIMESTAMP Performance Problem
Posted: Mon 23 May 2011 10:15
Hello,
I am currently evaluating the Devart Oracle EF driver and it performs very well.
Yet, yesterday I noticed a non-negligible performance problem:
When I join two tables on two DATE fields that are both non-nullable, the query returns instantly: A.date1 == B.date2
When one of the two fields are nullable, it makes a casting to TIMESTAMP that increases a lot the query cost and it takes several seconds to return:
A.date1 == CAST(B.date2 AS TIMESTAMP(9)) // date1 is nullable
If I change from Oracle Sql Developer the query to the simple A.date1 == B.date2, it returns instantly! It even returns instantly if I cast to DATE instead of Timestamp: A.date1 == CAST(B.date2 AS DATE)
I suppose, for some reason, EF instructs Devart to cast the value because one of the two values is nullable.
How could I avoid this behavior and instruct devart to only use DATE for the casting or no casting at all?
Thanks in advance!
I am currently evaluating the Devart Oracle EF driver and it performs very well.
Yet, yesterday I noticed a non-negligible performance problem:
When I join two tables on two DATE fields that are both non-nullable, the query returns instantly: A.date1 == B.date2
When one of the two fields are nullable, it makes a casting to TIMESTAMP that increases a lot the query cost and it takes several seconds to return:
A.date1 == CAST(B.date2 AS TIMESTAMP(9)) // date1 is nullable
If I change from Oracle Sql Developer the query to the simple A.date1 == B.date2, it returns instantly! It even returns instantly if I cast to DATE instead of Timestamp: A.date1 == CAST(B.date2 AS DATE)
I suppose, for some reason, EF instructs Devart to cast the value because one of the two values is nullable.
How could I avoid this behavior and instruct devart to only use DATE for the casting or no casting at all?
Thanks in advance!