?
Solved

Connection Pooling and Length of time Connection is kept open

Posted on 2004-10-11
3
Medium Priority
?
195 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

770 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