TRIM on Where Clause

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
rick.duarte
Posts: 35
Joined: Fri 23 Jan 2009 23:07
Location: Rio de Janeiro, Brazil

TRIM on Where Clause

Post by rick.duarte » Fri 27 Mar 2009 13:38

Guys,

I saw on select generated from Linq to Oracle that you are using TRIM for CHAR datatypes on where clause, but I'm not using Trim() on my code.

Code: Select all

WHERE    (lpar_cd = :p0)             <-- VARCHAR2
AND      (TRIM (to_cd) = :p1)        <-- CHAR
AND      (t1.os_cd = :p2)            <-- VARCHAR2
AND      (TRIM (t1.do_tp_reg) = :p3) <-- CHAR
This is correct? If yes, could you explain why?
On large tables this have an impact on query performance because will do a Trim function on every row.

Regards,

Henrique

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 27 Mar 2009 16:01

Thank you for the bug report, we will fix this error. I will let you know when the fix is available.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 27 Mar 2009 16:07

The problem is fixed. The fix will be available in the upcoming Beta build.

Post Reply