Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Hibernate performance with collection

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate Collection performance problem.
I am facing significant performance problem when I add a item to the collection. As the number of items are added to the collection, the performance degrades. Take example of and Order and Order containing a set of items. In hibernate I do order.add(item) and the persist order. Each new item is added to the order in subsequent transactions, it takes more and more time. It appears the hibernate before inserting a new items, compares the new item with the existing ones and then inserts.

I compared the performance with the items written directly to the database rather than adding them to order and the performance is much better. Does any know what I could be doing wrong while adding item to the order. Please note all the new items are added to the order in seprate transactions. I am not using second level cache.

Any suggestions.
Akhtar
 
    Bookmark Topic Watch Topic
  • New Topic