node-postgres
node-postgres copied to clipboard
feat(pg-pool): Optimize client retrieval from pool by prioritizing free client with cached prepared statements
Hi,
Instead of retrieving the first available client from the pool, would it be possible to first check if there is a free client that already has cached prepared statements? This could improve performance by reducing the need to re-prepare statements on different clients.
I have made a PR https://github.com/brianc/node-postgres/pull/3398