forgejo/models/activities
Gusted 6465b74632
[GITEA] Use join for the deleting issue actions query
- The action tables can become very large as it's a dumpster for every
action that an user does on an repository.
- The following query: `DELETE FROM action WHERE comment_id IN (SELECT id FROM comment WHERE
issue_id=?)` is not using indexes for `comment_id` and is instead using
an full table scan by MariaDB.
- Rewriting the query to use an JOIN will allow MariaDB to use the
index.
- More information: https://codeberg.org/Codeberg-Infrastructure/techstack-support/issues/9

(cherry picked from commit 6646fcf31f)

Conflicts:
	tests/integration/api_nodeinfo_test.go
	https://codeberg.org/forgejo/forgejo/pulls/1178
2023-08-01 10:19:22 +02:00
..
action.go [GITEA] Use join for the deleting issue actions query 2023-08-01 10:19:22 +02:00
action_list.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
action_test.go [GITEA] Use join for the deleting issue actions query 2023-08-01 10:19:22 +02:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
notification.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
notification_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_activity.go Add context parameter to some database functions (#26055) 2023-07-22 22:14:27 +08:00
statistic.go Use a separate admin page to show global stats, remove actions stat (#25062) 2023-06-03 22:03:41 +08:00
user_heatmap.go Localize activity heatmap (except tooltip) (#24131) 2023-04-17 14:26:01 -04:00
user_heatmap_test.go Add pagination for dashboard and user activity feeds (#22937) 2023-02-24 16:15:10 -05:00