diff options
| author | Jason Kirtland <jek@discorporate.us> | 2007-08-08 23:45:26 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2007-08-08 23:45:26 +0000 |
| commit | 4e7dec51e1ffd744b7c76765edc6e0b54e7bca9b (patch) | |
| tree | 3b314d3665d5802c96b403a671b72b6431479a03 /doc | |
| parent | 2f090b483d259048160682b88e3c21167523f61a (diff) | |
| download | sqlalchemy-4e7dec51e1ffd744b7c76765edc6e0b54e7bca9b.tar.gz | |
Added `set_types` to util, a tuple of available set implementations.
Added BIT and SET ([ticket:674])- all mysql data types are now covered!
Fix for YEAR DDL generation, also no longer a concatenable type.
Expanded docs for some mysql column esoterica.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/build/content/pooling.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/build/content/pooling.txt b/doc/build/content/pooling.txt index 0703ea9a2..e5ca623c8 100644 --- a/doc/build/content/pooling.txt +++ b/doc/build/content/pooling.txt @@ -1,6 +1,13 @@ Connection Pooling {@name=pooling} ====================== +SQLAlchemy uses *connection pooling* to increase efficiency and control resource consumption. Pooling is setup automaticaly during `Engine` creation and you don't need to do anything special to take advantage of it. + +A connection pool aims to extend the lifetime of a database connection as long as possible. Instead of closing the connection to the database when work is complete, a pooled connection returns to its "pool" and remains open. It can then be re-used for the next caller that needs a database connection. Callers requesting a connection from the pool may receive a brand new database connection or a recycled connection. + +In SQLAlchemy, interaction with the pool is largely transaparent. When you request a database connection with ``connect()``, for example, a connection will be retrieved from the pool. Calling ``close()`` on that connection will return it to the pool. + + This section describes the connection pool module of SQLAlchemy. The `Pool` object it provides is normally embedded within an `Engine` instance. For most cases, explicit access to the pool module is not required. However, the `Pool` object can be used on its own, without the rest of SA, to manage DBAPI connections; this section describes that usage. Also, this section will describe in more detail how to customize the pooling strategy used by an `Engine`. At the base of any database helper library is a system of efficiently acquiring connections to the database. Since the establishment of a database connection is typically a somewhat expensive operation, an application needs a way to get at database connections repeatedly without incurring the full overhead each time. Particularly for server-side web applications, a connection pool is the standard way to maintain a "pool" of database connections which are used over and over again among many requests. Connection pools typically are configured to maintain a certain "size", which represents how many connections can be used simultaneously without resorting to creating more newly-established connections. |
