Backport #29006 by @lunny This reverts commit fa8c3beb26acfcc7e732038c947225857ebcbf31. #28546 Because it seems performance become worse. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
c398c25b18
commit
a0b9bd2feb
|
@ -446,11 +446,8 @@ func GetFeeds(ctx context.Context, opts GetFeedsOptions) (ActionList, int64, err
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
sess := db.GetEngine(ctx).Where(cond)
|
sess := db.GetEngine(ctx).Where(cond).
|
||||||
if setting.Database.Type.IsMySQL() {
|
Select("`action`.*"). // this line will avoid select other joined table's columns
|
||||||
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")
|
Join("INNER", "repository", "`repository`.id = `action`.repo_id")
|
||||||
|
|
||||||
opts.SetDefaultValues()
|
opts.SetDefaultValues()
|
||||||
|
|
Loading…
Reference in New Issue