Optimize load of asp-page with MySQL data...

Hello out there. :-)

I have a webdatabase (Classic asp and MySQL) located on a webhotel. An overview page loads an overview of the main records in the database (relational database). Right now there's about 1.800 records in the table that the Query pulls. It shows 20 records a time and has got a page navigation panel to go from record 1 to 20, 21 to 40 and so on. First time the user opens it, it takes almost 10 seconds. After that you can navigate back and forth quick enough.
Can I optimize the SQL Query so it will load faster? I thought about something like "SELECT TOP 20" to load the first 20 records, but won't that affect the page navigation and the info about the total number of records in the database?
I appreciate some hints big time.  :-)

Best regards

Ulrich
ullenulleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
have a look at the article below that demonstrates how to do paging and get back only the records you're viewing.

http://www.4guysfromrolla.com/webtech/121298-1.shtml

assuming you're using ajax, you should be able to see an improvement in the load time. Also check out:

http://www.4guysfromrolla.com/webtech/042606-1.shtml

for an updated paging technique using a stored procedure
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ryan ChongCommented:
in MySQL, you can limit the no of records to be returned by adding clause:

[LIMIT {[offset,] row_count | row_count OFFSET offset}]

for more info, you can refer to:

13.2.8 SELECT Syntax
https://dev.mysql.com/doc/refman/5.0/en/select.html

Using MySQL LIMIT
http://www.mysqltutorial.org/mysql-limit.aspx

this will further speed up your page loading time. hence you may consider to use that.
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
why the grade of B?

both answers gave you what you were looking for
0
ullenulleAuthor Commented:
Hi Big Monty.

Oh... my browser must have been acting up. How can I change that?

Best regards

Ulrich
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
you can hit the Request Attention link and someone will come along and open it back up for you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.