• 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

hibernate.jdbc.batch_size..

 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone complete the senctences:

The higher the value of "hibernate.jdbc.batch_size", the "... ".

The lower the value of "hibernate.jdbc.batch_size", the "... ".

When and why should I change the of "hibernate.jdbc.batch_size"?



 
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 docs cover this. Basically the higher the batrch size the more memory you need, the lower the batchsize the more database round trips you need.
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Paul,

thanks!

I red the docs but your sentence


"Basically the higher the batch size the more memory you need, the lower the batchsize the more database round trips you need. "



enlarges my knowledge about the batch size.

Thanks!
 
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
You are welcome.
 
Ranch Hand
Posts: 84
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's also recommended that you don't use a big batch size because of the usage of the memory, but if this
it's not a problem then you could set a relative high value like 50 or so...

regards,
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess, memory is not the problem..i use a size of 1000 and clear my cache after each 1000 objects..
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found this in the docs:

Hibernate disables insert batching at the JDBC level transparently if you use an identity identifier generator.



Does this mean if you use identity columns on any table in your database, Hibernate will disable insert batching? Or is it context-specific - i.e. if any of the insert statements in the batch are inserting data into tables with identity columns, it will disable batching?

As you can see, I'm a bit confused. Any help would be appreciated.
 
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


Does this mean if you use identity columns on any table in your database, Hibernate will disable insert batching?


Yes.
 
Robert Benkovitz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Sturrock wrote:


Does this mean if you use identity columns on any table in your database, Hibernate will disable insert batching?


Yes.



Dang.

Thanks for the answer!
 
reply
    Bookmark Topic Watch Topic
  • New Topic