Linq expression translation : WHERE clause with COALESCE

Linq expression translation : WHERE clause with COALESCE

Postby venandier » Tue 06 Jul 2010 18:41

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 ?
venandier
 
Posts: 2
Joined: Tue 06 Jul 2010 18:25

Postby AndreyR » Thu 08 Jul 2010 15:25

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.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for PostgreSQL