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: caching improvements for stats endpoints #420

Merged
merged 11 commits into from
Jun 10, 2024
Merged

Conversation

tazlin
Copy link
Member

@tazlin tazlin commented Jun 10, 2024

Being victims of our own success, the increase in the size of the stats tables has led to the /stats/* endpoints becoming slower and slower over time. To remedy this, I've introduced some new tables, new stored procedures, and pg_cron into the mix so these endpoints are always precomputed and that the backends have fewer long-running threads. See the sql_statements/README.md for some additional information.

This also creates the known_image_models table which is populated with the entries from the model reference. This serves to allow us to one day refactor the model_reference shared module object out in preference for this table.

@tazlin tazlin added the allow-ci A PR with this label will run through CI. label Jun 10, 2024
@tazlin tazlin changed the title Caching improvements feat: caching improvements Jun 10, 2024
@tazlin tazlin changed the title feat: caching improvements feat: caching improvements for stats endpoints Jun 10, 2024
@tazlin tazlin merged commit 4072a48 into main Jun 10, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
allow-ci A PR with this label will run through CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant