optimized the batching with vector insert