High-Performance Java Persistence Newsletter, Issue 13

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 newsletter is this article written on the Persona’s blog about identifying long-running MySQL queries using either the Percona Monitoring and Management
or the MySQL Slow Query Log.

The only constant in software is change, and database schemas are no different. To migrate the database schema from one version to another, you are better off using incremental migration scripts that are applied automatically by migration tool, like Flyway. This article explains in great detail how Flyway works and why you should definitely use it.

As I already explained, adding a query timeout threshold is a very good idea since it allows you to roll back long-running transactions that could hurt application performance by preventing the VACCUM process from cleaning up dead tuples or lowering the transaction identifier to prevent a fatal wraparound. If you are using PostgreSQL, then this article explains how to configure the query timeout threshold using the statement_timeout PostgreSQL configuration.

The Hibernate Types project allows you to map JSON column types to a great variety of JPA entity attribute types, like POJO, String, JsonNode or Map. If you want to store JSON data as a Java Map, this article explains how easily you can achieve this goal using the Hibernate Types open-source project.

Many software developers are familiar with the B+Tree database indexes. However, PostgreSQL supports many other indexing options, like Hash, Gist, Gin, BRIN. For more details about this topic, check out this article.

YouTube Video

I added a new YouTube video about speeding up integration tests using Docker and tmpfs. This video episode is part of my High-Performance Java Persistence video course, so if you like the video, you are going to love the video course even more.

Project Releases

Hibernate ORM 5.4.18 has been released. This release fixes a security issue, so, if you are using Hibernate 5.4, you should definitely upgrade your dependency.

MariaDB 10.5 has been released, adding support for a new ColumnStore, INET 6 column types, JSON_ARRAYAGG and JSON_OBJECTAGG functions, and improving the performance of the InnoDB engine.

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.