Skip to content

Commit a0b9bd2

Browse files
GiteaBotlunny
andauthored
Revert "Speed up loading the dashboard on mysql/mariadb (#28546)" (#29006) (#29007)
Backport #29006 by @lunny This reverts commit fa8c3be. #28546 Because it seems performance become worse. Co-authored-by: Lunny Xiao <[email protected]>
1 parent c398c25 commit a0b9bd2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

models/activities/action.go

+3-6
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,9 @@ func GetFeeds(ctx context.Context, opts GetFeedsOptions) (ActionList, int64, err
446446
return nil, 0, err
447447
}
448448

449-
sess := db.GetEngine(ctx).Where(cond)
450-
if setting.Database.Type.IsMySQL() {
451-
sess = sess.IndexHint("USE", "JOIN", "IDX_action_c_u_d")
452-
}
453-
sess = sess.Select("`action`.*"). // this line will avoid select other joined table's columns
454-
Join("INNER", "repository", "`repository`.id = `action`.repo_id")
449+
sess := db.GetEngine(ctx).Where(cond).
450+
Select("`action`.*"). // this line will avoid select other joined table's columns
451+
Join("INNER", "repository", "`repository`.id = `action`.repo_id")
455452

456453
opts.SetDefaultValues()
457454
sess = db.SetSessionPagination(sess, &opts)

0 commit comments

Comments
 (0)