Search code examples
sqldatabase-connectionenterprisesqlconnection

Single Persistent Connection or Multiple disposable sql connection for Enterprise applications


related:Multiple Queries on single connection

In a Enterprise application, Is having a single connection execute for different inputs is better than disposing connections after their every execution? btw this is .net 2.0 and Sql 2005 i am talking about but the question applies to all database systems.


Solution

  • It is generally better to just open and dispose connections when you need them. Let connection pooling do its job.