Page 1 of 1

TRIM on Where Clause

Posted: Fri 27 Mar 2009 13:38
by rick.duarte
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

Posted: Fri 27 Mar 2009 16:01
by AndreyR
Thank you for the bug report, we will fix this error. I will let you know when the fix is available.

Posted: Fri 27 Mar 2009 16:07
by AndreyR
The problem is fixed. The fix will be available in the upcoming Beta build.