High-Performance Java Persistence Newsletter, Issue 68

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 data alignment in PostgreSQL tables and indexes. By properly designing your tables and indexes, you can end up saving 10 or 20% of disk and in-memory space.

Another good read was this series of articles about how Serializable transactions work in a relational database.

If you’re using Spring and want to acquire the database connection lazily, then you can use the LazyConnectionDataSourceProxy utility that has been available since version 1.1.4 of the Spring framework. For more details about how to use this feature with Spring Data JPA, check out this article.

JPA provides two transaction types: RESOURECE_LOCAL and JTA. While JTA was the default in Java EE applications, Spring or Spring Boot applications use RESOURCE_LOCAL by default. For more details about how transactions are managed when using the RESOURCE_LOCAL type, check out this article.

Project Releases

MySQL released the 8.0.40 version. It provides a new implementation for the performance schema data_locks and data_lock_waits views to avoid taking a global lock when reading data from them.

The 9.1 version of the MySQL JDBC Driver has been released, and you can use it with both MySQL 9 and 8. Since it provides many bug fixes, you should definitely investigate it. For more details about this release, check out the release notes.

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.