High-Performance Java Persistence Newsletter, Issue 28
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 I wrote about tuning the legacy Caveat Emptor Hibernate application. Even if this is an application written 15 years ago, Hypersistence Optimizer can scan it perfectly and determine what changes are needed in order to speed it up.
Running PostgreSQL in a production environment with the default configuration settings is not a good idea because the initial settings are meant for development environments with limited resources. If you want to know what settings you need to adjust, then check out this Percona article.
If you are using Oracle with JPA and Hibernate, then these 9 high-performance tips are going to help you get the best of your data access layer.
The Percona PMM tool is very useful for analyzing database performance issues, and in this article, you can see a real-life example of how you can remove a CPU bottleneck in a given MySQL application.
If you want to customize the default naming strategy used by Hibernate, then you can define your own physical naming strategy. For instance, you could use this feature to map the Java camelCase identifiers to the camel_case naming conventions used by your relational database system. For more details about this topic, check out this article.
A very nice article I read was this one which shows you that you can use PostgreSQL for simple queue-based processing or pub-sub tasks, which you’d otherwise implement using Redis or some other technology.
SQL and JSON video course
In my previous online workshop, I talked about the best way to store JSON data and how you can query it efficiently when using Oracle, SQL Server, PostgreSQL, and MySQL.
The workshop was recorded, and I edited all the videos. So, if you’re interested in the following topics:
- When to use JSON with a Relational Database System
- Oracle JSON column types (
VARCHAR
vs.LOB
),JSON_EXISTS
,JSON_VALUE
,JSON_QUERY
,JSON_MERGEPATCH
,JSON_TABLE
, and Oracle JSON data indexing - SQL Server JSON
NVARCHAR
column,JSON_EXISTS
,JSON_VALUE
,JSON_QUERY
,JSON_MODIFY
,OPENJSON
, and SQL Server JSON data indexing - PostgreSQL
JSON
andJSONB
types, JSON path expressions, JSON operators, JSON functions, and PostgreSQL JSON data indexing - MySQL
JSON
type, JSON path expressions, JSON operators, JSON functions, and MySQL JSON data indexing
Then, you should definitely join the SQL with JSON video course and watch the lessons I created for you.
Best Tweets
Here are the best tweets I posted since the last newsletter:
The struggle is real 😀 pic.twitter.com/y2nIGgzK0w
— Vlad Mihalcea (@vlad_mihalcea) June 20, 2021
When software developers tell you they are "almost" done. pic.twitter.com/zX1FSJMaW0
— Vlad Mihalcea (@vlad_mihalcea) June 11, 2021
When you hire an architect to design your house, you check their portofolio and maybe follow some recommendations.
— Vlad Mihalcea (@vlad_mihalcea) July 3, 2021
You don't give the architect a calculus test to see if they know how to resolve volume integral equations in order to assess their professional competency.
Who you're working with matters more than the technology stack you're using.
— Vlad Mihalcea (@vlad_mihalcea) June 12, 2021
The wonderful 50-year journey of Relational Database Systems pic.twitter.com/IMR4j37dkM
— Vlad Mihalcea (@vlad_mihalcea) June 10, 2021
Project Releases
The 2.4 version of the amazing Hypersistence Optimizer has been released and brings you lots of performance tuning tips to help you speed up your JPA and Hibernate application. If you want to forget about data access performance issues when using Spring Boot and JPA, then Hypersistence Optimizer is the tool you’ve always wanted to have.
And, if you are want to store JSON, ARRAY, Ranges, IP addresses, and many other DB-specific types that are not supported by Hibernate, then you might want to check out the 2.12 release of the Hibernate Types project.
Hibernate ORM released two versions since the last newsletter episode:
The PostgreSQL JDBC Driver released two new versions:

Get in touch with my latest articles!
StackOverflow Answers
The following StackOverflow answers have been trending over the past two weeks:
- Are JPA and Hibernate entity identifiers reset to null after a rollback?
- What do Clustered and Non-Clustered indexes actually mean?
- How to map a JSON column with H2, JPA, and Hibernate
- Are JPA and Hibernate entity identifiers reset to null after a rollback?
- Oracle NVL returning inconsistence result when used with/without CASE statement
- How to improve the performance of the cleanup of the history tables of the Activity engine