diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-02-01 14:25:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 14:25:37 +0800 |
commit | 3a667621306216b1724ba1a9b23d61a4f7aff50d (patch) | |
tree | 8b590f6912e3235f46a12c3578843d2f63bb702c /models | |
parent | a1e0d8bd8bf3ad747673496c4059ec8ed42c9128 (diff) | |
download | gitea-3a667621306216b1724ba1a9b23d61a4f7aff50d.tar.gz gitea-3a667621306216b1724ba1a9b23d61a4f7aff50d.zip |
Revert "Speed up loading the dashboard on mysql/mariadb (#28546)" (#29006)
This reverts commit fa8c3beb26acfcc7e732038c947225857ebcbf31. #28546
Because it seems performance become worse.
Diffstat (limited to 'models')
-rw-r--r-- | models/activities/action.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/models/activities/action.go b/models/activities/action.go index c9745e4a8a..15bd9a52ac 100644 --- a/models/activities/action.go +++ b/models/activities/action.go @@ -446,12 +446,9 @@ func GetFeeds(ctx context.Context, opts GetFeedsOptions) (ActionList, int64, err return nil, 0, err } - sess := db.GetEngine(ctx).Where(cond) - if setting.Database.Type.IsMySQL() { - sess = sess.IndexHint("USE", "JOIN", "IDX_action_c_u_d") - } - sess = sess.Select("`action`.*"). // this line will avoid select other joined table's columns - Join("INNER", "repository", "`repository`.id = `action`.repo_id") + sess := db.GetEngine(ctx).Where(cond). + Select("`action`.*"). // this line will avoid select other joined table's columns + Join("INNER", "repository", "`repository`.id = `action`.repo_id") opts.SetDefaultValues() sess = db.SetSessionPagination(sess, &opts) |