Spring Boot R2DBC INSERT batching (Reactive SQL)

Batching is the act of gathering multiple statements together and executing them over a single database connection. Batching has performance benefits since the database can better optimize the batched queries, however it also "saves" having to open individual database connections and reduces connection starvation. Connection starvation in Postgres ends up spitting out errors along the … Continue reading Spring Boot R2DBC INSERT batching (Reactive SQL)

Reasoning about “complicated” Postgres SQL queries

TL;DR When building non-trivial SQL queries, it helps to: State your objective in as "declarative" a way as possible Work from the "inside out". When using subqueries in SQL it helps to find the innermost nested subquery and work your way outwards to figure out what is going on. Similarly, I find that when building … Continue reading Reasoning about “complicated” Postgres SQL queries