High-Performance Java Persistence Newsletter, Issue 69

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

Imagine having a tool that could automatically detect performance issues in your JPA and Hibernate data access layer long before pushing a problematic change into production!

With the widespread adoption of AI agents generating code in a heartbeat, having such a tool that can watch your back and prevent performance issues during development, long before they affect production systems, can save your company a lot of money and make you a hero!

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 allowing performance issues to annoy your customers, you are better off preventing those issues using Hypersistence Optimizer and enjoying spending 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 series of articles from Franck Pachot about Amazon Aurora Limitless, a PostgreSQL-compatible database that provides automatic sharding. While the solution lacks several features, it’s good to keep an eye on it as it may become a valid alternative to Amazon Aurora.

If you are using JPA and Hibernate, then you may wonder what collection type is more convenient for a bidirectional association. You could choose either a List or a Set. If you want to know what is the best collection type in this case, then check out this article.

When using relational database systems, you can speed up SQL statements by using the right indexes. If you are using MySQL and want to learn what is the best way to use indexes, then check out this article.

Speaking of database systems, when using a database connection pool, you need to set the maximum size to a given value. Knowing what is the right maximum size is not a trivial task since a value that’s too low may increase transaction response time while a high value may deprive other services from using some database connections that the application that reserved them might not even use.

If you want to know how you can determine the optimal pool size, check out this article.

JPA provides two transaction types: RESOURCE_LOCAL and JTA. If you want to know how these two transaction types work, then check out these articles:

Another very good article I read was this one about merging individual indexes when executing queries with multiple filtering predicates.

Project Releases

The 3.9 version of Hypersistence Utils has been released and provides support for GraalVM native images.

PostgreSQL released the 17.2 version that provides several bug fixes. If you upgraded to version 17, then you might want to give it a try.

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.