Batch processing and connection pool implementation