Solved

Connection Pooling and Length of time Connection is kept open

Posted on 2004-10-11
3
191 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Gridview selected row 9 49
HTML - Color not displaying correctly in EMAIL. 6 49
vb.net and creating a class 5 20
VB.NET - Refactor Class per SOLID principles 2 21
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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