8 ms·
Regarding the second issue brought up, that you will get duplicate or missing rows when the database changes between pages, I addressed this in one of my apps b
by ptx 7y ago
Regarding the second issue brought up, that you will get duplicate or missing rows when the database changes between pages, I addressed this in one of my apps by
1) initially issuing a query that selects only record IDs for all the records and sends them to the client;
2) when displaying a particular page, issuing a query for the actual data "... WHERE id IN (..., ...)" with IDs taken from a slice of the client-side array.
It seemed to work OK, but this was on a very small scale. I guess one disadvantage is that you have run two queries for the initial page. And you have to transfer this array of IDs which might be a problem with many millions of rows.