gitea/routers/web
Lunny Xiao 7df09e31fa
Move issue pin to an standalone table for querying performance (#33452)
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>
2025-02-17 11:28:37 -08:00
..
admin Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
auth Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
devtest Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
events Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
explore Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
feed Add pubdate for repository rss and add some tests (#33411) 2025-01-27 23:58:46 +08:00
healthcheck Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
misc Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
org Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
repo Move issue pin to an standalone table for querying performance (#33452) 2025-02-17 11:28:37 -08:00
shared Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
user Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
base.go Prepare for support performance trace (#33286) 2025-01-15 20:05:18 +00:00
githttp.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
goget.go Make git clone URL could use current signed-in user (#33091) 2025-01-07 13:17:44 +08:00
home.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
metrics.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
nodeinfo.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
passkey.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
swagger_json.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
web.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
webfinger.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00