when do you use connection pooling?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 27
Joined: Sat 28 May 2005 20:37

when do you use connection pooling?

Post by 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?


Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Post by 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/defau ... ovider.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.

Post Reply