ARTICLE AD BOX
I recently upgraded a Spring Boot application from 2.x to 3.x (Hibernate 5 → Hibernate 6).
After migration, a Criteria API query that fetches rows containing a JSON column mapped to an object in the entity has become significantly slower.
Before migration: ~4–7 seconds
After migration: ~10–15 seconds
What the code does
Uses Hibernate CriteriaQuery to fetch thousands of rows.
One of the columns is a large JSON stored as a string, mapped to a POJO using @Type (Hibernate Types / Jackson-based converter).
No Spring Batch; plain JPA/Hibernate on PostgreSQL/MySQL.
What changed after migration
Once the app moved to Spring Boot 3.x:
Hibernate upgraded from 5.x → 6.x
Jakarta namespace (javax.persistence → jakarta.persistence)
no change in db
After the upgrade, the exact same Criteria query is consistently much slower.
What I have checked
Query execution time directly in DB
No change in indexes or schema
No change in entity mapping
My questions
Did Hibernate 6 introduce changes that increase the cost of mapping JSON fields or attribute converters?
Is there any known performance regression in Hibernate 6 when dealing with JSON columns or large objects?
