-->
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.  [ 2 posts ] 
Author Message
 Post subject: Performance issue(Loading Page)
PostPosted: Wed Jun 20, 2007 6:54 am 
Newbie

Joined: Mon May 28, 2007 10:53 am
Posts: 4
Hi,

I Have created a Layout like below in one of my jsp

prjectPidCostCentres Pojo is dependented in projectRegionInfo

Here at first the data related to projectRegionInfo is coming from actionclass (runs query and stores the data into request.object)

<layout:select key="head.projectName" property="proId">
<layout:option value=""/>
<layout:options collection="projectRegionInfo" property="proId" labelProperty="regionCode" sourceOf="ccId"/>
</layout:select>

<layout:select key="head.costCentre" property="ccId">
<layout:optionsDependent collection="projectPidCostCentres" property="ccId" dependsFrom="proId" labelProperty="costCentreCode"/>
</layout:select>

My doubt is when the page is loading the records related to projectRegionInfo is laoding quickly in respective combo boxes but when it is try to bring the projectPidCostCentres data(having costcentres for a perticular proId) there are lot’s of HQL queries are running for each proId.

Note:V_PROJECT,V_PROJECT_COST_CENTRE are Views

E.g:
Hibernate: select projectpid0_.PRO_PRO_ID as PRO3___, projectpid0_.CC_CC_ID as CC1___, projectpid0_.CC_CC_ID as CC1_0_, projectpid0_.COST_CENTRE_CODE as COST2_38_0_, projectpid0_.PRO_PRO_ID as PRO3_38_0_ from V_PROJECT_COSTCENTRE projectpid0_ where projectpid0_.PRO_PRO_ID=?

Hibernate: select projectpid0_.PRO_PRO_ID as PRO3___, projectpid0_.CC_CC_ID as CC1___, projectpid0_.CC_CC_ID as CC1_0_, projectpid0_.COST_CENTRE_CODE as COST2_38_0_, projectpid0_.PRO_PRO_ID as PRO3_38_0_ from V_PROJECT_COSTCENTRE projectpid0_ where projectpid0_.PRO_PRO_ID=?

:
:
:
Etc 498 Lines nearly

How can I reduce this repeated query when the page is loading(without refreshing) Please suggest me any logic on this soon. It is a performance issue(I can’t use Ajax)



Regards
Srini

_________________
Cnu


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 20, 2007 9:33 am 
Newbie

Joined: Wed Jun 20, 2007 9:29 am
Posts: 2
Have you considered caching this entity
If entity is not updated at all use <cache usage="read-only"/> and after first page load all data will be taken from the cache.
Of course you will have to provide cache implementation in your hibernate.cfg.xml


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