This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes JPA query optimization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA query optimization" Watch "JPA query optimization" New topic

JPA query optimization

debraj mallick
Ranch Hand

Joined: Mar 08, 2011
Posts: 188

hi all,

i have a table "Semiproduct" and have the id of the "Semiproduct", in tables "SemiproductSales" and "SupplyArea" as foreign key, say for example

entities "SemiproductSales" and "SupplyArea" have multiple "Semiproduct". Now when query on SemiproductSales

multiple queries are generated which reduces the performance, if the query result set is 5000 then 5001 queries are generated. what should i do?
I am using Hibernate implementation of JPA,
any help would be appreciated.
wood burning stoves
subject: JPA query optimization
It's not a secret anymore!