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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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 MontyWeb Ninja at largeCommented:
have a look at the article below that demonstrates how to do paging and get back only the records you're viewing.


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


for an updated paging technique using a stored procedure

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 ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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


this will further speed up your page loading time. hence you may consider to use that.
Big MontyWeb Ninja at largeCommented:
why the grade of B?

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

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

Best regards

Big MontyWeb Ninja at largeCommented:
you can hit the Request Attention link and someone will come along and open it back up for you
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.