While doing my High-Performance Java Persistence training, I came to realize that it’s worth explaining how a relational database works, as otherwise, it is very difficult to grasp many transaction-related concepts like atomicity, durability, and checkpoints.
In this post, I’m going to give a high-level explanation of how a relational database works internally while also hinting some database-specific implementation details.
Continue reading “How does a relational database work”
As previously explained, you can run database integration tests 20 times faster! The trick is to map the data directory in memory, and my previous article showed you what changes you need to do when you have a PostgreSQL or MySQL instance on your machine.
In this post, I’m going to expand the original idea, and show you how you can achieve the same goal using Docker and tmpfs.
Continue reading “How to run integration tests at warp speed using Docker and tmpfs”
I read a very interesting article by Krešimir Nesek regarding MySQL result set streaming when it comes to reducing memory usage.
Mark Paluch, from Spring Data, asked if we could turn the MySQL result set streaming by default whenever we are using
That being said, the HHH-11260 issue was created, and I started working on it. During Peer Review, Steve Ebersole (Hibernate ORM team leader) and Sanne Grinovero (Hibernate Search Team Leader) expressed their concerns regarding making such a change.
First of all, the MySQL result set streaming has the following caveats:
ResultSet must be traversed fully before issuing any other SQL statement
- the statement is not closed if there are still records to be read in the associated
- the locks associated with the underlying SQL statement that is being streamed are released when the transaction is ended (either commit or rollback).
Continue reading “How does MySQL result set streaming perform vs fetching the whole JDBC ResultSet at once”
This article is part of a series of posts related to calling various relational database systems stored procedures and database functions from Hibernate. The reason for writing this down is because there are many peculiarities related to the underlying JDBC driver support and not every JPA or Hibernate feature is supported on every relational database.
Continue reading “How to call MySQL stored procedures and functions with JPA and Hibernate”