The Hi/Lo Algorithm in Hibernate: Optimizing Database Identifier Generation
In the world of JVM persistence, Hibernate has a firm place. As one of the most popular frameworks for data persistence, it offers a multitude of possibilities to make developers’ lives easier. One of these possibilities is the Hi/Lo algorithm, a database identifier generation strategy that allows reducing the number of database calls when new entities are persisted. The Challenge of Identifier Generation Before we dive into the Hi/Lo algorithm, let’s briefly look at the challenge of identifier generation in a database.