-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Statistics
PostPosted: Mon Dec 12, 2011 4:36 am 
Regular
Regular

Joined: Thu Jun 16, 2011 12:03 pm
Posts: 94
Hi all,

I am working with my Hibernate Search project. Reindexing all the data takes 20 hours for ~200000 records.

After all day querying the system, my jboss does not have any memory. I have been checking my queries and some of them are very slow.

I have a table with three relationships and the query is slow. Lazy is set to TRUE.

I have been thinking about getting the statistics of the execution and i have seen this link:

http://www.javalobby.org/java/forums/t19807.html

What should I check? Is there another way of checking the statistics?

Thanks in advance,

Hibernator,


Top
 Profile  
 
 Post subject: Re: Statistics
PostPosted: Mon Dec 12, 2011 5:36 am 
Regular
Regular

Joined: Thu Jun 16, 2011 12:03 pm
Posts: 94
I had an entity with lazy=false and, for the moment, the execution time is better...

but about the statistics? any manual? any info?


Top
 Profile  
 
 Post subject: Re: Statistics
PostPosted: Mon Dec 12, 2011 7:06 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Hibernator,
I'm not sure what you're asking? Statistics just provides some figures, but to extrapolate useful information out of them you will likely need to combine that information with other knowledge on your project; for example some queries might be slow but doing indeed a lot of work, some other queries might be unexpectedly slow and you might want to focus on those first.

I'd suggest to enable SQL logging too, and check if your mapping is not triggering way more query statements than what you would expect; then you might have to tune loading strategies, or enable some form of 2nd level caching.

Anyway since your question seems related to Hibernate Search: did you consider using projections ?
http://docs.jboss.org/hibernate/search/4.0/reference/en-US/html_single/#projections

You should also figure out what phase is slow. Is it the full-text Query? or is it the loading from the database?

Quote:
Reindexing all the data takes 20 hours for ~200000 records.

That's very slow :/ You should definitely look into how your database queries look like and if 2nd level caching is an options for some hot entities.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Statistics
PostPosted: Mon Dec 12, 2011 7:55 am 
Regular
Regular

Joined: Thu Jun 16, 2011 12:03 pm
Posts: 94
Thank you for the information....I will try to assimiliate and figure out what is really the problem.

I will let you know,

Hibernator,


Top
 Profile  
 
 Post subject: Re: Statistics
PostPosted: Mon Dec 12, 2011 12:01 pm 
Regular
Regular

Joined: Thu Jun 16, 2011 12:03 pm
Posts: 94
Hi,

I don't know why I had this property in my hiberntae.cfg.xml:

Code:
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>


I have deleted it and it takes just two hours to index all data (about 200000 records). Now my query problem seem to be dissapeared....

I'll let you know my results as soon i can be sure that everything works fine...

Hibernator,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.