• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Performance issue(Loading the page)

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 apeticular 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Srinivas Sundar:
...
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)



I'm not sure I understand the question.
Are you saying that you make the same query more than once when building the page and want to know how you can re-use the values rather than have to read them from the database each time?

Or...

Are you asking how you can repeate the query and update the page with the more recent data without reloading the page?
 
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic