473,545 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help with extreme slow site

Dear sir,

My forum site is getting much slower. At this moment, it takes 20 seconds
for the first hit. The second hit is much quicker, I think it is because of
cache. Any idea how can I increase the speed of my ASP.NET site.

This is a forum site using VB.NET + MSDE. The database is about 500 MB. I
think the reason it is slow is because the page navigation. At first, I get
the value of how many pages in total, then write the page navigation bar,
next, I get the information of one page by a stored procedure. Below is my
store procedure.

At this moment, there are about 50,000 records in that database. Any idea
how can I make it quicker?

--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com

CREATE PROCEDURE MyProc_GetMsgPe rPage
@GroupId int,
@PageNr int,
@PageSize int
AS

-- create a temporary table with the columns we are interested in
CREATE TABLE #TempMsg
(
TempId int IDENTITY PRIMARY KEY,
IntMsgId Int,
MsgTitle varchar(200),
MsgAuthor varchar(100),
MsgShort varchar(500),
MsgDate varchar(50)
)

-- fill the temp table with all the topics for the
-- specified forum retrieved from the v_Forums_Topics view
INSERT INTO #TempMsg
(
IntMsgId,
MsgTitle,
MsgAuthor,
MsgShort,
MsgDate
)
SELECT
AutoId,
MsgTitle,
MsgAuthor,
dbo.TrimText(Ms gContent),
MsgDate
FROM
tblMsg WHERE GroupId = @Groupid AND isRef=0 Order by ServerId DESC
-- declare two variables to calculate the range of records to extract for
the specified page
DECLARE @StartId int
DECLARE @ToId int
-- calculate the first and last ID of the range of topics we need
SET @StartId = ((@PageNr - 1) * @PageSize) + 1
SET @ToID = @PageNr * @PageSize
-- select the page of records
SELECT IntMsgId, MsgTitle, MsgAuthor, MsgShort, MsgDate
FROM #TempMsg WHERE TempId >= @StartId AND TempId <= @ToId
GO
Nov 18 '05 #1
3 1227
"Guoqi Zheng" <no@sorry.nl> wrote in
news:uP******** ******@tk2msftn gp13.phx.gbl:
At first, I get
the value of how many pages in total, then write the page navigation
bar, next, I get the information of one page by a stored procedure.
Below is my store procedure.

At this moment, there are about 50,000 records in that database. Any
idea how can I make it quicker?


Do the page numbers change often?

If not, you could cache the information in an Application Variable on the
start of an application.

Otherwise, try adding some indexes to your columns. Indexes often help
speed up queries.

--
Lucas Tam (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #2
Thanks for the reply.

Page nr. does not change very often, twice per day I think.

I am thinking it may have something to do with the cache of Stored
procedure. For lazy reason, I have a few site with exactly the same code
only use different database and they all use SA login. I am thinking that
maybe that confuse the database.

Because when I only clicking one site, the speed is always very fast. When I
click other site and come back, the speed is 20 seconds again.

Is this possible, any one got an idea?

--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com
"Lucas Tam" <RE********@rog ers.com> wrote in message
news:Xn******** *************** ****@140.99.99. 130...
"Guoqi Zheng" <no@sorry.nl> wrote in
news:uP******** ******@tk2msftn gp13.phx.gbl:
At first, I get
the value of how many pages in total, then write the page navigation
bar, next, I get the information of one page by a stored procedure.
Below is my store procedure.

At this moment, there are about 50,000 records in that database. Any
idea how can I make it quicker?


Do the page numbers change often?

If not, you could cache the information in an Application Variable on the
start of an application.

Otherwise, try adding some indexes to your columns. Indexes often help
speed up queries.

--
Lucas Tam (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 18 '05 #3
"Guoqi Zheng" <no@sorry.nl> wrote in message
news:uP******** ******@tk2msftn gp13.phx.gbl...
Dear sir,

My forum site is getting much slower. At this moment, it takes 20 seconds
for the first hit. The second hit is much quicker, I think it is because of cache. Any idea how can I increase the speed of my ASP.NET site.


When you say "the first hit", do you mean the first request after
application restart? If so, it's to be expected, as that's when compilation
is taking place. The performance of subsequent requests is much more
interesting.

--
John Saunders
johnwsaundersii i at hotmail
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3441
by: j askey | last post by:
I have a strange bandwidth issue that I have finally tracked down to something fairly specific if anyone has any ideas... Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI Network: DSL line with a Cisco 678 router using NAT and static port maps. Two switches between webserver and Cisco. Problem: Accessing PHP driven site via any computer...
0
2257
by: MarionEll | last post by:
--------------------------------------------------------- ************* Call for Participation ************** ************ Late Breaking News ************* *********** Extreme Markup Languages 2003 ************ --------------------------------------------------------- The regular (peer reviewed) part of the Extreme 2003...
9
1601
by: Elmbrook | last post by:
Hi, I've been trying to figure out this javascript code used here (this code is used for supplying browser info to a tracking company): In particular I'm trying to understand this line: EXd=document;EXw?"":EXw="na";EXb?"":EXb="na"; and this one: EXd.write("<img src=\"http://t0.extreme-dm.com","/0.gif?tag=abc&j=y&srw="+EXw+"&srb="+EXb+"&...
25
3967
by: Dave Turner | last post by:
I know that its impossible to completely prevent somebody from ripping a site (or cracking software) if that person has the skills and the time/patience, but there are tricks that can be employed in software which slow crackers down, from things like self-decrypting code to anti-debug tricks, and most people have a breaking point - if you can...
4
4762
by: sommes | last post by:
It's only happen on .asp website, what's the problem? Thank you
9
2016
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It also allows them to copy files from your computer to their's. It is dangerous. Avoid at all costs. CSS that isn't stored in the victim's computer....
8
2035
by: cms-hispano.org | last post by:
i'm building a site about extreme accessibility, i.e.: how (and why) to get sites to become fully accessible, *beyond* W3C Web Accessibility Initiative guidelines. it's far from being completed (i just started it off!), so i'd very much appreciate any comment on the site/issue: www.accessibility.ws (fyi: i a non-commercial, personal...
5
3083
by: simon | last post by:
hello, I have a server set up on my local (home) network and can not get an ajax application to run on the box. it works fine on our developement server and also works fine locally. I copied the application to the server, setup the website, installed the ajax extensions, also loaded/enabled front end extensions so i could load the site...
10
2333
by: penworthamnaynesh | last post by:
Does php slow your website down? This is what i would like to know.The reason is because my site is writtent 50% in html and 50% in php and is very slow at loading. And i cant tell wether php is doing it or html o is it another reason because i only have 20gb bandwidth My site is called : ultimate city the game http://www.ultimate-gamez.net
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.