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

Lean into django-pgviews for efficiency #510

Open
hancush opened this issue Oct 1, 2020 · 0 comments
Open

Lean into django-pgviews for efficiency #510

hancush opened this issue Oct 1, 2020 · 0 comments
Labels
performance Issues related to the efficiency of the site and its underlying infrastructure

Comments

@hancush
Copy link
Member

hancush commented Oct 1, 2020

Calculating total pay on the fly over large querysets is really inefficient. In #508 and #509, we added a materialized view containing the calculated total pay, and refactored the employer percentile queries to leverage it.

There are some outstanding ideas about configuring our view so we can interact with it via the ORM in #508 that it would be good to proceed with.

We might also consider applying this refactor to the person page, which calculates percentiles via model properties with queries that calculate total pay on the fly. (Not my finest idea, I think...)

@hancush hancush added the performance Issues related to the efficiency of the site and its underlying infrastructure label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issues related to the efficiency of the site and its underlying infrastructure
Projects
None yet
Development

No branches or pull requests

1 participant