insert_in_batches without threads