Optimization of data gathering by using transactions better.