3 ms·
> This generally requires one call to prepare the statement and fetch some sort of handle, and then executing the statement with the handle from the first call.
by hn_throwaway_99 5y ago
> This generally requires one call to prepare the statement and fetch some sort of handle, and then executing the statement with the handle from the first call.
Not always. The Node `pg` module pipelines down the commands on the connection: it sends a `prepare` command, then a `bind` command, then an `execute` command. Yes, it uses prepared statements under the hood, but there is no wire round trip between prepare and bind.
- tomnipotent 5y agoLooks like Postgres 14 added pipeline mode in libpq, good to know!