Added SQL batching