Batch large inserts to save on memory.