mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Noticed a SQL in gitea.com has a bigger load. It seems both `is_pull` and `pin_order` are not indexed columns in the database. ```SQL SELECT `id`, `repo_id`, `index`, `poster_id`, `original_author`, `original_author_id`, `name`, `content`, `content_version`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `pin_order`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked`, `time_estimate` FROM `issue` WHERE (repo_id =?) AND (is_pull = 0) AND (pin_order > 0) ORDER BY pin_order ``` I came across a comment https://github.com/go-gitea/gitea/pull/24406#issuecomment-1527747296 from @delvh , which presents a more reasonable approach. Based on this, this PR will migrate all issue and pull request pin data from the `issue` table to the `issue_pin` table. This change benefits larger Gitea instances by improving scalability and performance. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> |
1 week ago | |
---|---|---|
.. | ||
actions | 1 week ago | |
setting | 1 week ago | |
activity.go | 2 months ago | |
attachment.go | 1 week ago | |
blame.go | 1 week ago | |
branch.go | 1 week ago | |
cherry_pick.go | 1 week ago | |
code_frequency.go | 1 month ago | |
commit.go | 1 week ago | |
compare.go | 1 week ago | |
contributors.go | 1 month ago | |
download.go | 1 week ago | |
editor.go | 1 week ago | |
editor_test.go | 2 months ago | |
find.go | 2 months ago | |
fork.go | 1 week ago | |
githttp.go | 1 week ago | |
githttp_test.go | 1 year ago | |
helper.go | 1 week ago | |
issue.go | 1 week ago | |
issue_comment.go | 1 week ago | |
issue_content_history.go | 1 week ago | |
issue_dependency.go | 1 week ago | |
issue_label.go | 1 week ago | |
issue_label_test.go | 1 month ago | |
issue_list.go | 1 week ago | |
issue_lock.go | 1 year ago | |
issue_new.go | 1 week ago | |
issue_page_meta.go | 2 weeks ago | |
issue_pin.go | 1 week ago | |
issue_poster.go | 1 month ago | |
issue_stopwatch.go | 1 week ago | |
issue_suggestions.go | 2 weeks ago | |
issue_test.go | 2 years ago | |
issue_timetrack.go | 1 week ago | |
issue_view.go | 1 week ago | |
issue_watch.go | 1 week ago | |
main_test.go | 1 year ago | |
middlewares.go | 1 month ago | |
migrate.go | 1 week ago | |
milestone.go | 1 week ago | |
packages.go | 1 month ago | |
patch.go | 4 weeks ago | |
projects.go | 1 week ago | |
projects_test.go | 2 months ago | |
pull.go | 1 week ago | |
pull_review.go | 1 week ago | |
pull_review_test.go | 2 months ago | |
recent_commits.go | 1 month ago | |
release.go | 1 week ago | |
release_test.go | 1 month ago | |
render.go | 1 week ago | |
repo.go | 1 week ago | |
search.go | 1 week ago | |
star.go | 3 weeks ago | |
topic.go | 1 year ago | |
transfer.go | 3 weeks ago | |
treelist.go | 1 year ago | |
view.go | 1 week ago | |
view_file.go | 1 month ago | |
view_home.go | 4 weeks ago | |
view_readme.go | 1 month ago | |
view_test.go | 2 years ago | |
watch.go | 3 weeks ago | |
webgit.go | 4 weeks ago | |
wiki.go | 1 week ago | |
wiki_test.go | 1 month ago |