Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Go KonMari on your SQL - Queries with the SQL-P...

Avatar for Posedio Posedio PRO
January 27, 2025

Go KonMari on your SQL - Queries with the SQL-Police

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 messy database access, 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 tradeoffs with every framework and you do not want to iron out those kinks in production.
We will look at common anti-patterns that we tend to apply when relying on the JPA-ecosystem and how to regain control over the database layer of your applications again.

Avatar for Posedio

Posedio PRO

January 27, 2025
Tweet

More Decks by Posedio

Other Decks in Programming

Transcript

  1. Roadmap 1. What had happened was… 2. Looking under the

    Hood 3. Batching the Batch 4. Why you tellin’ me this? 4
  2. What any seasoned developer would do… 11 More Pods More

    Database Connections Check for slow Queries
  3. Making the Batch batch 19 Align sequence allocationSize with batch

    size Implementing Persistable for isNew = true @Embeddable for WHERE (field1, field2) IN (?,?)