High-Performance Java Persistence Newsletter, Issue 40
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
Introduction
Welcome to a new issue of the High-Performance Java Persistence Newsletter in which we share articles, videos, workshops, and StackOverflow answers that are very relevant to any developer who interacts with a database system using Java.
Articles
The pick of this edition is this article from Christian Beikov about the cool features that have been added to Hibernate 6.1, like Derived Tables, Lateral Joins, and support for JDBC arrays.
I wrote a series of articles about the perils of race conditions with a real-life story of a company that went bankrupt due to a Lost Update anomaly. If you’re interested in this topic, then check out these two articles:
A very good read is this one about how relational database systems work behind the scenes.
Another article you will surely enjoy if you are using Spring Data JPA is this one about a much better approach to the standard JpaRepository
.
If you’re using MySQL, then you should definitely read this article, which gives you an overview of how InnoDB works in relation to logical reads, writes, dirty pages, and logging changes to the redolog and binlog.
If you are using Spring and you have to fix the infamous Hibernate MultipleBagFetchException
, then you are going to enjoy reading this article.
Best Tweets
Here are the best tweets I posted since the last newsletter:
Building your application on top of a lightweight framework. pic.twitter.com/KuMXqZ0DMt
— Vlad Mihalcea (@vlad_mihalcea) June 4, 2022
Investing in knowledge is the best long-term investment https://t.co/BrJEULArT1 pic.twitter.com/wGSscKI1Ym
— Vlad Mihalcea (@vlad_mihalcea) June 9, 2022
In almost 9 years, I've written 495 articles (one is scheduled for the next week).
— Vlad Mihalcea (@vlad_mihalcea) June 15, 2022
On average, it takes me 5 hours to write a new article (309 full-working days).
Looking back, this has been one of the best time investments in my career.
It's all about Persistence! pic.twitter.com/eLJgDPs6pC
The best Spring Data JpaRepositoryhttps://t.co/FpedWiSx2b pic.twitter.com/X8RPsrcxyp
— Vlad Mihalcea (@vlad_mihalcea) June 8, 2022
When in doubt, just go to Vlad Mihalcea Dot Com https://t.co/vELruEv1KB pic.twitter.com/QlpJNd26bh
— Vlad Mihalcea (@vlad_mihalcea) June 4, 2022
Online Workshop Recording
On the 27th of June, I’ve run a free online workshop about Transactions and Concurrency Control Patterns.
If you haven’t had the chance to attend the event, then you can check out the video recording:
Project Releases
I managed to release the 2.6.0 version of the amazing Hypersistence Optimizer, which adds support for detecting N+1 query issues triggered by both EAGER and LAZY associations. This version adds support for Hibernate 6 as well. Enjoy detecting performance issues automatically in your Spring or Jakarta EE application and stay tuned for more!
Hibernate ORM has released the 6.1 version that offers support for Derived Tables, Lateral Joins, and support for JDBC arrays.
I’ve just released the 2.16.3 version of the amazing Hibernate Types project. If you want to check what’s been improved, then check out the milestone info.
The 42.4 version of the PostgreSQL JDBC Driver has been released.
If you’re using SQL Server, then you can now upgrade to the 10.2.1 version of the JDBC Driver.

Get in touch with my latest articles!
StackOverflow Answers
The following StackOverflow answers have been trending since the last newsletter episode:
- How to call a PostgreSQL stored procedure with Hibernate
- JPA does not flush before a native query with FlushModeType.AUTO
- Thinking behind the decision of database connection pool size
- Hibernate: Disadvantages of not having an id generator?
- Spring @Transactional on one service method spanning over two Hibernate transaction managers