High-Performance Java Persistence Newsletter, Issue 18
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!
You can earn a significant passive income stream from promoting my book, courses, tools, training, or coaching subscriptions.
If you're interested in supplementing your income, then join my affiliate program.
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 published by GitLab about what it took to upgrade their underlying PostgreSQL database from 9.6 to 11, considering that they have a 12-node cluster that contains 6TB of data, processing 300k transactions per second from 6 million users.
The new 2.2 version of Hypersistence Optimizer provides even more SLA (Service Level Agreement) checks, like the
EntityManager duration, the
flush execution time, or the query result size. For instance, if you want to speed up your Spring Boot application, then you can use Hypersistence Optimizer to automatically validate the performance guarantees. For more details, check out this step-by-step guide.
PostgreSQL 13 is under active development, and it already provides a lot of improvements. If you are curious about what’s coming in PostgreSQL 13, then you should read this article.
JPA and Hibernate are very popular choices when it comes to implementing a Java data access layer. However, there are many other alternatives, like MyBatis, QueryDSL, jOOQ, or Spring JDBC. If you want to know whether you should use JPA and HIbenrate, then this article is going to help you make the right decision.
Peter Zaitsev, the CEO of Percona, talks about how you can optimize MySQL using the [PMM 2](Percona Monitoring and Management) tool.
Relational Database Polling Results
Last week, I ran a database vendor survey on Twitter, and over 5000 participants managed to cast their votes:
What relational database your project is using?— Vlad Mihalcea (@vlad_mihalcea) September 12, 2020
The results are relevant for my audience, which consists of Java developers mostly:
- Almost 40% of Java projects use PostgreSQL
- MySQL and Oracle are used by 24% of responders
- SQL Server is used by over 11% of projects
From the tweet comments, I noticed that Db2 was mentioned most often, especially since it wasn’t included in the poll due to the four-option limit imposed by Twitter.
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:
Another day has passed without having to invert a binary tree or implement a sorting algorithm.— Vlad Mihalcea (@vlad_mihalcea) September 13, 2020
You don't need a large team to build an awesome software product. A small team of motivated developers can do wonders.— Vlad Mihalcea (@vlad_mihalcea) September 11, 2020
If a software project succeeds, it's because the project manager has done a great job.— Vlad Mihalcea (@vlad_mihalcea) September 15, 2020
If a software project fails, it's because the development team hasn't done a great job.
Sounds familiar? 😀
Software development is the only industry where a person can become a senior before turning 30 years old.— Vlad Mihalcea (@vlad_mihalcea) September 22, 2020
As software developers, we are very fortunate to be able to earn good money while doing what we really enjoy.— Vlad Mihalcea (@vlad_mihalcea) September 14, 2020
I have the pleasure to announce that the 2.2 version of Hypersistence Optimizer has bee released. This version brings more runtime checks, like the Persistence Context
flush duration and the query result size. For more details about all the improvements offered by this new version, check out the release notes.
I also released the 2.2.3 version of Flexy Pool. If you want to know what’s the right size for your database connection pools, then you should definitely use this open-source project.
Get in touch with my latest articles!
The following StackOverflow answers have been trending over the past two weeks:
- How to query using an
Enumparameter mapped as ORDINAL using JPA and Hibernate
- How to update the
@Versionfield when executing bulk update through Spring Data JPA
- How to set up
org.hibernate.org.hibernate.FlushModefor a Spring Boot application?
- How to delete a child from a parent and a parent from a child automatically with JPA annotations
- How to retry a service method upon getting an
OptimisticLockExceptionwith JPA and Hibernate
- Hibernate throws
MultipleBagFetchException– cannot simultaneously fetch multiple bags