Fixed a *huge* drag on the database