use transactions to accelerate insertion sql requests