Optimize using batch of statements