High-Performance Java Persistence Newsletter, Issue 36
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 series of articles, which provides a very detailed explanation of the PostgreSQL statement protocol. What I liked is that it explains how the Simple query
and extended
protocols work, how statements are cached on the client and server-side, how generic plans are generated, and what JDBC uses behind the scenes.
If you are using Spring Boot, then you might be interested in learning what’s the best way to configure it via the application.properties
file. If you are curious about this topic, then check out this article.
If you want to know how long a rollback operation will take in MySQL, check out this article, as it provides a function you could use to estimate the rollback duration.
When using a relational database system, most applications stick to the default isolation level. However, whether it’s READ COMMITTED
(e.g., Oracle, SQL Server, PostgreSQL) or REPEATABLE READ
(e.g., MySQL, MariaDB), the default isolation level does not provide a serializable transaction log. If you want to know how to prevent all data anomalies, then it’s very important to understand what Serializability is and how do relational databases implement it.
If you’re using Spring Data, then you have multiple options of checking a record’s existence. However, not all options are efficient, and this article, which is the best option you should use.
Best Tweets
Here are the best tweets I posted since the last newsletter:
Adding Javadoc comments to getter and setters pic.twitter.com/hwrtNd8XaV
— Vlad Mihalcea (@vlad_mihalcea) February 11, 2022
How to become a 10x developer:
— Vlad Mihalcea (@vlad_mihalcea) February 18, 2022
1. Be kind
2. Take care of yourself
3. Strive for work-life balance
4. Read the docs
5. Write the docs
6. Write integration tests
7. Share knowledge
8. Answer StackOverflow questions
9. Study the OSS code you're relying on
10. Be kind
War is a place where the young kill one another without knowing or hating each other, because of the decision of old people who know and hate each other, without killing each other.
— Vlad Mihalcea (@vlad_mihalcea) February 25, 2022
-- Erich Hartmann
Teaching is the best way to learn.
— Vlad Mihalcea (@vlad_mihalcea) February 1, 2022
High-Performance SQL Video Course
I’m very proud to announce to you that I released the High-Performance SQL video course. If you are using a relational database system, this course is going to teach you how to get the most out of it, no matter if you are using Oracle, SQL Server, PostgreSQL, or MySQL.
Project Releases
The 14.2 version of PostgreSQL has been released, and it provides various fixes that you might be interested in if you switched to PostgreSQL 14.

Get in touch with my latest articles!
StackOverflow Answers
The following StackOverflow answers have been trending since the last newsletter episode:
- Hibernate query and
Session
cache confusion - How to write a Hibernate query using the WITH clause to customize the ON clause
- Hibernate
@OneToMany
association tries to set a null FK value - Hibernate: delete the parent/owner while keeping the child in a one-to-one relationship
- How to create a sequence in JPA without creating directly in the database