High-Performance Java Persistence Newsletter, Issue 52

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 edition is this article, which provides a very thorough explanation of how queries are executed and how you should read the execution plan when using SQL Server.

One of the greatest challenges when fetching multiple one-to-many and many-to-many relations is to avoid the implicit Cartesian Product. Using the jOOQ MULTISET operator helps you deal with this issue in a type-safe manner that’s also very efficient. If you are interested in this feature, check out this article.

It’s very common to bump into database comparison articles, but, in reality, most of them are rather biased to the writer’s preference or outdated experience. If you want to read a very balanced comparison of MySQL and PostgreSQL, then check out this article.

Database systems provide three types of table relationships: one-to-many, one-to-one, and many-to-many. If you’re curious why you’d even need a one-to-one relationship, then check out this article, in which I provide a thorough list of advantages of using this table relationship.

If you’re using PostgreSQL and thinking of using table partitioning, then check out this article, which explains how you may end up in a LockManager wait situation.

If you’re using JPA and Hibernate, then you may be already familiar with the hbm2ddl tool. Since this tool provides a validate option, it’s important to know what’s the best way to take advantage of this strategy. To help you with this task, I wrote this article that explains how you can run this schema validation without having to pay this overhead on every test execution.

Spring offers a great variety of querying strategies, like query methods, @Query annotation, or Specification. A lesser-known feature is the Query By Example (QBE). If you want to see how this feature works and what are the downsides of using it, then check out this article.

Best Tweets

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

Project Releases

The 2.7.1 version of Hypersistence Optimizer has been released. If you’re using Hibernate ORM 6.2, then it’s worth upgrading to this version.

There were also fours releases for the Hypersistence Utils project:

Especially if you are using Hibernate 6.2 and 6.1, you should definitely upgrade to using the 3.5.1 version of this library.

Hibernate ORM released two versions for the 6.2 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.