• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate and bulk

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an import process that handle in import a catalog with more than 100,000 items (item is a complex graph and not flat object).

I want to utilize batch for this.

As far as i undersatnd in case of generated id hibernate will go to the database for each object in the graph and i lost the advantage of using in batch. Am i correct? is there any good practice for this?

thank you
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate will definitely help accellerate the development process, but there are things that simply can be done best with other technologies. Large batch operations definitely fall into that category.

You might want to do large batch processes in a manner that takes advantage of ETL tools or processing facilities provided by your database vendor. It's not really a Hibernate thing, so much as it's a matter of choosing the best tool for the job.

-Cameron McKenzie
 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, hibernate is not the best tool for this.

But,

I want to have single flow in the application for saving items.
The same service will be used by the UI and by batch process, so i will pay in performance but have a better maintainability.

I want to use in hibernate as much as i can.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic