High-Performance Java Persistence Newsletter, Issue 20

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

COBOL has been around for over 60 years, and to the day, there are more COBOL transactions executed on a per daily basis than Google searches. To celebrate this anniversary, I interviewed Adrian Tot to share his experience ad insight into COBOL past, present, and future.

While PostgreSQL requires a single fdatasync to the WAL (Write-Ahead Log) when committing a database transaction, MySQL requires two fsync calls, one for the Binary Log and the other one for the Redo Log. For more details about this topic and future optimizations that you can expect in MySQL, check out this article.

Talking about MySQL, if you are using the JSON column types introduced in 5.6, then you should definitely learn about the amazing JSON_TABLE function, which allows you to transform a JSON object to a relational table. FOr more details about this feature, you should read this article.

PostgreSQL 13 added many improvements, like the index deduplication optimization, which can reduce the index size considerably. For more details about all index-related changes coming with PostgreSQL 13, you should definitely read this article.

If you are using MySQL, then you might be interested in using ProxySQL for load balancing. If you are curious about the overhead it introduces, then this article shows that the price to pay is just 25 microseconds, which is acceptable, considering all the benefits you can get in return.

If you’re using PostgreSQL, then you should surely learn how VACUUM and ANALYZE work, as these maintenance tasks are very important for a running PostgreSQL database server. If you are curious about how to configure these processes, then this article is surely going to help you achieve your goal.

JPA and Hibernate provide a first-level cache that offers application-level repeatable reads and support for automatic batching. If you are curious how the first-level cache works behind the scenes, then you should definitely read this article.

Podcasts

Sebastien Blanc has published a new DevNation podcast episode in which we are talking about the High-Performance Java Persistence book.

Best Tweets

There are many social media platforms, but for me, Twitter is the one I like best. Here are the best tweets I posted since the last newsletter:

Project Releases

MySQL 8.0.22 has been released, and it brings many improvements. For instance, this version improves the way bind parameters are resolved when using server-side prepared statements. A new error_log table has been added to the PERFORMANCE SCHEMA so that we can now query the error log entries using SQL. A very useful feature is that the Optimizer can push down predicates when building the execution plan of a Derived Table query. Another minor improvement is that we can use the CAST .. AS YEAR syntax to transform from a date, timestamp, number, or string value. For more details about this version, check out the release notes.

Timescale DB has released the 2.0 version. TimescaleDB is an open-source database that builds on top of PostgreSQL and provides support for processing time-series data using a multi-node, petabyte-scale distributed system.

Hibernate ORM 5.4.23 has been released and provides both fixes and performance improvements. Check out the release notes for more details.

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.