Demonstrates the wrong and right way to query through all the rows in a MySQL table in batches