High-Performance Java Persistence Newsletter, Issue 41

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 about the challenges of using Soft Deletes and what you should consider before adopting this technique in your software project. While Soft Deleting is a widespread technique, in reality, an audit logging solution is much more powerful, as it will allow you to track and revert any operation that was done mistakingly.

I wrote an article about the maximum number of database connections you could use and why the number is usually way shorter than you might think. This article will help you determine what’s the number of connections for which your database systems can provide the best throughput using the Universal Scalability Law.

I’ve been using Amazon Aurora for RevoGain, and I’m really impressed by its performance and simplicity. If you want to see how well it can scale, then check out these performance metrics that were recorded during Amazon Prime Day 2022. So, not only it’s easy to use, but it’s also scalable, making it a great choice for new projects.

Java has been providing a dedicated Money and Currency API for quite some time, but Hibernate does not currently offer built-in support for it. Luckily, you can now use the Hibernate Types project to persist MonetaryAmount objects that contain both the money amount and the associated currency. Check out this article for more details.


I found this podcast with Roberta Arcoverde about StackOverflow architecture, development practices, and why using a monolith is fine when the team is small enough for the application evolution to be done rapidly because of the solid software engineering practices embraced by the team.


I uploaded a new video on YouTube about SQL Recursive CTE queries.

This video is part of my High-Performance SQL video course, so if you like this episode, you are going to love the video course.

Best Tweets

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

Project Releases

I managed to release the 2.17 of the Hibernate Types project, which provides two additional that you are going to love using:

  • a built-in HibernateRepository that you can use as the base class of all your Spring Data JPA repositories, as explained in this article
  • a MonetaryAmountType that will help you save Java Money and Currency

MySQL 8.0.30 has been released, offering various fixes and improvements, like the new Generated Invisible Primary Keys (GIPKs) feature that aims to address some issues caused by tables with no primary key.

The MySQL JDBC Drivers released the 8.0.30 version as well, and from the release notes, we learned that we could actually use the rewriteBatchedStatements configuration property with JDBC PreparedStatement. Traditionally, this setting has been used only for plain Statement batching only. So, I plan on running some tests and writing an article about this change.

Hibernate ORM has released several new versions that address a performance improvement for the bytecode enhancement dirty checking mechanism:

Get in touch with my latest articles!

StackOverflow Answers

The following StackOverflow answers have been trending since the last newsletter episode:

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.