You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by hantone <ho...@gmail.com> on 2010/07/27 21:40:55 UTC

Performace Question

Hi Guys!

I'm getting this warnning message for a process I'm running, and it's
turning it extremally slow:

36703  IM  INFO   [main] openjpa.Query - This query on type "class
mi.NominaEmpleador" must load the entire candidate class extent and evaluate
the query in-memory.  This may be very slow.  The query must be executed in
memory because OpenJPA is configured with IgnoreCache=false and
FlushBeforeQueries=false and there are dirty instances that may affect the
query's outcome in the cache.


I'm getting this message inside a transaction that executes the query a lot
of times, giving me in consecuence the warning message tons of times. 

What should I do?  take into consideration that the dirty instances in
memory are important for the query. 

I added this into the persistence.xml properties:
<property name="openjpa.FlushBeforeQueries" value="true"/>
but the message still appears and the transaction is taking a lot of time to
be executed.

Hope you can point me in the right direction,

Thanks in advance!

Horacio A Antonelli
          
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Performace-Question-tp5343744p5343744.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Performace Question

Posted by Kevin Sutter <kw...@gmail.com>.
>From this exchange, do we have a problem with the informational message?

*36703  IM  INFO   [main] openjpa.Query - This query on type "class
mi.NominaEmpleador" must load the entire candidate class extent and evaluate
the query in-memory.  This may be very slow.  The query must be executed in
memory because OpenJPA is configured with IgnoreCache=false and
FlushBeforeQueries=false and there are dirty instances that may affect the
query's outcome in the cache.*

In this message, a property of "IgnoreCache" is specified, but Pinaki's
reply (and hantone's confirmation) used the property "IgnoreChanges" to get
around the problem.

Also, it sounds like hantone tried setting the other property
(FlushBeforeQueries) to true without any luck.

Do we have some cleanup required either in the message or in the processing
of in-memory queries so that we're consistent?

Thanks,
Kevin

On Wed, Jul 28, 2010 at 3:44 PM, hantone <ho...@gmail.com> wrote:

>
> Hi Pinake!
>
> I tried b) and it worked perfectly!
>
> That was exactly what I was looking for!
>
> Thank You very much! Take care!
>
> Horacio A Antonelli
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Performace-Question-tp5343744p5346335.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: Performace Question

Posted by hantone <ho...@gmail.com>.
Hi Pinake!

I tried b) and it worked perfectly! 

That was exactly what I was looking for!

Thank You very much! Take care!

Horacio A Antonelli
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Performace-Question-tp5343744p5346335.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Performace Question

Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
  OpenJPA will decide to execute a query in memory when several conditions.
Check these conditions
a) is candidate collection set? OpenJPAQuery.setCandidateCollection ()
b) what is the settings for openjpa.IgnoreChanges? Should be set to "true"



-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Performace-Question-tp5343744p5344694.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.