c# - Why do we need to set Min pool size in ConnectionString -
for sql connection pool, why need set min pool size? connections saved in connection pool , reused, why need keep live connections specified min pool size? thanks.
opening , maintaining connections expensive, if know need multiple connections (always) it's better specify minpoolsize
because it's ensured these connections available.
also, msdn:
if
minpoolsize
either not specified in connection string or specified zero, connections in pool closed after period of inactivity. however, if specifiedminpoolsize
greater zero, connection pool is not destroyed until appdomain unloaded , process ends. maintenance of inactive or empty pools involves minimal system overhead.
Comments
Post a Comment