High-Performance Java Persistence Newsletter, Issue 21

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.


First of all, I want to show a very cool tool, PMM (Percona Monitoring and Management), which you can use to monitor the performance of your MySQL or PostgreSQL database and analyze both slow-running queries and N+1 query issues.

A very interesting article I read is this one, which provides various solutions for implementing a distributed lock solution using ZooKeeper, Cassandra, or Hazelcast.

If you are using a relational database system and want to implement a simple audit log mechanism, then you can store the CDC events in JSON columns and use a trigger to catch INSERT, UPDATE, and DELETE statements against the table records you need to audit. Check out the following articles for step-by-step solutions:

Java 14 added support for Records, which allows us to create very compact data structures. While Java Records are not suitable for JPA entities, you can use Records for entity attributes. If you are interested in this topic, then this article will show you how to Java Records to JSON column types.

If you’ve been using relational databases for a long time and think that a tool like pg_dump is suitable for taking backups, then you should definitely read this article, which explains the proper way to take database backups.

A very interesting article I read on the Percona blog is this one, which explains that, unlike PostgreSQL, the MySQL EXPLAIN command evaluates the stored procedures included in a given SQL query. If the stored procedure modifies data, then this can be a problem, so you are better off including the EXPLAIN in a BEGIN .. ROLLBACK or a read-only transaction.

Best Tweets

If you enjoy using Twitter and want to build a vibrant community, then this article explains what it takes to achieve that goal.

There are many social media platforms, but for me, Twitter is the one I like best. Here are the best tweets I posted since the last newsletter:

Project Releases

MariaDB 10.5 has been released, and it provides a ColumnStore engine that is suitable for analytics and a new INET6 data type that can store both IPv6 and IPv4 addresses. There are also many improvements in the InnoDB engine, the Optimizer, and the replication mechanism. For more details about this new version, check out this article.

Hibernate ORM has released two new versions, 5.4.24 and 5.3.20, and it provides a fix for a security issue that’s affecting Criteria API queries, so you should definitely consider upgrading your Hibernate dependency.

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.