I know this is old, but I have not seen a similar answer, so this is a solution that I would use.
First, I would execute a count query on a table to find out how many records exist. This request is fast, and usually the execution time is short. Something like:
SELECT COUNT(*) FROM table_name;
Then I would build my query using the result that I got from count, as my limit (since this is the maximum number of rows that can be returned in the table). Something like:
SELECT * FROM table_name LIMIT count_result OFFSET desired_offset;
Or maybe something like:
SELECT * FROM table_name LIMIT desired_offset, count_result;
Of course, if necessary, you can subtract the desired execution from count_result to get the actual exact value for the feed as the limit. Passing the value "18446744073709551610" simply does not make sense if I can actually determine the appropriate limit for the provision.
Baron Von Sparklefarts Jan 29 '14 at 5:42 on 2014-01-29 17:42
source share