High-Performance Java Persistence Newsletter, Issue 49
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!
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 edition is this article, which explains the performance optimizations done by the Quora engineering team to scale their MySQL database cluster. MySQL is an amazing database product that powers some of the largest applications over the Internet like Facebook, Pinterest, and Shopify, to name a few.
For performance tuning, if you want to avoid blocking, you can use NO WAIT
, as explained by this article. The nice thing about NO WAIT is that all major database systems support it (e.g., Oracle, SQL Server, MySQL, or PostgreSQL).
Another great article about MySQL is this one that explains various settings you need to take into consideration when improving the performance of your MySQL database system.
If you’re using PostgreSQL, then check out this article, which explains how TRUNCATE works under the hood and how it’s possible for PostgreSQL to offer a transactional TRUNCATE operation that can be rolled back.
If you are using Spring and Spring Data JPA, I wrote three articles that could help you get the most out of your data access layer:
- The best way to use Spring Data query methods
- The best way to use JOIN FETCH and Pagination with Spring
- The best way to use the Spring Data JPA Specification
Videos
I uploaded the third part of the Shopizer performance tuning series:
This video shows you how to optimize a non-trivial Java application using the amazing Hypersistence Optimizer.
Best Tweets
Here are the best tweets I posted since the last newsletter:
19 years ago today, the 1.0 version of the Spring framework was released.
— Vlad Mihalcea (@vlad_mihalcea) March 24, 2023
I started using it in November 2004 and instantly forgot about the J2EE madness.https://t.co/JWcjelCaUQ pic.twitter.com/G4DrnvdBAX
Junior developer after reading High-Performance Java Persistence https://t.co/WiDwZsM1y8 pic.twitter.com/NKObmcPe35
— Vlad Mihalcea (@vlad_mihalcea) March 16, 2023
The best way to log SQL statements with Spring Boothttps://t.co/23aHhyk9u3 pic.twitter.com/FVFWuhL1wE
— Vlad Mihalcea (@vlad_mihalcea) March 23, 2023
Most exciting software products are built using boring tech
— Vlad Mihalcea (@vlad_mihalcea) March 21, 2023
SQL Recursive WITH CTE querieshttps://t.co/ekbeWcukvH pic.twitter.com/PwbRJUVyBN
— Vlad Mihalcea (@vlad_mihalcea) April 3, 2023
Project Releases
Hibernate ORM released the 6.2.0 version, which brings support for CTE and Recursive CTE in JPQL and Criteria API query.
Hypersistence Utils has released two versions:
The Hypersistence Utils 3.3 branch adds support for Hibernate ORM 6.2 and introduces a new type that supports the PostgreSQL ltree
column type.
The Spring Data JPA 3.0.4 has been released, allowing you to use Hibernate ORM 6.2.

Get in touch with my latest articles!
StackOverflow Answers
The following StackOverflow answers have been trending since the last newsletter episode: