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 6367651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:34:35+00:00 2026-05-25T00:34:35+00:00

I have a rather large table that takes about 10-20 seconds to fetch depending

  • 0

I have a rather large table that takes about 10-20 seconds to fetch depending on the query. That makes website seems slower due to that.

I was thinking of using LIMIT to limit the number of results and using ajax to display the whole table bit by bit.

Right now I am using ajax to display the whole table at once.

I am thinking of doing something like this…

Backend:

 $offset = 0;
 $rowsToFetch = 100;
 {
   //Loop
   $query = "SELECT * FROM TABLE_NAME LIMIT $offset, $rowsToFetch"
   $offset = +100;
   $rowsToFetch = +100;
 }

Frontend:

Call ajax function that will call the back end part recursively and display part by part until finished.

I am sure it’s a bit more complicated than that.

Is there a better way to do this? Any ideas how to start? Pitfalls to lookout for?

P.S. I don’t want to use pagination. I want to display everything in one page(Benefits: CTRL+F)

Edit: Fetching in the database(command line) takes about 5-7 seconds. But in the website displaying the records take about 10-20 secs. Query takes about 4-5 secs. I timed individual sections of the page to identify that.

  • 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-05-25T00:34:36+00:00Added an answer on May 25, 2026 at 12:34 am

    That won’t speed up the query itself, because the first thing done by mysql is implementing the whole query, and after that it just takes the needed number of results. Consider using nidexes instead or eliminate join number, try sevaral simple queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website that uses JQuery to construct a rather large table. When
I have a rather large (many gigabytes) table of data in SQL Server that
I have a rather large table which I need to query for a reporting
I have a rather large mysql table that has the following structure: fieldid |
I have rather large input XML files that must be converted to a given
I have rather large project that uses ICU regex classes. Basically it might run
I have a rather large (80k loc) java desktop app that talks to a
I have a rather large table with 150,000 + records. It has a lot
I have a rather large chunk of code that breaks sometimes, as far as
I have a large table (potentially millions of rows) that in its naive form

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.