full code review

1000 would be more appropriate. The current value might cause some slave lag due to having too many rows at once.