Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Which tool to use

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We are in the initial phase of creating a new java application. Confused on which tool to use for database interaction - Hibernate or iBatis. The application will be having some web services which will fetch data from a few huge databases and then after processing this data will return results.

I have seen a similar application working with a similar database using hibernate. Its deployed on WAS. The search queries usually fetch data with about 5000 or more rows. The queries often hang and time out. I have been asked to explore if using iBatis will increase the performance or not.

Thanks,
Me

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


The queries often hang and time out


If I were seeing queries hang I'd be checking the database first.

iBatis and Hibernate are both ORMs. If your performance problem is not the database but memory, then swapping ORMs is unlikely to help at all. I'd recommend working out what is causing your performance problem first.
 
M Mehta
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul for the reply..

I have checked the query being generated by hibernate and tried to optimize it using SQL optimizer. But it seems that the query being generated is already the optimized one. The cause of low performance is that the tables being queried have huge amount of data and there are a lot of outer joins in the query which is due to functionality required. However, still the query takes lesser time when run directly on the database through sql developer.

To know the cause of more time taken through hibernate, I enabled the debug level for hibernate and found that while the query takes some time in running , more time goes in loading the value objects which mapped to the queried tables. So I am curious to know if using iBatis will improve the performance or not.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If that's the problem then probably not. ORMs need to load data - they are not good choices for bulk operations, if that is what you are trying.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic