One parse per query, no matter how many gateways
· 6 min read
Part 4 of a series. Start with Two jobs, two processes for the architecture and motivation.
In a single-database setup, prepared statements are a clean win. Postgres parses the statement once, builds a plan, caches both, and subsequent EXECUTEs reuse the plan. Cheap. In a setup with many gateways in front of one Postgres instance, that win quietly evaporates unless you do something about it. This post is about what we do about it.
