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

[v1.0.0b] [Task] - Improve indexes on database #2077

Closed
fleshgolem opened this issue Jan 29, 2023 · 0 comments · Fixed by #2104
Closed

[v1.0.0b] [Task] - Improve indexes on database #2077

fleshgolem opened this issue Jan 29, 2023 · 0 comments · Fixed by #2104
Labels
task General Task that needs to be completed v1 Version 1 Issue/PR

Comments

@fleshgolem
Copy link
Contributor

What is the problem this task addresses?

This is a bit of a followup to #2076
While that one turned out to not really be an issue with the current beta, I still realized that the indexing on the database is less than ideal, which definitely could lead to performance degradation in larger setups
Some cases I could find rather quickly, that were not indexed at all:

  • Recipe.name and created_at, these are pretty surely the fields that are most commonly ordered by
  • A lot of foreign keys that do get used for joins, e.g. everything on the recipe_to_* tables or recipe_ingredient.recipe_id

Proposed/Possible Solution(s)?

I'm not super aware of all the inner workings to know which other places they should be added, but i guess it should at least be those two recipe fields and all foreign keys (i dont really see much of a reason to not ever have them there)
I can do the work on that, but i'd rather wait for feedback on #2070 so i dont have to do it twice

@fleshgolem fleshgolem added task General Task that needs to be completed v1 Version 1 Issue/PR labels Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task General Task that needs to be completed v1 Version 1 Issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant