Problem of With Cast To_Number With EF 1.0
Posted: Wed 10 Aug 2011 10:08
Hello,
Y have a problem with DotConnect for Oracle with Entity Framework 1.0. All Query generated by EF used Cast With "TO_NUMBER" and it's a big problem for me because my Indexes of Oracle are not Used with ths CAST and y have always some Full Access TABLE in all my queries. Of Course the performence of my application are catastrophic.
Exemple of query :
SELECT --allcolumns --
FROM RH "Extent1"
INNER JOIN RH2 "Extent2"
ON (TO_NUMBER("Extent1".RHID)) = (TO_NUMBER("Extent2".RHID))
LEFT OUTER JOIN CONTRAT "Extent3"
ON (TO_NUMBER("Extent1".ID_CONTRAT)) = (TO_NUMBER("Extent3".ID_CONTRAT))
---- other join ----
WHERE ((("Extent1".DATE_RH >= :p__linq__0) AND ("Extent1".DATE_RH <= :p__linq__1)) AND ((TO_NUMBER(TO_NUMBER("Extent2".ID_ELEMENT_STRUCTURE))) = :p__linq__2)) AND ("Extent4".ID_ETT IN (1195,1020,1640,1023,1488,1021))
) "Project1
In my model EF, i try yo use "Int" or "Decimal" but there is no change, there is always a To_Number Cast in the SQL Query.
Did some body have an idea for that problem ?
PS : It's impossible for me to change this indexes in Oracle because all of my storedProcedures used this indexes. We Migrate Progressively the application From ODP.NET To DotConnect for Oracle.
Thanks a lot for your response and Have a nice Day.
Eric.
Y have a problem with DotConnect for Oracle with Entity Framework 1.0. All Query generated by EF used Cast With "TO_NUMBER" and it's a big problem for me because my Indexes of Oracle are not Used with ths CAST and y have always some Full Access TABLE in all my queries. Of Course the performence of my application are catastrophic.
Exemple of query :
SELECT --allcolumns --
FROM RH "Extent1"
INNER JOIN RH2 "Extent2"
ON (TO_NUMBER("Extent1".RHID)) = (TO_NUMBER("Extent2".RHID))
LEFT OUTER JOIN CONTRAT "Extent3"
ON (TO_NUMBER("Extent1".ID_CONTRAT)) = (TO_NUMBER("Extent3".ID_CONTRAT))
---- other join ----
WHERE ((("Extent1".DATE_RH >= :p__linq__0) AND ("Extent1".DATE_RH <= :p__linq__1)) AND ((TO_NUMBER(TO_NUMBER("Extent2".ID_ELEMENT_STRUCTURE))) = :p__linq__2)) AND ("Extent4".ID_ETT IN (1195,1020,1640,1023,1488,1021))
) "Project1
In my model EF, i try yo use "Int" or "Decimal" but there is no change, there is always a To_Number Cast in the SQL Query.
Did some body have an idea for that problem ?
PS : It's impossible for me to change this indexes in Oracle because all of my storedProcedures used this indexes. We Migrate Progressively the application From ODP.NET To DotConnect for Oracle.
Thanks a lot for your response and Have a nice Day.
Eric.