Say the users
table in my MySQL DB contains a very large number of entries.
I need to go through all the users, but I want to do it only chunks at a time (i.e. using LIMIT
and OFFSET
):
SELECT * FROM users LIMIT 100 OFFSET 200
Is it possible to know the total number of users matched in the query, but only return a LIMIT number of them ?
In other words, is it possible for me to know in advance the total number of users there are, without making a separate query?