sessions, global.asa and performance

R

Rudi Ahlers

Hi.

I wonder if anyone could shed some light. I have a site, with a MSSQL DB, of
about 1.5GB. Now, the DB connection string is in global.asa, and I'm moving
this to a .asp file, hoping it would improve performance.
Another thing I would like to try: On two of the pages, the DB is being
queried for companies who have subscribed, and companies who haven't yet.
The problem is, this list is long, and lot of info id being pulled, like the
company name, id, and some other info. Can I save this list of info in a
session? Is it safe todo so, and will it improve performance? Cause then,
when a user moves around those two pages, he get's cached info.

alternatively, what can I do / look at, to increase performance? When the
site was designed, performance wasn't an issue, but now that the list of
both the subscribed company list, _and_ the temp company list has grown to a
very long list, the site is slow.

--

Kind Regards
Rudi Ahlers
+27 (82) 926 1689

Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
 
E

Egbert Nierop \(MVP for IIS\)

Rudi Ahlers said:
Hi.

I wonder if anyone could shed some light. I have a site, with a MSSQL DB, of
about 1.5GB. Now, the DB connection string is in global.asa, and I'm moving
this to a .asp file, hoping it would improve performance.
Another thing I would like to try: On two of the pages, the DB is being
queried for companies who have subscribed, and companies who haven't yet.
The problem is, this list is long, and lot of info id being pulled, like the
company name, id, and some other info. Can I save this list of info in a
session? Is it safe todo so, and will it improve performance? Cause then,
when a user moves around those two pages, he get's cached info.

alternatively, what can I do / look at, to increase performance? When the
site was designed, performance wasn't an issue, but now that the list of
both the subscribed company list, _and_ the temp company list has grown to a
very long list, the site is slow.

Hi moving server side code such as connection **strings** really donot make
a difference.

Rules
1) do not store objects in session variables (such as connections and
recordsets)
2) keep html optimized and small
3) If html gets too big, make sure you enable paging there are
**sufficient** grid paging samples on the net for asp pages.
4) enable IIS html compression for the .asp extension. Compression can be
done on *server level* from the IIS MMC.

To enable the .asp extension, use the Metabase editor 2.2 or the free
metabase explorer tool from Microsoft
 
R

Rudi Ahlers

well, if the connection string is in global.asa, the connection stays open
for the whole time a user is on the site, regardless if he's actually on a
page that has database generated content.
And the other stuff, is as you say already :)

--

Kind Regards
Rudi Ahlers
+27 (82) 926 1689

Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
message
Rudi Ahlers said:
Hi.

I wonder if anyone could shed some light. I have a site, with a MSSQL DB, of
about 1.5GB. Now, the DB connection string is in global.asa, and I'm moving
this to a .asp file, hoping it would improve performance.
Another thing I would like to try: On two of the pages, the DB is being
queried for companies who have subscribed, and companies who haven't yet.
The problem is, this list is long, and lot of info id being pulled, like the
company name, id, and some other info. Can I save this list of info in a
session? Is it safe todo so, and will it improve performance? Cause then,
when a user moves around those two pages, he get's cached info.

alternatively, what can I do / look at, to increase performance? When the
site was designed, performance wasn't an issue, but now that the list of
both the subscribed company list, _and_ the temp company list has grown to a
very long list, the site is slow.

Hi moving server side code such as connection **strings** really donot make
a difference.

Rules
1) do not store objects in session variables (such as connections and
recordsets)
2) keep html optimized and small
3) If html gets too big, make sure you enable paging there are
**sufficient** grid paging samples on the net for asp pages.
4) enable IIS html compression for the .asp extension. Compression can be
done on *server level* from the IIS MMC.

To enable the .asp extension, use the Metabase editor 2.2 or the free
metabase explorer tool from Microsoft
 
D

Dave Anderson

Rudi said:
well, if the connection string is in global.asa, the connection stays
open for the whole time a user is on the site, regardless if he's
actually on a page that has database generated content.

Not quite right. If the *CONNECTION OBJECT* is in global.asa, then it
persists according to its scope (session/application).

But a connection string is no different from any other string.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
E

Egbert Nierop \(MVP for IIS\)

Rudi Ahlers said:
well, if the connection string is in global.asa, the connection stays open
for the whole time a user is on the site, regardless if he's actually on a

There you go!
Do *not* keep the connection open, open it for each time, the page is
exectued since ADO utilizes resource pooling it will remember open
connections that are FREE from the pool. If you keep connections open, they
are -not- returned to the pool. Result? Your site will block and become
slow. So this is THE way to do it(please don't ask me to write an article
about it, just find on the subject
www.google.com?search=connection+session+store)

My page.asp shortened

<HTML>
<%
Set Conn= CreateObject("ADODB.Connection")
Conn.Open Application("conn")

Set rs = Conn.Execute("SELECT blah FROM mytable")
Do until rs.eof
..... build a table
Loop
Rs.close

Conn.Close
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top