C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » General »

what is pooling in mysql


Posted Date: 04 Dec 2008      Posted By: prabhu      Member Level: Silver     Points: 1   Responses: 4



what is pooling in mysql :

for example i am using Mysql ,so in connectionstring pooling='true'
what is the meaning..
thanks in advance..





Responses

Author: Durga Prasad    04 Dec 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 5

Connection pooling is a technique of creating and managing a pool of connections that are ready for use by any thread that needs them.

This technique of "pooling" connections is based on the fact that most applications only need a thread to have access to a JDBC connection when they are actively processing a transaction, which usually take only milliseconds to complete. When not processing a transaction, the connection would otherwise sit idle. Instead, connection pooling allows the idle connection to be used by some other thread to do useful work.

In practice, when a thread needs to do work against a MySQL or other database with JDBC, it requests a connection from the pool. When the thread is finished using the connection, it returns it to the pool, so that it may be used by any other threads that want to use it.

When the connection is "loaned out" from the pool, it is used exclusively by the thread that requested it. From a programming point of view, it is the same as if your thread called DriverManager.getConnection() every time it needed a JDBC connection, however with connection pooling, your thread may end up using either a new, or already-existing connection.



Author: Deepika Haridas    05 Dec 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 4

Hi,

If you indeed have 300 users connecting simultaneously, and a maximum setting of 300 connections, then connection pooling will not help.
Connection pooling is meant to provide efficient re-use of connections - it will not increase the maximum you have available.
The connection pool will reduce the load because it intercepts all the calls to the constructor/destructor. 300 Connections might not exceed your max limit but the resources used creating and destroying all those connections will kill the machine. Check out you webserver/OS documentation, You can set it up easily in Windows & Apache. You might wanna look at SQL Relay for Linux.

Regards,
deepika



Thanks & Regards,
Deepika
Editor

If U want to shine like a SUN..First U have to burn like the SUN!!
Need a Guide? Join my mentor program..



Author: gowthami chowdary    06 Dec 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 5

Connection pooling is a technique of creating and managing a pool of connections that are ready for use by any thread that needs them.

This technique of "pooling" connections is based on the fact that most applications only need a thread to have access to a JDBC connection when they are actively processing a transaction, which usually take only milliseconds to complete. When not processing a transaction, the connection would otherwise sit idle. Instead, connection pooling allows the idle connection to be used by some other thread to do useful work.

In practice, when a thread needs to do work against a MySQL or other database with JDBC, it requests a connection from the pool. When the thread is finished using the connection, it returns it to the pool, so that it may be used by any other threads that want to use it.

When the connection is "loaned out" from the pool, it is used exclusively by the thread that requested it. From a programming point of view, it is the same as if your thread called DriverManager.getConnection() every time it needed a JDBC connection, however with connection pooling, your thread may end up using either a new, or already-existing connection.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Crystal Report Issue
Previous : Hi
Return to Discussion Forum
Post New Message
Category: General

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use