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

Use auth user model for _submitted_by field #2167

Merged
merged 3 commits into from
Nov 18, 2021

Conversation

denniswambua
Copy link
Contributor

@denniswambua denniswambua commented Nov 16, 2021

Changes / Features implemented

Queries for a form collaborators with a lot of submissions are taking like 8 mins. We can improve this if we can fetch the data from the user model.

Testing this and the result are as below

Querying using the json field took 528732.595 ms 
Querying with left join took 10016.579 ms

Steps taken to verify this change does what is intended

Tests added and tested on

Side effects of implementing this change

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #2163

@denniswambua denniswambua force-pushed the optimize_submission_stat_submitted_by branch from 8cb9875 to 6360bc0 Compare November 17, 2021 09:57
DavisRayM
DavisRayM previously approved these changes Nov 18, 2021
Copy link
Contributor

@DavisRayM DavisRayM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DavisRayM DavisRayM merged commit 254927d into master Nov 18, 2021
@DavisRayM DavisRayM deleted the optimize_submission_stat_submitted_by branch November 18, 2021 08:20
@DavisRayM DavisRayM mentioned this pull request Nov 18, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants