Databases Reference
In-Depth Information
Get database version information.
Establish the optimal database protocol packet size to be used for communi-
cation.
Set session settings.
In addition, the database management system establishes resources on behalf
of the connection, which involves performance-expensive disk I/O and memory
allocation.
You might be thinking that you can eliminate network round trips if you
place your applications on the same machine as the database system. This is, in
most cases, not realistic because of the complexity of real-world enterprises—
many, many applications accessing many database systems with applications
running on several application servers. In addition, the server on which the data-
base system runs must be well tuned for the database system, not for many differ-
ent applications. Even if one machine would fit the bill, would you really want a
single point of failure?
Using Connection Pooling
A connection pool is a cache of physical database connections that one or more
applications can reuse. Connection pooling can provide significant performance
gains because reusing a connection reduces the overhead associated with estab-
lishing a physical connection. The caveat here is that your database server must
have enough memory to manage all the connections in the pool.
In this topic, we discuss client-side connection pooling (connection pooling
provided by database drivers and application servers), not database-side connec-
tion pooling (connection pooling provided by database management systems).
Some database management systems provide connection pooling, and those
implementations work in conjunction with client-side connection pooling.
Although specific characteristics of database-side connection pooling vary, the
overall goal is to eliminate the overhead on the database server of establishing
and removing connections. Unlike client-side connection pooling, database-side
connection pooling does not optimize network round trips to the application. As
we stated previously, connecting to a database is performance-expensive because
of the resource allocation in the database driver (network round trips between
the driver and the database), and the resource allocation on the database server.
Client-side connection pooling helps solve the issue of expensive resource alloca-
tion for both the database driver and database server. Database-side connection
pooling only helps solve the issue on the database server.
Search WWH ::




Custom Search