Ensured that the indexes are set on the databases correctly