Say the table usersin my MySQL database contains a very large number of records.
I need to go through all the users, but I want to do this only chunks at a time (i.e. using LIMITand OFFSET):
SELECT * FROM users LIMIT 100 OFFSET 200
Is it possible to find out the total number of users matched in the request, but only return their number?
In other words, is it possible for me to know in advance the total number of users without creating a separate request?
source
share