In MySQL, what's the most efficient way to query an entire table in chunks?
OFFSET is very bad.  Instead of processing the data in Order(N) time, it will take Order(N*N).  This is because of the effort to skip past the "offset" rows.

Instead "remember where you left off".  I go into details about such in these two blogs:


Pagination via OFFSET is bad:  http://mysql.rjweb.org/doc.php/pagination (It gives details on "left off" as a good alternative)
How to delete lots of rows via chunking:  http://mysql.rjweb.org/doc.php/deletebig . You need to adapt it from DELETE to what you are doing.  It also gives tips on how to walk through the PRIMARY KEY to efficiently discover the next 'chunk'.


These tips apply to all versions of MySQL.