High-Performance Java Persistence Newsletter, Issue 62

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 week is this article which describes how bandwidth, latency, IOPS, and jitter works in a relational database system. You will also learn a lot of things about database internals and how they operate transactions.

This month, SQL celebrates its 50th anniversary. Throughout this time, SQL evolved continuously, and it got support for Window Functions, Common Table Expressions (CTE), Recursive CTE, or JSON.

Even aggregation functions have evolved, so you are not limited to GROUP BY functions. For instance, you can calculate percentile values using the PERCENTILE_CONT function, as explained in this article.

Another good article I read is this one, written by Franck Pachot, about External Consistency in Distributed SQL. The article explains various strategies employed by Strict Serializability, Google Spanner, TiDB or YugabyteDB.

If you are using PostgreSQL, then there are two ways in which you can acquire an exclusive lock on a table record: FOR UPDATE and FOR NO KEY UPDATE. If you wonder about the difference between those two clauses, then check out this article.

When using the JPA @OneToOne annotation, you can choose whether you want to map a unidirectional or bidirectional association. However, for the bidirectional association, the parent side might not be fetched lazily, even if you map the association with FetchType.LAZY strategy. However, if the parent side association is non-optional, then you can fetch it lazily. For more details about this topic, check out this article.

Online Workshop

Between the 21st and the 24th of May, I will ran a new edition of my High-Performance Java Persistence JPA training.

If you are using Spring Data JPA, Jakarta EE, Java EE, Quarkus or other JPA-based frameworks, and you want to speed up your application, then you are going to love this training.

We will run 4 sessions of 4 hours, and you will get tons of opportunities to ask questions. And that’s not all. Besides taking advantage of the live training, you will also get free access to the High-Performance Java Persistence video course.

Project Releases

Hibernate ORM 6.5.0 was released, and it provides built-in support for binding Java Date/Time objects via JDBC, as well as support for retrieving the auto-generated columns using the RETURNING clause, as explained in this article.

The 3.7.4 and 3.7.5 versions of Hypersistence Utils have been released, so if you are using this project, then you should definitely check them out.

MySQL 8.0.37 was released, and it provides various bug fixes. For the client, the MySQL JDBC Driver 8.0.33 was released as well, providing many bug fixes for the MySQL 8 branch.

Get in touch with my latest articles!

StackOverflow Answers

The following StackOverflow answers have been trending since the last newsletter episode:

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.