Sample Header Ad - 728x90

What are the methods to paginate a table 100 rows at a time?

3 votes
1 answer
2384 views
Let's say we have a table with a large number of records. Now to show all the data using pagination in a basic framework using a MySQL query, we can use limits to get a subset of rows: SELECT * FROM TABLE_NAME WHERE CONDITION ORDER BY COLUMN1 LIMIT 0,100; and so on. To my understanding, LIMIT will work once the temporary result table is generated, or in other words, the search will go through all the rows once and then the final result will be populated. Am I right? The query result takes much time to get data with limit and sometimes the system just reaches execution time limits. Is there any other better solution for this?
Asked by Anant (131 rep)
Jan 10, 2020, 06:26 AM
Last activity: Feb 4, 2025, 12:05 PM