High-Performance Java Persistence Newsletter, Issue 31

Are you struggling with performance issues in your Spring, Jakarta EE, or Java EE application?

What if there were a tool that could automatically detect what caused performance issues in your JPA and Hibernate data access layer?

Wouldn’t it be awesome to have such a tool to watch your application and prevent performance issues during development, long before they affect production systems?

Well, 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 fixing performance issues in your production system on a Saturday night, you are better off using Hypersistence Optimizer to help you prevent those issues so that you can spend 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 edition is this article which explains the perils of PostgreSQL nested transactions. The article is written by the GitLab engineers and explains what problems sub-transactions caused them.

Processing hierarchical data structures is very easy when using the SQL WITH RECURSIVE clause. For more details about this topic, check out this article.

In case you are using Aurora MySQL, then you really need to use a proper Primary Key column type, like an auto-incremented numerical column. Otherwise, you risk very high latency, as explained in this article.

If you’re using PostgreSQL, then you should definitely know how DISTINCT ON works, as it might be very useful in certain situations.

Blaze Persistence is a much better alternative to JPA Criteria API. If you want to see the difference, then this article will prove the point.

A very good read is this article about the internals of stream-based processing systems, like Apache Flink.

The SQL CROSS APPLY clause is very useful when using SQL Server, as it allows you to create lateral joins. For more details about this topic, check out this article.

When using PostgreSQL, it’s very important to keep an eye on long-running transactions, as they can cause the XID wraparound issue. Unfortunately, this issue happens more frequently than it should be, and the latest victim was Coveralls.

Best Tweets

Here are the best tweets I posted since the last newsletter:

Project Releases

PostgreSQL 14 has been released. Among the many new features, it’s worth mentioning the new JSON path expression syntax, which is more natural than the legacy one. There’s also a multirange column type that allows you to store non-contiguous ranges. There were also many performance improvements, like B+Tree bloat reduction, VACCUM speed up, or improved query parallelism.

Hibernate ORM 5.6.0 CR1 and 5.3.23 have been released.

The 42.2.24 version of the PostgreSQL JDBC Driver has been released and provides several bug fixes.

Get in touch with my latest articles!

StackOverflow Answers

The following StackOverflow answers have been trending over the past two weeks:

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.