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

Perf: add extra index to notification table #32395

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BoYanZh
Copy link
Contributor

@BoYanZh BoYanZh commented Oct 31, 2024

Index SQL: CREATE INDEX u_s_uu ON notification(user_id, status, updated_unix);

The naming follows action.go in the same dir.

I am unsure which version I should add SQL to the migration folder, so I have not modified it.

Fix #32390

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 31, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 31, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Oct 31, 2024
@lunny
Copy link
Member

lunny commented Oct 31, 2024

Migrations are necessary. You need add one line in migrations.go.

@lunny lunny added the performance/speed performance issues with slow downs label Oct 31, 2024
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 31, 2024
@lunny lunny added this to the 1.23.0 milestone Nov 1, 2024
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 1, 2024
@lunny lunny changed the title feat: add extra index to notification table (#32390) feat: add extra index to notification table Nov 1, 2024
@lunny lunny changed the title feat: add extra index to notification table Perf: add extra index to notification table Nov 1, 2024
@BoYanZh BoYanZh requested a review from lunny November 1, 2024 21:51
@BoYanZh BoYanZh requested a review from lunny November 2, 2024 03:13
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 2, 2024
@lunny
Copy link
Member

lunny commented Nov 6, 2024

Please resolve the conflict and I cannot push to your branch.

@BoYanZh
Copy link
Contributor Author

BoYanZh commented Nov 6, 2024

Thank you for the notice! Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/go Pull requests that update Go code modifies/migrations performance/speed performance issues with slow downs size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification page becomes very slow when the table is very large
3 participants