Database Connection Question
From: Christian Cooper (christiancooper77_at_hotmail.com)
Date: 04/29/04
- Next message: Ken Schaefer: "Re: Database Connection Question"
- Previous message: Evertjan.: "Re: Time question - add 15 minutes"
- Next in thread: Ken Schaefer: "Re: Database Connection Question"
- Reply: Ken Schaefer: "Re: Database Connection Question"
- Reply: Bob Barrows [MVP]: "Re: Database Connection Question"
- Reply: Aaron Bertrand [MVP]: "Re: Database Connection Question"
- Reply: Bob Barrows [MVP]: "Re: Database Connection Question"
- Messages sorted by: [ date ] [ thread ]
Date: 29 Apr 2004 05:20:10 -0700
I have a question for you, it involves IIS and database connections.
When I got hired, we were using an asp include file with database functions
and would open and close the database connection multiple times in 1 script.
Common sense dictated we should only open the connection once, get all
necessary information, and close it once per script load. We ran some of
your stress testing software and obviously saw performance increases.
Then I stumbled upon the ability to open a database connection when the user
first creates a session and logs into our authentication, and close it when
that session expires or the window is closed. This would mean each user
using the system would connect once and disconnect when they are done.
Otherwise, each user using the system would be making let's say 5 database
connections and disconnections per minute, each time they load an asp page.
So if each user uses the system for 1 hour, and there are 500 of them, there
are 150 000 open and closes.
My Question:
Wouldn't 500 open and closes be LESS stress on the system, by using a
persistent connection?
Also, then I can run queries on the system tables and tell how many users
are logged into the application....
I don't know, the persistent connection seems much better to me, easier to
use and less network traffic, but I've read the opposite, am I missing
something?
- Next message: Ken Schaefer: "Re: Database Connection Question"
- Previous message: Evertjan.: "Re: Time question - add 15 minutes"
- Next in thread: Ken Schaefer: "Re: Database Connection Question"
- Reply: Ken Schaefer: "Re: Database Connection Question"
- Reply: Bob Barrows [MVP]: "Re: Database Connection Question"
- Reply: Aaron Bertrand [MVP]: "Re: Database Connection Question"
- Reply: Bob Barrows [MVP]: "Re: Database Connection Question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|