Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(FormSchema): New indexes for form dashboard #77

Merged
merged 1 commit into from
Aug 5, 2020
Merged

Conversation

liangyuanruo
Copy link
Contributor

Problem

Slow queries in production for the dashboard page were the result of collection scans from a lack of relevant indexes on the form schema. The query logic requires that a form be loaded if the user is either an admin or collaborator.

Solution

Create two indexes for each query - admin or collaborator as advised by the Mongo Performance Advisor.

* Loading data on the form dashboard requires a collection scan
* The logic requires that a form be loaded if the user is either an admin or collaborator
* Therefore, two indexes are required to fulfil this query.
@liangyuanruo liangyuanruo merged commit 21b83da into develop Aug 5, 2020
@liangyuanruo liangyuanruo deleted the index branch August 5, 2020 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants