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

Fix inefficiency when searching accounts per username in admin interface #23801

Merged

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Feb 22, 2023

The query did a seq scan on the accounts table, it should now use the existing index correctly, performing a much faster index scan.

I used SQL strings rather than Arel because I believe it to be more readable and easier to check that it does indeed match the index definition.

@Gargron Gargron merged commit f682478 into mastodon:main Feb 22, 2023
btrd pushed a commit to btrd/mastodon that referenced this pull request Feb 22, 2023
ClearlyClaire added a commit to ClearlyClaire/mastodon that referenced this pull request Mar 14, 2023
noellabo pushed a commit to fedibird/mastodon that referenced this pull request Mar 17, 2023
Roboron3042 pushed a commit to Roboron3042/mastodon that referenced this pull request Apr 16, 2023
noellabo pushed a commit to fedibird/mastodon that referenced this pull request Apr 22, 2023
skerit pushed a commit to 11ways/mastodon that referenced this pull request Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants