High-Performance Java Persistence Newsletter, Issue 25

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!


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.


The pick of this edition is this article which explains how you can speed up a slow JOIN query using UNION ALL to concatenate the result sets of two faster queries.

If you’re experiencing deadlock issues when using SQL Server and want to investigate what statements are causing those deadlocks, you can use trace flags to instruct the database engine to print the deadlock info in the error log. For more information about this technique, check out this article.

If you are using MySQL and you want to learn how each isolation level prevents data anomalies, then this article is surely going to help you get a better understanding of this topic.

Concurrency control is very important for data integrity, and, for this reason, you can use either optimistic or pessimistic locking. If you’re wondering when to use each of these techniques, then check out this article I wrote on my blog.

Upgrading a very large database from one version of PostgreSQL to another is a very challenging task. Luckily, the software engineers at Adyen have shared their experience in this blog post, which we can all use as a reference the next time we need to achieve this goal.

When mapping Hibernate entities, you are also defining the default fetch plan, which governs how entities are fetched upon executing a find method or an entity query. Understanding how the default fetch plan works is very important for application performance, and, for this reason, this article is worth reading.

Best Tweets

Here are the best tweets I posted since the last newsletter:

Project Releases

The Hibernate ORM project released the 5.4.30 version.

I’m proud to announce to you the 2.10.4 version of the Hibernate Types framework has been released. For more details about this release, check out the closed issues section.

The 9.2 version of SQL Server JDBC Driver has been released. If you want to learn more about this release, then check out this article.

Get in touch with my latest articles!

StackOverflow Answers

The following StackOverflow answers have been trending over the past two weeks:

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.