Senior & Expert .Net Developers Discussion Forum by Nyros Technologies

HIRE .Net Expert Developers Programmers Coders From India
Ruby on Rails PHP .Net Developers Community, Nyros Technologies, Kakinada
 
Log in  or IF not a member please REGISTER
Username:
Password:   


Keyword
Log in | Profile 

Advantages of Connection Pooling in ADO.Net

 
Post new topic   Reply to topic    Senior & Expert .Net Developers Discussion Forum by Nyros Technologies Index -> ADO.Net
View previous topic :: View next topic  
Author Message
Raghavendra



Joined: 21 Aug 2007
Posts: 222

PostPosted: Tue Dec 29, 2009 5:43 am    Post subject: Advantages of Connection Pooling in ADO.Net Reply with quote

Performance is an important consideration in modern software systems. Developers look for each and every opportunity to fine tune their applications for performance. To that end, ADO.NET connection pooling can significantly help you to write data access code that is performance oriented. Although enabled by default, one must know how to take control and fine tune the connection pooling to make the most of the feature.
What Is Connection Pooling?

Data-driven applications frequently access a database to query data. There are two broad ways to access the data:

1. Open a connection with the database as your application starts and keep it open throughout the life of your application. Fire all the queries through this open connection.
2. Open a connection just before executing a query and close it immediately once the query execution is over.

As you might have guessed, the former way is better as far as performance is concerned. However, it suffers from a serious limitation. Because one connection is held open for a large window, in terms of scalability it is extremely poor. In multiuser scenarios, such as web sites, this will restrict the total number of users who can access your application.

The second way is safe and follows the philosophy—"Open the connection as late as possible and close the connection as early as possible." Although this approach is good in terms of scalability and multiuser scenarios, it has its own disadvantage. The frequent creation, opening, closing, and destroying of the database connections results in performance penalty. This is precisely where database connection pooling come handy.

A database connection pool is a set of database connections that are held open with the database and are kept ready to serve. This way, a set of connections is created once the pool comes into existence. When a user requests a connection, an already created connection is served from the pool. Similarly, when a user closes a connection, it is returned to the pool instead of being destroyed. This can significantly improve the performance of data access.

Have a look at the following article. It will give the explanation with good example and sample code.

http://www.developer.com/db/article.php/3729831/Using-Connection-Pooling-in-ADONET.htm

Thanks & Regards,
Raghavendra K.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Senior & Expert .Net Developers Discussion Forum by Nyros Technologies Index -> ADO.Net
Page 1 of 1


 latest topics 
 Topics   Replies   Author   Views   Last Post 
No new posts Auto increment column value with respect to another column
1 suraj 42 Fri Jul 30, 2010 11:52 am
venkat View latest post
No new posts Is there any control like Gridview in WPF?
1 mukundh 13 Fri Jul 30, 2010 11:16 am
setty View latest post
No new posts Getting data from the other pages by sending a request.
1 pavani 9 Fri Jul 30, 2010 10:16 am
rajesh View latest post
No new posts Viewing or Reading an Assembly
0 sek 20 Mon Jul 26, 2010 10:33 am
sek View latest post
No new posts Multiple technologies to develop iPhone applications:
0 Ramya sree 21 Mon Jul 26, 2010 10:09 am
Ramya sree View latest post
No new posts What is the Difference Between CLR, CLS and CTS ?
1 pavani 27 Mon Jul 26, 2010 5:35 am
pavani View latest post
No new posts What is Android and How to install Android SDK.??
0 pavani 17 Mon Jul 26, 2010 4:46 am
pavani View latest post
No new posts Open-source libraries for iPhone application development:-
0 Teena 19 Sun Jul 25, 2010 8:17 am
Teena View latest post
No new posts Famous Mobile Sites:
1 kumar 17 Sun Jul 25, 2010 7:33 am
Teena View latest post
No new posts Introduction to PhoneGap framework
0 Dileep 24 Sun Jul 25, 2010 7:00 am
Dileep View latest post




Hire an expert .Net developer / coder / programmer or development team from India now!!

Other Forums : Ruby on Rails   ::   PHP   |   Free unlimited HTML CSS templates download

Nyros Technologies   |   Kakinada City Portal   |   Developers Blog   |   About .Net Experts   |   More