batch Metrics updates in transaction of 1000 records at a time to reduce db load