Performance: Connection pooling concept
HIGH IMPACT
Connection pooling affects how fast your app can open and reuse database connections, impacting response time and server load.
const pool = new Pool({ max: 10 });
const client = await pool.connect();
// query
client.release();const client = new Client(); await client.connect(); // query await client.end();
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| No pooling (new connection per query) | N/A | N/A | N/A | [X] Bad |
| Using connection pool | N/A | N/A | N/A | [OK] Good |