High-Performance Java Persistence – Chapter 14 – Batching

(Last Updated On: February 27, 2019)
Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Part 2, Chapter 14

Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material.

Table of content

This chapter explains how batch updates work in Hibernate.

14. Batching
14.1 Batching insert statements
14.2 Batching update statements
14.3 Batching delete statements

Chapter summary

Batch updates can have a great impact on data access layer performance, and Hibernate makes it very easy to switch from non-batchable statements to batched PreparedStatement(s). In this chapter, I explain how you can enable JDBC batching for insert, update, and delete statements.

Because setting the hibernate.jdbc.batch_size configuration property is not always enough, I also explain how statement ordering can leverage JDBC batching when using entity state cascading.

Aside from writing this chapter, I managed to review all the previous chapters for typos and grammar issues, thanks to using Grammarly.

Previously, I was relying on Office for correcting grammar issues, but, although it definitely helped me, I noticed that it was not enough. For this purpose, I purchased a Grammarly subscription and went through all the previous chapters for fixing typos and other grammar-related problems.

Download free ebook sample

Newsletter logo
10 000 readers have found this blog worth following!

If you subscribe to my newsletter, you'll get:
  • A free sample of my Video Course about running Integration tests at warp-speed using Docker and tmpfs
  • 3 chapters from my book, High-Performance Java Persistence,
  • a 10% discount coupon for my book.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Want to run your data access layer at warp speed?