openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitrios Iosifidis (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OPENJPA-2001) JPQL queries with IN expression are not cached
Date Mon, 16 May 2011 12:04:47 GMT
JPQL queries with IN expression are not cached
----------------------------------------------

                 Key: OPENJPA-2001
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2001
             Project: OpenJPA
          Issue Type: Improvement
          Components: jpa
    Affects Versions: 2.1.0
            Reporter: Dimitrios Iosifidis


While executing the query: SELECT t FROM TestOpenJpaPO AS t WHERE t.nodeType  in :nodeType

i have noticed at OPENJPA logs that the query is not cached due to the fact that contains
the IN expression.

2011-05-16 14:53:34,187 DEBUG [openjpa.Runtime] org.apache.openjpa.persistence.EntityManagerFactoryImpl@7b3f7b3f
created EntityManager org.apache.openjpa.persistence.EntityManagerImpl@60726072.
2011-05-16 14:53:34,234 DEBUG [openjpa.Runtime] Query "SELECT t FROM TestOpenJpaPO AS t WHERE
t.nodeType  in :nodeType" is cached."	
2011-05-16 14:53:34,234 DEBUG [openjpa.Query] Executing query: [SELECT t FROM TestOpenJpaPO
AS t WHERE t.nodeType  in :nodeType] with parameters: ?
2011-05-16 14:53:34,234 DEBUG [openjpa.jdbc.SQL] <t 1194084140, conn 1095057733> executing
prepstmnt 1267026821 SELECT t0.UUIDKEY, t0.NODEGROUP, t0.NODENAME, t0.NODETYPE, t0.PRODUCTID
FROM SYMTEST.TESTOPENJPA t0 WHERE (t0.NODETYPE IN (?, ?)) [params=?, ?]
2011-05-16 14:53:34,250 DEBUG [openjpa.jdbc.SQL] <t 1194084140, conn 1095057733> [16
ms] spent
2011-05-16 14:53:34,250 WARN  [openjpa.Runtime] Query "SELECT t FROM TestOpenJpaPO AS t WHERE
t.nodeType  in :nodeType" is removed from cache  excluded permanently. Query "SELECT t FROM
TestOpenJpaPO AS t WHERE t.nodeType  in :nodeType" is not cached because it uses IN expression
with variable-length parameter..


Is there a reason for this? I guess it might affect performance. 

Can you please include this type of JPQL queries in the cache?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message