You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org> on 2010/08/04 17:17:21 UTC
[jira] Issue Comment Edited: (CAY-1470) Oracle: Problem with bind
CHAR in select
[ https://issues.apache.org/jira/browse/CAY-1470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895285#action_12895285 ]
Evgeny Ryabitskiy edited comment on CAY-1470 at 8/4/10 11:15 AM:
-----------------------------------------------------------------
In this case I will lose performance since indexes are not used:
SELECT * FROM tUser WHERE TRIM(Brief) = 'credit'
TABLE ACCESS FULL
SELECT * FROM tUser WHERE Brief = 'credit'
TABLE ACCESS BY INDEX ROWID
RANGE SCAN
was (Author: apparition):
In this case I will lose performance since I don't use indexes:
SELECT * FROM tUser WHERE TRIM(Brief) = 'credit'
TABLE ACCESS FULL
SELECT * FROM tUser WHERE Brief = 'credit'
TABLE ACCESS BY INDEX ROWID
RANGE SCAN
> Oracle: Problem with bind CHAR in select
> ----------------------------------------
>
> Key: CAY-1470
> URL: https://issues.apache.org/jira/browse/CAY-1470
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 2.0 branch, 3.0
> Reporter: Evgeny Ryabitskiy
> Assignee: Evgeny Ryabitskiy
> Priority: Critical
> Fix For: 2.0.5, 3.1M1
>
>
> I have Table tUser
> desc tUser
> Name Null Type
> ------------------------------ --------
> USERID NOT NULL NUMBER(15)
> BRIEF NOT NULL CHAR(30)
> And wish to find user with BRIEF 'credit' :
> INFO QueryLogger: Detected and installed adapter: org.apache.cayenne.dba.oracle.OracleAdapter
> INFO QueryLogger: SELECT * FROM tUser WHERE Brief = ? [bind: 'credit']
> INFO QueryLogger: === returned 0 rows. - took 125 ms.
> But if I try whitespaces at the end I would get:
> INFO QueryLogger: SELECT * FROM tUser WHERE Brief = ? [bind: 'credit ']
> INFO QueryLogger: === returned 1 row. - took 109 ms.
> It's absolutely not CROSS DB behavior!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.