-->
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.  [ 6 posts ] 
Author Message
 Post subject: NHibernate Performance
PostPosted: Fri Apr 02, 2010 2:24 am 
Newbie

Joined: Thu Aug 27, 2009 6:28 am
Posts: 19
Hi Friends,

I am using the HQL query to retieve the Data from database and fill it in the objects/Collections. the table has related with more than 5 tables from that 3 would be an large table(like more than 50 lakhs record), i need to get some selected values from all the tables. i cannot able to select the particular field and store in the entity. so i selected top entity. so it was too slow.. for fetching 2000 records it took 3mins... so how can i improve the performance.
Could you please give me the example.

_________________
Thanks & Regards
Nizam Abdul


Top
 Profile  
 
 Post subject: Re: NHibernate Performance
PostPosted: Fri Apr 02, 2010 4:47 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Sounds more like a database problem. How is the perfomrance of the generated SQL when you run it in SQL management studio.

_________________
--Wolfgang


Top
 Profile  
 
 Post subject: Re: NHibernate Performance
PostPosted: Fri Apr 02, 2010 5:08 am 
Newbie

Joined: Thu Aug 27, 2009 6:28 am
Posts: 19
that is fetching the record within 45 seconds... i dont know whether is the problem in writing the hql query. can we get the performance of fetching the record like sql ?

can we use N Hibernate in the large scale application like i.e., insurance , banking projects where performance is main concern.

_________________
Thanks & Regards
Nizam Abdul


Top
 Profile  
 
 Post subject: Re: NHibernate Performance
PostPosted: Fri Apr 02, 2010 5:53 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Can you post the HQL and the mappings ?

_________________
--Wolfgang


Top
 Profile  
 
 Post subject: Re: NHibernate Performance
PostPosted: Mon Apr 05, 2010 1:27 am 
Newbie

Joined: Thu Aug 27, 2009 6:28 am
Posts: 19
Hi wolli,
The below is my hql Query
Code:
Select distinct c from BenefitDtlsDto bd join bd.Claims c join c.ClaimsProc cp join c.AdjClaimDtls ad where 1=1 and c.MemberBenefitId=bd.PrimaryKey and cp.DateService  between '01/01/2009' and '01/30/2009' and c.ProgramId =1 and ad.OfficeId =10510


I have an entity with the name of BenefitDtlsDto and it has mapping with the 3 tables. all the table has more than 25 Lakh record.

My question is
Quote:
Like banking or large scale application, can we get the very good performance while fetching the record when compare to SQL Procedures/Command(Compiled Statement)
.

_________________
Thanks & Regards
Nizam Abdul


Top
 Profile  
 
 Post subject: Re: NHibernate Performance
PostPosted: Mon Apr 05, 2010 7:53 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Try

Select distinct c from BenefitDtlsDto bd join fetch bd.Claims c join c.ClaimsProc cp join fetch c.AdjClaimDtls ad where 1=1 and c.MemberBenefitId=bd.PrimaryKey and cp.DateService between '01/01/2009' and '01/30/2009' and c.ProgramId =1 and ad.OfficeId =10510


and have a look here:

http://nhforge.org/doc/nh/en/index.html#queryhql-joins
http://nhforge.org/doc/nh/en/index.html#performance-fetching

_________________
--Wolfgang


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.