TRIM on Where Clause
Posted: 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.
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
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
On large tables this have an impact on query performance because will do a Trim function on every row.
Regards,
Henrique