Re: ASP, looping, and stored procedures.... error '800a0bb9' ...
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 11/30/04
- Next message: Beau: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Previous message: Aaron [SQL Server MVP]: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- In reply to: Beau: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Next in thread: Bob Barrows [MVP]: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Reply: Bob Barrows [MVP]: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Reply: Beau: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Nov 2004 13:51:29 -0500
Beau wrote:
> Ok, the joins made it work a bit faster. There are 8 SP calls on the
> page PER loop. The looping goes by month from and to dates selected
> by the user. I am using alot of data and a large date range on a
> single test box. (specs unknown)
>
> The page also has to do a little FSO at the beginning to delete any
> previous .gif's in the output folder. (the page uses a graphing
> component to draw out all the data collected/processed by the SP's
> and ASP code.
>
> In pure ASP the page takes about 15 seconds. With the SP's and joins
> in the SP's that you suggested and graciously helped me with, the
> page run time is down to 10-11 seconds.(for that particular call,
> date range, client data, etc. (Keeping test params the same each run.)
>
> Anything else I can do to speed this up?
It depends on where your bottlenecks are. You need to quantify where the
time is being consumed. You can use this type of code to determine this:
dim t
t=now
'do some work
response.write "this bit took " & datediff("ms",t,now)/1000 & " sec.<BR>"
'do some more
'etc.
If your bottleneck turns out to be occurring in the ASP code itself rather
than retrieving the results from the database, you might think about putting
all this ASP looping into a stored procedure. I'm not sure what your
objective here is so I really can't get too specific.
If you are unable to think of a way to do all this processing in a single
stored procedure, then you may want to think about utilizing GetRows arrays
instead of recordset loops, which are very inefficient. See
>
> Oh, and by the way, the test box has SQL server and IIS on it. It's
> the same box.
>
> -Won't I notice an improvement in performance much more in the actual
> live environment if the SQL boxes are clustered and the IIS boxes are
> in a farm seperated? (I realize that network speed, server speed,
> other factors, etc will come into play)
I would think so, yes. SQL Server performs much better if it is given
sufficient RAM to use/
> -Do SP's reduce network traffic?
Yes. Even if a SP performs a single query, you've just sent a procedure name
and parameter values across the wire, instead of a long sql statement. So
network traffic is reduced even with a simple SP. Now, if you go ahead and
encapsulate several queries into a single SP, the reduction in network
traffic can be enormous (one call to the database, instead of calls for each
of the queries)
> I know that they share the page's
> processor burden by making the SQL box work instead of ths IIS's ASP
> doing it all.
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
- Next message: Beau: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Previous message: Aaron [SQL Server MVP]: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- In reply to: Beau: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Next in thread: Bob Barrows [MVP]: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Reply: Bob Barrows [MVP]: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Reply: Beau: "Re: ASP, looping, and stored procedures.... error '800a0bb9' ..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|