Skip to main content

One post tagged with "prepared-statements"

View All Tags

One parse per query, no matter how many gateways

· 6 min read
Manan Gupta
Founding Engineer, Multigres

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.

If you have comments or questions, please start a discussion on the Multigres GitHub repository.