improve performance of admin db queries