High-Performance Java Persistence Newsletter, Issue 23
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Hypersistence Optimizer is that tool!
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.
If you want to monitor how connections are being used by your Spring, Spring Boot, Java EE, Jakarta EE, or any Java application that uses Hibernate, then this article will explain how you can detect various connection-related issues automatically.
This article provides a refresher on the topic of database joins. I like such articles as, many times, we tend to overlook basic concepts and focus only on advanced topics.
On the same topic, I also started a series of articles about database join algorithms, and the first one is I covered is about Nested Loops, which is used by most RDBMS when there is a low number of records to be joined.
MySQL 8.0.23 has added support for invisible columns, which allow you to hide columns unless they are explicitly requested. For a detailed explanation of this feature, you should read this article.
Persona published a very good article about various settings that can help you speed up your MySQL database. If you want to improve the performance of your MySQL application, then this article is a great start.
If you’re using PostgreSQL and you’re curious what is the performance difference between using IN, ANY, ALL, or EXISTS, then this article provides a detailed analysis on the topic.
Hibernate provides a
@LazyToOne annotation that’s very important if you want to enable the bytecode enhancement lazy-loading mechanism. For more details about the
@LazyToOne annotation and its strategies, check out this article.
On the 10th of February, I’m going to run a 3-hour workshop about Transactions and Concurrency Control Patterns.
First, I’m going to explain how you can go bankrupt by not knowing how database concurrency control works. We will analyze why you don’t hear anything about FlexCoin or how Poloniex almost went out of business because of some race condition issue.
Afterward, we will discuss what ACID is. Most likely, there were two times in your life you stumbled on this term:
- in college, when you had to pass an exam about SQL and database systems
- during a job interview, when interviewers like to ask questions
We are going to see that there’s more to ACID than what you or your last interviewer had learned in college.
Next, we are going to adventure ourselves into uncharted territories, like read skew, write skew, lost updates, 2PL, MVCC, long-running transactions, conflict materialization, database locking, job queues, and advisory locks.
So, if you want to be amazed, you should definitely join my next online workshop.
Here are the best tweets I posted since the last newsletter:
Software developers are students for life.— Vlad Mihalcea (@vlad_mihalcea) January 19, 2021
A senior software developer is a developer who likes writing boring code with boring technologies— Vlad Mihalcea (@vlad_mihalcea) January 17, 2021
Software developer choosing a good name for a new side project. pic.twitter.com/No15qrs9Qs— Vlad Mihalcea (@vlad_mihalcea) January 27, 2021
The mathematics of progress.— Vlad Mihalcea (@vlad_mihalcea) January 12, 2021
If you improve a skill by 1% each day, after one year you are 37 times better at it. pic.twitter.com/x3jFscpneu
The reason I started my own business is because no company has ever believed in me more than I've always believed in myself.— Vlad Mihalcea (@vlad_mihalcea) January 29, 2021
The 2.3 version of the amazing Hypersistence Optimizer project has been released. First, it simplifies the setup by registering the
SessionFactory decorator automatically. Second, it provides many runtime checks that will help you speed up your Java data access layer. For more details about this release, check out the release notes.
MySQL 8.0.23 has been released, offering many improvements, like faster Hash Joins, invisible columns, as well as improvement to the encryption-at-rest feature. For more details about this version, check out the release notes.
Hibernate Reactive has released the Beta 2 version, offering several improvements in relation to Vert.x driver integration. For more details about this project, check out this article.
The 2.10.2 version of the Hibernate Types project has been released and provides an improvement for Guava Ranges. For more details about this release, check out this GitHub milestone.
Hibernate ORM released the 5.4.27 version, which provides support for Micrometer Statistics, among many other improvements.
If you like this newsletter,
you are going to love the next episodes!
The following StackOverflow answers have been trending over the past two weeks:
- What is the difference between LATERAL and a subquery in PostgreSQL?
- Prepared Statement Cache with MySQL & JDBC
- Why does JPA use
FetchType.EAGERby default for the
- How to deep copy a Hibernate entity while using a newly generated entity identifier
- How to map the latest child of a collection with JPA and Hibernate
- Can a
@ManyToOneJPA relation be null?