What are the database connection pool?

1. What is the database connection pool?

Database connection pool is responsible for the distribution, management and release of database connections, which allows an application to reuse an existing database connection, rather than re-create a; release the database connection idle for more than the maximum idle time to avoid because there is no release of the database connection database connection due to omissions. This technology can significantly improve the performance of database operations.

2. The role of database connection pool

  • Defining a number of databases, database connection does not result due to excessive since the system is running slow or crashes
  • Database connections do not need every time to create or destroy, saving resources
  • Database connections do not need every time to create, faster response time.


3.JAVA those database connection pool?

1, C3P0: JDBC connection pool is an open-source, it Hibernate [2] together in a release lib directory, including the object implementation jdbc3 DataSources specification and jdbc2 extended Connection and Statement of the pool.

2, Proxool: Java SQL Driver is a driver, provides a connection to other types of cell encapsulation driver selected. Very easy migration to an existing code, fully configurable, fast, mature, robust. Transparently increase the functionality of the existing connection pool JDBC driver.

3, Jakarta DBCP: DBCP is dependent on a database connection pool Jakartacommons-pool object pooling mechanism. DBCP can use directly in the application.

4.Druid: Druid is not only a database connection pool, also contains a ProxyDriver, a series of built-in JDBC component library, a SQL Parser. It supports all JDBC-compliant databases, including Oracle, MySql, Derby, Postgresql, SQL Server, H2 and so on.

Druid for Oracle and MySql to do a special optimized, such as: 1.Oracle of PS Cache memory footprint optimization. ping detection of optimization 2.MySql. Druid offers full support for MySql, Oracle, Postgresql, SQL in SQL-92, which is a high-performance hand-written SQL Parser, support the Visitor pattern, making the analysis of SQL abstract syntax tree is very convenient. Simple SQL 30 microseconds when the statement is used within 10 microseconds, with complex SQL. Druid provided by SQL Parser layer can intercept SQL act accordingly in JDBC, such as sub-library sub-table and auditing. Druid defense against SQL injection attacks WallFilter, semantic analysis is achieved by the Druid's SQL Parser

Guess you like

Origin www.cnblogs.com/cyx0526/p/12068180.html