High-Performance Java Persistence Newsletter, Issue 67

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 week is this article about B+Tree indexes, which features a live tool that we can use to see the downsides of using a random key with a B+Tree index.

Speaking of indexing, while the SQL Standard offers support for Top-N and Next-N queries, the OFFSET clause may not benefit from a B+Tree index that you created to speed the query execution. To address this issue, you have to replace the standard OFFSET pagination with the Keyset one. Since the Keyset pagination queries may differ from one database to another, you are better off using the Spring Data WindowIterator abstraction instead. For more details about how you can use the WindowIterator feature, check out this article.

Another great read is this article about the differences between physical and logical replication.

Speaking of capturing changes, Hibernate Envers provides a very simple solution to generate an audit log for the changes happening via Hibernate. There is a Spring Data JPA extension you can use to simplify the process of extracting the audit log entries. For more details about the Spring Envers project, check out this article.

A very useful article I read was this one about the benefits of using ProxySQL to load balance, route, or multiplex database connections.

Hibernate 6.6 has extended the inheritance feature for embeddable types. If you want to take a look at this new feature, then check out this article.

Public training

Between the 21st and the 22nd of October, I’ll be in Oslo to run a new session of my High-Performance Spring Persistence training.

If you are using Spring and Spring Data JPA, this training can provide you with a lot of tips that you can use to get the best out of your relational database system.

Project Releases

To support Hibernate ORM 6.6, both Hypersistence projects have issued new releases to add support for the latest Hibernate version:

  • Hypersistence Optimizer released the 2.10 version
  • Hypersistence Utils released the 3.8.3 version

PostgreSQL released the 17.0 version, which provides several significant improvements:

  • a new memory management system for VACUUM
  • improved support for the SQL/JSON specification provided by the SQL Standard, like JSON_TABLE
  • logical replication enhancements

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.