Hello everyone, I am encountering a problem with Retool in the app view. I have created a table which we'll refer to as "table1".
I populate this table using a Firestore Query on a collection we'll call "collection1".
I have set up 3 GUI inputs:
IsXxx == true
IsXxx == true
Date >= 20230901
Even when I set a limit of 20 rows, once the query is executed, Retool becomes unresponsive and everything is extremely slow.
Problem 2: I should not limit the query because I need all the items that occurred from 20230901 onwards.
I attempted to add server-side pagination as I believed this is the action required to run the query without a limit, but I failed to configure it correctly.
Usually, the results should not exceed 3000 rows.
Thank you for your assistance.
For more context here is a screen from my app view with the query and my failed server-side pagination
Hey @Alanc! With Firestore you'll want to use
Cursor based pagination.
Set the pagination type on the table and get the
Next cursor which is the last row of the current table data:
Set up your query to have a limit that is equal to the current table page size,
Order by whichever column you are using as your cursor and start the next query at that cursor.
This should allow you to use the table pagination buttons to get the subsequent data
Hello, thank's for your answer! now i have that problem:
And when i modify the order by with "dateTeletransmited", the query works but
the result is only the 1st page of the table, when i clic on page 2, there is the same data and no page 3, there is at least 2000 rows on that query normally.
Thank you for your answer!
Can you share the
WHERE clause of the query? Also, if you switch the
Order by to
dateTeletransmitted, you also need to switch the
Next cursor on your table settings.