# Connection Pooling

## Content



ADO.NET provider for OData implements connection pooling to reduce the efforts of repeatedly opening and closing connections. A connection pool is a cache of database connections maintained where the user can reuse existing active connections with the same connection string instead of creating new connections when a request is made to the database.

Connection pools are used to enhance the performance of executing commands on a database. The provider supports pooling, by default with the pool size set to 100. However, pooling can be disabled by setting the [UsePool](/componentone/api/services/online-dataconnector/dotnet-standard-api/C1.DataConnector/C1.DataConnector.C1ConnectionStringBuilder.UsePool.html) property to false.

The following code demonstrates the implementation of connection pooling in ADO.Net provider for OData with the Max Pool Size key set to 20.

```csharp
//With Pool: It saves your time as the connection object is already available in the pool
string connectionString = "Url=https://services.odata.org/V4/Northwind/Northwind.svc; Max Pool Size = 20";
```

To disable pooling, set the Use Pool key to false in the connection string as shown in the following code:

```csharp
//Without Pool
string connectionString = "Url=https://services.odata.org/V4/Northwind/Northwind.svc; Use Pool = false";
```