#291 Major speed up by using a single transaction