when do you use connection pooling?

when do you use connection pooling?

Postby shutterstock » Wed 13 Jul 2005 16:49

I'm confused about this feature..

It seems to me that it would only be useful for ASP.NET web based applications where lots of users are hitting the server...

but for now i have 2 connections that i keep reusing over the course of the application.

should i instead use a connection pool?
should i disconnect and reconnect those 2 connections every once in a while?

Jon
shutterstock
 
Posts: 27
Joined: Sat 28 May 2005 20:37

Postby Oleg » Fri 15 Jul 2005 12:21

ADO.NET is based on disconnected model, that is, you open connection, execute command(s) and close connection. Connection pool is integral part of the disconnected model. You can read about using it in MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconConnectionPoolingForSQLServerNETDataProvider.asp. Our connection pool behaves in the same way. You can turn off connection pooling by adding pooling = false to your connection string. You can call MySqlConnection.ClearPool method to close connections that are currently in pool.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56


Return to dotConnect for MySQL