Connection pooling means to reuse database connection

Connection Pooling is handled by the Connection Manager to reuse available connection instead of creating a new one. This is performance wise because the system won’t create and kill connection every time a database is require. This is also very true for web application that not only a same user may call multiple time the database per page but also go in multiple page and this is done by many users. To activate Pooling, add in the collection string “Pooling=True;”, that’s it.

To use connection pooling suffices to change the connection string. From there you can select the size of the pool and many other options.

Default value for the pool size is 100

The way pooling works does not involve any modification or special behavior for the database. It’s all code handled. All ADO.NET provider can use this mechanism.

Also, pooling does not have any huge disadvantage and than should always be activated. The only moment it can be bright to turn it off is when debugging connection problem.

If you like my article, think to buy my annual book, professionally edited by a proofreader. directly from me or on Amazon. I also wrote a TypeScript book called Holistic TypeScript

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.