Merge pull request 'Revert "Speed up loading the dashboard on mysql/mariadb (#28546)" (#29006) (#29007)' (#2279) from earl-warren/forgejo:wip-v1.21-performance into v1.21/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2279 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
commit
108c984945
1 changed files with 3 additions and 6 deletions
|
@ -448,12 +448,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)
|
||||
|
|
Loading…
Reference in a new issue