You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# TODO: Once we're on a version of Django that supports functional indexes,
# include index on `upper((slug::text))` here.
Since Sentry is now running on Django 5.1, which supports functional indexes, and I don't see the index on Upper(slug) created anywhere in the meantime, I was wondering whether it'd be worth creating this database index to improve the performances in production.
If not, we might want to remove the TODO to clean up the code.
Solution Brainstorm
We could add the index as suggested by the TODO by declaring it at the same place:
Problem Statement
When reading through the code of the
Organization
model, I saw this oldTODO
:sentry/src/sentry/models/organization.py
Lines 215 to 219 in 6bdd7dd
Since Sentry is now running on Django 5.1, which supports functional indexes, and I don't see the index on
Upper(slug)
created anywhere in the meantime, I was wondering whether it'd be worth creating this database index to improve the performances in production.If not, we might want to remove the
TODO
to clean up the code.Solution Brainstorm
We could add the index as suggested by the
TODO
by declaring it at the same place:which would result in a migration file in the likes of:
Product Area
Other
The text was updated successfully, but these errors were encountered: