Use transaction to improve multi update speed.