Solved

Connection Pooling and Length of time Connection is kept open

Posted on 2004-10-11
3
190 Views
Last Modified: 2010-04-23
I'm maintaining an application where each user has their own connection string and the connection to the database is opened when the application is loaded and the connection is closed when the user exits from the application.

I've done some reading into connection pooling and it looks like a way better option. Would this be right?

Also, should the connection be closed, re-opened and closed again between calls to the database?

If both of these were implemented would there be a noticeable performance increase?
0
Comment
Question by:PeterErhard
  • 2
3 Comments
 

Author Comment

by:PeterErhard
ID: 12285192
Any chance of some comments?
0
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 500 total points
ID: 12285300
See its strictly a Design issue and will depend upon a lot of parameters like

How often does the User interact with the dataBase (Not the data)
If it is a dataEntry form is it OK to have Batch Updates or every Row needs to be put back in the dataBase for concurrency reasons

Ultimately there should be a judicious use of the Connection if you expect that once the data is fetched it is not required to go back to the database for some time its better if you close the connection.

You should try to close the connection as often as you can, However since opening a connection is slow you might sometimes leave it open for next transaction but try to avoid it as much as possible.

As for different users having different connection string that's quite normal, store the connection string in a gloabl variable when user logs in and reuse it every time for opening the connection
0
 

Author Comment

by:PeterErhard
ID: 12294087
Thanks for your thoughts. :)

Does anyone else have any thoughts?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now