High-Performance Java Persistence Newsletter, Issue 42
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!
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.
The pick of this edition is this article about using the MySQL Performance Schema for analyzing database transactions.
I’ve wanted to try Testcontainers for a very long time, so I finally had the time to use it to make Hibernate Types integration tests easier to run. For more details about Testcontainers, check out this article.
Using Spring Boot or Spring Framework has become the norm when developing Java-based web and enterprise applications. For this reason, it’s very important to know which are the best ways to fetch DTO projections, and for this reason, I wrote this article to help you with this task.
Another thing I’ve had to do for the Hibernate Types project is to use multiple Java versions for the
test Maven folders. For more details about when you might need this and what solutions you have, then check out this article.
A lesser-known feature that was poorly documented is the rewriteBatchedStatements setting that you can enable to speed up MySQL INSERT statements.
I have great news!
On the 15th of September, I’m going to run a new High-Performance SQL online workshop about the best way to use a lot of interesting things you can do with PostgreSQL, Oracle, MySQL, and SQL Server.
- SQL clause execution order
- How to use UPSERT or MERGE
- How to use PIVOT and UNPIVOT
- Pagination best practices
- Offset and Keyset Pagination
- Pagination vs. Streaming
If you want to be amazed by how much you can do with SQL, then you should definitely join my next online workshop.
I uploaded a new video on YouTube about SQL EXISTS and NOT EXISTS.
This video is part of my High-Performance SQL video course, so if you like this episode, you are going to love the video course.
Here are the best tweets I posted since the last newsletter:
Devs who say Java is verbose have probably never built a Spring Boot application.— Vlad Mihalcea (@vlad_mihalcea) August 14, 2022
Spring Boot is one of the least verbose ways to build a fully-functional web app or service.
SQL brings a lot to the table.— Vlad Mihalcea (@vlad_mihalcea) August 7, 2022
The best way to learn about data structures and algorithms is by studying database systems.— Vlad Mihalcea (@vlad_mihalcea) August 10, 2022
- how B+Tree is built and scanned
- how index keys affect page fill factor or balancing
- nested loops vs hash join vs merge join
- hash vs stream aggregate
This is applied maths!
20 years ago today I quit smoking. It was not easy, considering the numerous failed attempts.— Vlad Mihalcea (@vlad_mihalcea) August 23, 2022
Like many things in life, it's all about Persistence!
I managed to release the 2.18 version of the Hibernate Types project, which provides two awesome features
- support for Testcontainers so that you can easily run the project test cases
- a Java Money
PostgreSQL 14.5 has been released, offering various fixes and improvements for the PostgreSQL 14 branch.
Hibernate ORM has released several new versions for both 5.6 and 6.1 branches:
And, if you are not using Hypersistence Optimizer, you should know that you are missing out on a lot of performance optimization tips that could have been supplied to you automatically.
Get in touch with my latest articles!
The following StackOverflow answers have been trending since the last newsletter episode:
- JPA – Batch/Bulk Update – What is the better approach?
- How to fix “Access to DialectResolutionInfo cannot be null” when ‘hibernate.dialect’ is not set
- How can I use FlexyPool with HikariCPFactory?
- PESSIMISTIC_WRITE locking is not working with Spring JPA Repository and Oracle 12c
- JPA orm.xml support for database index