Page 1 of 1

Linq expression translation : WHERE clause with COALESCE

Posted: Tue 06 Jul 2010 18:41
by venandier
I have a LINQ query with 3 conditions on the WHERE clause. When i have a look at the SQL transcription of my LINQ query, i see that dotConnect translated it using COALESCE option :
WHERE COALESCE((t1.date_ref = :p0) AND (t2.periode = :p1) AND (t2.genre = :p2),:p3)
The problem with this, is that the time execution of my query is 10 more comparing with a SQL query without the COALESCE option :
WHERE (t1.date_ref = :p0) AND (t2.periode = :p1) AND (t2.genre = :p2)
Its very BAD !!!
How it is possible to remove the automatic use of COALESCE option in the SQL translation when we write normal LINQ expression ?

Posted: Thu 08 Jul 2010 15:25
by AndreyR
Could you please send us (support * devart * com) the script of the DB object you are using and the query causing this behaviour?
I have made a simple test and no Coalesce function call occured.