Loading table MYSQL query on pagination

I have a table, in which I am invoking-
select * from candidatedetail query.
This query is marked for page load, and on page load, since it has 1000 records, so it is loading all 1000. But I want to load the loading only according to the current page.

eg- 10 records per page.

How can I do that?

Try this
https://docs.retool.com/docs/data-in-tables#server-side-table-pagination


When I am using this limit offset in this query, then I am only rendering that 5 rows, and pagination is also 1, can't load to 2 pages.

Hey @ishi8 from the screenshot you sent it looks like the issue is in your "Total Row Count". You are using list_candidates.data.JobId.length, but since you are limiting your query based on table1.pageSize that value is only 5.

Instead could you create a new query for the sole purpose of returning the total row count of the table, like so:

You can then reference that query in the "Total Row Count" for the table, like this:

This should get your pagination all set up properly. If you want more information we have a great explanation of this in our docs here. Let me know if this helps!