Skip to main content

Database

JPA and Hibernate SQL query optimization — cleaning up queries that don't spark joy

Go KonMari on your SQL queries, bruh!

··1771 words·9 mins
Let’s dive into the mess that we get ourselves into when naively relying on JPA and its implementations and see how to generate nothing else but SQL statements that spark joy! Spring Data, JPA, Hibernate got our backs though to avoid such a mess, right? HELL NO! All they do is teach you a lesson to not rely on other systems without verifying the fundamentals functioning as expected yourself! There is ALWAYS pitfalls and you do not want to iron out those kinks in production.