Vlad Mihalcea

Spring Boot performance tuning

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

While developing a Spring Boot application is rather easy, tuning the performance of a Spring Boot application is a more challenging task, as, not only it requires you to understand how the Spring framework works behind the scenes, but you have to know what is the best way to use the underlying data access framework, like Hibernate for instance.

In a previous article, I showed you how easily to optimize the performance of the Petclinic demo application. However, by default, the Petclinic Spring Boot application uses the in-memory HSQLDB database, which is not what you’d usually want your application to be optimized for.

In this article, we are going to switch the underlying database from the in-memory HSQLDB to MySQL and run Hypersistence Optimizer to generate a performance tuning report for the JPA and Hibernate data access layer in the context of the MySQL database.

Read More

A beginner’s guide to database deadlock

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

In this article, we are going to see how a deadlock can occur in a relational database system, and how Oracle, SQL Server, PostgreSQL, or MySQL recover from a deadlock situation.

Read More

The best way to fetch multiple entities by id using JPA and Hibernate

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

In this article, we are going to see how we can load multiple entities by id at once when using JPA and Hibernate.

Loading multiple entities by their identifier is a very common requirement when using JPA and Hibernate. Hence, we are going to see how we can optimize the underlying SQL query execution.

Read More

How to map SQL Server JSON columns using JPA and Hibernate

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

In this article, we are going to see how easy it is to map an SQL Server JSON column when using the Hibernate Types project.

Not only that the hibernate-types project supports JSON column types for PostgreSQL and MySQL and Oracle, but, as you will see in this article, the JsonStringType works just fine when using Microsoft SQL Server.

Read More

JDBC Driver Maven dependency list

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

Ever wanted to connect to a relational database using Java and didn’t know which JDBC Driver Maven dependency to use?

If so, this article is surely going to help you from now on.

Read More

Six years of blogging

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Quality over quantity

I’ve been blogging for six years already, and every year I like to write a report with the achievements I’ve made over the last year.

If you are curious about my previous reports, check out the following list:

Page Views

Six years of blogging page views

In 2019, I got around 10,547 daily page views, meaning that this year, I’ll get over 3.85 million page views. That’s a 22% traffic increase since 2018.

Overall, in these six years of blogging, I got over 8.8 million page views and 4.5 million visitors. Cool, right?

Six years of blogging overall statistics

Read More

How to get the query execution plan on SQL Server

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

In this article, we are going to see how we can get the query execution plan when using the SQL Server relational database system.

The execution plan allows you to understand the operations done by the database engine when executing a specific SQL query.

Read More

How to map Oracle JSON columns using JPA and Hibernate

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

In this article, we are going to see how to map the Oracle JSON column storage types when using JPA and Hibernate.

My hibernate-types project has long been supporting JSON for PostgreSQL and MySQL. However, while developing my new and awesome SQL Master Class training, I realized that the current implementation does not handle Oracle JSON column types properly.

Luckily, the fix was easy and starting with the 2.7.0 version you can now persist and fetch JSON attributes on Oracle using JPA and Hibernate.

Read More

How to write a compact DTO projection query with JPA

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

In this article, we are going to see how we can write the best DTO projection JPQL query by omitting the package name when using JPA, Hibernate, and Spring.

As I already explained, DTO projections are the most efficient way of fetching data when using JPA and Hibernate.

Read More

How to get the SQL execution plan on Oracle

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!

Introduction

In this article, we are going to see how we can get the SQL execution plan on Oracle.

When tuning performance, the execution plan is indispensable as it allows you to understand the operations done by the database when executing a certain SQL query.

Read More