Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Connection Pooling and Length of time Connection is kept open

Posted on 2004-10-11
3
Medium Priority
?
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

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

Accepted Solution

by:
arif_eqbal earned 1500 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

618 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