High-Performance Java Persistence Newsletter, Issue 3

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

If you’re using a relational database system, it’s very important to understand how the database engine prevents concurrency issues. For example, this article explains how the PostgreSQL function triggers work depending on the current transaction isolation level.

The OSIV (Open-Session in View) is a terrible anti-pattern, and, if you’re using Spring Boot, you should explicitly disable OSIV. While I was aware of this issue with Spring Data JPA, Michael Simons wrote a very good article explaining why you want to disable OSIV even for Spring Data Neo4j.

CockroachDB is a globally-distributed NewSQL database that aims to provide better scalability without compromising productivity. CockroachDB implements the PostgreSQL communication protocol, so you can use an existing PostgreSQL JDBC Driver to communicate with CockroachDB. This article explains how you can migrate an existing PostgreSQL application to CockroachDB if you are interested in scaling your application beyond PostgreSQL capabilities.

If you’re using SQL Server 2016 or a newer version, you should definitely read this article from Brent Ozar about the SQL queries executed by the Telemetry Service.

The 2.9 version of the Hibernate Types project added many features, like support for returning a java.util.Map from a JPQ query or the ListResultTransformer that simplifies using the Hibernate ResultTransformer. However, the most awaited feature is definitely the support for mapping PostgreSQL ARRAY columns to java.util.List. So, if you’re using Hibernate ORM, then you should definitely use the Hibernate Types open-source project as well.

The SQL:2011 Standard added support for System Versioning, but only SQL Server implemented this awesome feature. However, if you’re using PostgreSQL, this extension adds support for both system-versioned tables and application time period tables.

Project releases

The Hibernate ORM 5.4.11 version has been released. If you’re using Hibernate 5.4, then you might want to do an upgrade as this release fixes 21 bugs and adds 12 improvements.

PostgreSQL has released the 12.2, 11.7, 10.12, 9.6.17, 9.5.21, and 9.4.26 versions. So, if you’re using PostgreSQL, you should definitely check the release notes of the associated PostgreSQL version you are using.

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.