Solved

Connection Pooling and Length of time Connection is kept open

Posted on 2004-10-11
3
189 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
Comment Utility
Any chance of some comments?
0
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 500 total points
Comment Utility
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
Comment Utility
Thanks for your thoughts. :)

Does anyone else have any thoughts?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
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…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

13 Experts available now in Live!

Get 1:1 Help Now