Thursday, March 23, 2017

What is connection pooling in ADO.NET

When we create a connection to a database it is time consuming as it involves network-level handshaking and security credentialing for every new connection. In ADO.NET we use connection pooling, which reduces the cost of repeatedly opening and closing connections. In connection pooling the object we created for connection is sent to a pool rather than to a garbage collector and whenever we use the same connection string, it uses the object from pool instead of creating a new connection. There will be individual pools for each connection string and with same connection string we can have many connection objects.

By default pooling is enabled and we can turn off pooling for a specific connection by including the Pooling=false key-value pair in our connection string.

No comments:

Post a Comment

Call a function in child component from parent component in React

Consider the following parent component class Parent extends React.Component { constructor(props) { super(props);         thi...