Refactor admin dashboard user listing query and add indexes to Users and SessionManager tables #1606
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Refactor SQL and add indexes to
moddb.Users
andmoddb.SessionManager
tables.Note that the
SessionManager
table is already included in the InnoDB migration so does not need to be included in the migration changes here.Motivation and Context
User reported this query taking longer than a minute resulting in a time out in the admin dashboard.
https://app.asana.com/0/807770147051221/1201757805272796/f
https://ubccr.freshdesk.com/a/tickets/29169
Tests performed
Ran original query using development database and compared output with that from the new query.
Checklist: