Forgejo/models/fixtures/comment.yml
Gusted 9b71369be9 [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
- Backport https://codeberg.org/forgejo/forgejo/pulls/1154
2023-07-31 10:14:30 +00:00

78 lines
1.4 KiB
YAML

-
id: 1
type: 7 # label
poster_id: 2
issue_id: 1 # in repo_id 1
label_id: 1
content: "1"
created_unix: 946684810
-
id: 2
type: 0 # comment
poster_id: 3 # user not watching (see watch.yml)
issue_id: 1 # in repo_id 1
content: "good work!"
created_unix: 946684811
updated_unix: 946684811
-
id: 3
type: 0 # comment
poster_id: 5 # user not watching (see watch.yml)
issue_id: 1 # in repo_id 1
content: "meh..."
created_unix: 946684812
updated_unix: 946684812
-
id: 4
type: 21 # code comment
poster_id: 1
issue_id: 2
content: "meh..."
review_id: 4
line: 4
tree_path: "README.md"
created_unix: 946684812
invalidated: false
-
id: 5
type: 21 # code comment
poster_id: 1
issue_id: 2
content: "meh..."
line: -4
tree_path: "README.md"
created_unix: 946684812
invalidated: false
-
id: 6
type: 21 # code comment
poster_id: 1
issue_id: 2
content: "it's already invalidated. boring..."
line: -4
tree_path: "README.md"
created_unix: 946684812
invalidated: true
-
id: 7
type: 21 # code comment
poster_id: 100
issue_id: 3
content: "a review from a deleted user"
line: -4
review_id: 10
tree_path: "README.md"
created_unix: 946684812
invalidated: true
-
id: 8
type: 0 # comment
poster_id: 15
issue_id: 17 # in repo_id 32
content: "meh..."
created_unix: 946684812
updated_unix: 946684812