Revert "Possibly some minor improvements to db performance."

This reverts commit e87b6b2102573ffd576cfa70e36a0bf37056ef32.