Why use a database connection pool

  1. A database connection is a time-consuming operation, a plurality of connection pool may share a connection operation
  2. The basic idea of ​​the database connection pool is to create a "buffer pool" for the database connection. Placed in advance certain number of connections in the buffer pool, establish a database connection when needed, simply remove the "pool" of one, then put it back after use. We can prevent endless connected with the database system by setting the maximum number of connection pools. More importantly, we can provide a basis for monitoring by the connection pool management mechanism the number of database connections, usage, system development, testing and performance tuning
  3. Use connection pooling is to improve the management of database connection resources

Guess you like

Origin www.cnblogs.com/yanguobin/p/11619094.html