none
Doubt about connection pooling RRS feed

  • Question

  • Will it be enabled connection pooling by default even if we did't explicitly spcify in connection string?

    What does max pool size mean? Is it representation of maximum number of users can connect (or Browse) to the database from anywhere in web at a time?

    What dows min pool size mean?

     

    Answer please

    Thanks in advance

    Saturday, September 29, 2007 6:15 AM

All replies

  • Not sure about other providers, but in a case of .NET Managed Provider for SQL Server pooling is enabled by default and maximum pool size in this case set to 100 and minimum pool size to 0. Max pool defines maximum connections in a pool. For example, client opens connection to the database, gets data and closes connection. If pooling is enabled, then closed connection will be placed into the pool for future reuse. If next time client tries to connect to the database using EXCAT same connection string and there is a connection available in a pool, then provider will reuse this connection. If there is no available connection from the pool (for example some, other client grabbed it already), then provider opens another connection and it will be placed into the pool after connection closed, but it is subject to max pool size. In our specific case we will have 2 connections in a pool. Pool may glow up to max allowed size. After that clients will be waiting for the connection from the pool. Min pool size defines least number of the connections in a pool. For example, application starts and no connections were opened yet. In this case pool size is 0. Assuming that Min pool size is set to 5. Then when application opens connection for the first time and closes it, provider will automatically create 5 identical connections in a pool, so in a case if multiple clients try to open connections at same time could grad connection from the pool and benefit from it.

     

    Saturday, September 29, 2007 11:01 AM
    Moderator