Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8558305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:46:52+00:00 2026-06-11T15:46:52+00:00

I’ve written a web application in ASP which reads 3600 rows from a MySQL

  • 0

I’ve written a web application in ASP which reads 3600 rows from a MySQL database (v5.1.63) and outputs the data in an HTML table. I’m using a recordset to get the data and pagesize/cursorlocation to let the user step forward/backward between the pages. The database contains some 200.000 rows right now but is continuously growing.

The page takes longer and longer to load (approx. 15-20 seconds now) and I would like to optimize it if possible.

I would be very interested in getting tips on how to improve the performance.

Here is the database structure:

#   Col   Type          Collation       Attributes  Null    Default
1   ID    int(11)                         No       None     AUTO_INCREMENT
2   mean  varchar(5)    utf8_general_ci   No       None 
3   max   varchar(5)    utf8_general_ci   No       None 
4   min   varchar(5)    utf8_general_ci   No       None 
5   dt    varchar(20)   utf8_general_ci   No       None 
6   dir   varchar(2)    utf8_general_ci   No       None 
7   log   text          utf8_general_ci   No       None 

Here is the code I’m using:

' Opening the db
Set oConn = Server.CreateObject("ADODB.Connection")
Set oRS = Server.CreateObject("ADODB.Recordset")
oConn.ConnectionString =
"DRIVER={MySQL};SERVER=<server>;DATABASE=<database>;UID=<uid>;PWD=<pwd>;"
oConn.Open

' Retrieve 3600 records
sSQL = "SELECT * FROM mytable ORDER BY id DESC"
oRS.CursorLocation = adUseServer
oRS.PageSize = 6*600
oRS.Open sSQL, oConn, adOpenForwardOnly, adLockReadOnly
nPageCount = oRS.PageCount

...code to set the page selected by the user (nPage)

oRS.AbsolutePage = nPage

Do While Not (oRS.EOF Or oRS.AbsolutePage <> nPage)
    ...
    Response.Write("<td>" & oRS("dt") & "</td>")
    Response.Write("<td>" & oRS("mean") & "</td>")
    Response.Write("<td>" & oRS("min") & "</td>")
    Response.Write("<td>" & oRS("max") & "</td>")
    ...
    oRS.MoveNext
Loop
oRS.Close
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:46:53+00:00Added an answer on June 11, 2026 at 3:46 pm

    If you’re using MySQL as the RDMS – it would be far more efficient if you performed the paging using mySqls LIMIT clause:

    i.e. to get 10 items per page for a given querystring page number:

    ItemsPerPage    = 10
    PageNumber      = request.querystring("Page")
    
    if PageNumber = "" then 
        PageNumber = 0
    end if
    
    Limit           = PageNumber * ItemsPerPage
    Query           = "SELECT * FROM mytable ORDER BY id DESC LIMIT " & Limit & ", " & ItemsPerPage
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a view passing on information from a database: def serve_article(request, id): served_article
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.