High-Performance Java Persistence Newsletter, Issue 65
Are you struggling with performance issues in your Spring, Jakarta EE, or Java EE application?
Imagine having a tool that could automatically detect performance issues in your JPA and Hibernate data access layer long before pushing a problematic change into production!
With the widespread adoption of AI agents generating code in a heartbeat, having such a tool that can watch your back and prevent performance issues during development, long before they affect production systems, can save your company a lot of money and make you a hero!
Hypersistence Optimizer is that tool, and it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, Micronaut, or Play Framework.
So, rather than allowing performance issues to annoy your customers, you are better off preventing those issues using Hypersistence Optimizer and enjoying spending your time on the things that you love!
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 week is this article about various online schema migration options that are available in MySQL.
Another great read was this one about scaling the One Million Checkboxes website. There are many lessons you can learn from this experiment. One lesson is about the cost of running a high-traffic website. Using a serverless solution or a cloud-based managed service could be very expensive. On the other hand, hosting the website on Digital Ocean proved to be way cheaper. Other useful lessons are about the advantages of applying the KISS (Keep It Simple) principles, the difference in resource consumption between Python and Go, how to prevent stale data by using timestamps, and many more.
Speaking of the KISS principle, if you are running out of space on a Windows partition and want to easily move data to a different partition without breaking the program that uses that original data folder, then you can use symbolic links. For more details about this topic, check out this article.
Another very good article I read was this one about MySQL performance tuning. The article goes through a lot of topics that you have to consider when improving the performance of your data access layer.
While it has been possible for a long time to build a soft delete mechanism using the Hibernate @SQLDelete, @Loader, and @Where annotations, since version 6.5 this process has been greatly simplified. For more details about how the new @SoftDelete annotation works, check out this article.
High-Performance Spring Persistence Training in Oslo
On the 21st and the 22nd of October, I’m going to run a new edition of my High-Performance Spring Persistence training in Oslo.
If you are using Spring Data JPA and want to learn how to get the best out of your data access layer and relational database system, then you should definitely buy a ticket.
Project Releases
The 2.8.2 version of the Hypersistence Utils project has been released and adds support for persisting JSON objects in CLOB column types.
The first Beta version of Hibernate 7 has been released. Hibernate 7 implements the 3.2 version of the Jakarta Persistence specification and is built on top of Java 17.
The 8.0.39 version of MySQL has been released and provides several bug fixes. MySQL also released the 9.0.0 and 9.0.1 versions, which will bring more innovations to the MySQL relational database product.
The MySQL JDBC Driver released the 9.0.0 version that can be used with both MySQL 8 and 9.
If you are using SQL Server, then you can migrate to the latest 12.8 version of the JDBC Driver which adds support for JDBC 4.2 as well as several improvements, such as caching for the BULK COPY command, improved error messages, and several bug fixes.
Get in touch with my latest articles!
StackOverflow Answers
The following StackOverflow answers have been trending since the last newsletter episode:
- Hibernate
StatelessSession.upsert()based on@NaturalId - Is it possible to multiplex multiple read-only transactions on a single JDBC Connection
- How to set the timeout period on a JPA
EntityManagerquery - The same MySQL query shows up multiple times in the Hibernate log, probably causing the slow response
- SQL Injection Guide in Java

