What is a database connection pool?

A database connection pool maintains a collection of reusable database connections. Instead of creating a new connection for every request, application code borrows an available connection and returns it to the pool when finished. Pooling reduces connection setup overhead and helps control the number of simultaneous database connections.

Key Takeaways
  • Pools reuse connections.
  • They reduce connection-establishment overhead.
  • Pool size should be configured according to workload and database capacity.
Knowledge Check

Why are database connection pools useful?