I'm just ruin into this issue, I need to select good amount of rows, to perform certain operation on that, of course I don't need them at once, I can afford a delay of 1-2 seconds in between, I approached PHP loop by following below method.
$last_id=0;
for($i=1;$i<20;$i++)
{
Mysql_query...... WHERE id>last_id;
$last_id=$TablerowID;
}
I'm having 1 million rows in this table, but I dont feel its a good approach mysql is not returning data in proper id incremented form, it also sometimes return 1 & leaving 50 jump to 100 then after 100 it return 50 etc which will skip some rows or create other issues in this function.
I don't want order by id as its also decreasing performance a lot & I can't compromise on performance.
Please your suggestions ?