What Is a Data Pool?

The database connection pool is responsible for allocating, managing, and releasing database connections. It allows applications to reuse an existing database connection instead of re-establishing one; release database connections with idle time exceeding the maximum idle time to avoid database connections that are not released. Missing database connection. This technology can significantly improve the performance of database operations.

Database connection pool

The database connection pool is responsible for allocating, managing, and releasing database connections. It allows applications to reuse an existing database connection instead of re-establishing one; release database connections with idle time exceeding the maximum idle time to avoid database connections that are not released. Missing database connection. This technology can significantly improve the performance of database operations.
Chinese name
Database connection pool
Concept
A critical limited expensive resource
Influencing factors
Maximum number of connections
Features
Allocate, manage, and release database connections
Database connections are a critical, limited, and expensive resource, and this is especially true in multi-user web applications. The management of the database connection can significantly affect the scalability and robustness of the entire application, and affect the program's performance indicators. The database connection pool is proposed for this problem.
When the database connection pool is initialized, a certain number of database connections are created in the connection pool. The number of these database connections is restricted by the minimum number of database connections. Regardless of whether these database connections are used, the connection pool will always guarantee at least that many connections. The maximum number of database connections in the connection pool limits the number of connections that this connection pool can occupy.
The basic idea of connection pool is in
There are the following types of open source database connection pools in Java:
1. C3P0: It is an open source JDBC connection pool. It is released with Hibernate [2] in the lib directory and includes DataSources objects that implement the Connection and Statement pools of the jdbc3 and jdbc2 extension specifications.
2. Proxool: is a Java SQL Driver driver that provides a connection pool encapsulation of other types of drivers of choice. It can be easily ported to existing code, fully configurable, fast, mature, and robust. You can transparently add connection pooling capabilities to existing JDBC drivers.
3. Jakarta DBCP: DBCP is a database connection pool that relies on the Jakartacommons-pool object pool mechanism. DBCP can be used directly in applications.
4, DDConnectionBroker: is a simple, lightweight database connection pool.
5, DBPool: is an efficient and easy to configure database connection pool. In addition to supporting the functions that connection pools should have, it also includes an object pool that enables users to develop a database connection pool that meets their needs.
6, XAPool: is an XA database connection pool. It implements javax.sql.XADataSource and provides connection pooling tools.
7, Primrose: a database connection pool developed in Java. Currently supported containers include Tomcat4 & 5, Resin3 and JBoss3. It also has a standalone version that can be used in applications without having to run in a container. Primrose controls the tracking, configuration, and dynamic pool management of SQL processing through a web interface. Under heavy load conditions, connection request queue processing can be performed.
8, SmartPool: is a connection pool component, which mimics the characteristics of the application server object pool. SmartPool can solve some critical issues such as connection leaks, connection blocking, open JDBC objects (such as Statements, PreparedStatements), etc. SmartPool features include:
  • Support multiple pools
  • Automatically close associated JDBC objects
  • Detection of connection leaks after set time-outs
  • Track connection usage
  • Force enable the least recently used connection
  • "Pack" SmartPool into an existing pool
9, MiniConnectionPoolManager: is a lightweight JDBC database connection pool. It only requires Java 1.5 (or higher) and does not rely on third-party packages.
10. BoneCP: It is a fast, open source database connection pool. Help users manage data connections and allow applications to access databases faster. 25 times faster than C3P0 / DBCP connection pool.
11. Druid: Druid is not only a database connection pool, but also contains a ProxyDriver, a series of built-in JDBC component libraries, and a SQL Parser.
Supports all JDBC compatible databases, including Oracle, MySql, Derby, Postgresql, SQL Server, H2, etc.
Druid is optimized for Oracle and MySql, such as:
  • Oracle's PS Cache memory usage optimization
  • MySql ping detection optimization
Druid provides full SQL support for MySql, Oracle, Postgresql, and SQL-92. This is a hand-written high-performance SQL Parser that supports the Visitor mode, making it easy to analyze the SQL abstract syntax tree.
Simple SQL statements take less than 10 microseconds, and complex SQL takes 30 microseconds.
The SQL Parser provided by Druid can intercept SQL at the JDBC layer for corresponding processing, such as database depot, table, audit, etc. Druid's WallFilter against SQL injection attacks is implemented by analyzing semantics of Druid's SQL Parser

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?