insert data in batches