mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Divide GetIssueStats query in smaller chunks (#10176)
* Divide GetIssueStats query in smaller chunks * Skip chunking if count is low enough * Fix lint * Define maxQueryParameters * Remove absMaxQueryParameters because of lint * Restart CI * Restart CI Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
7e920703f9
commit
15614a8368
2 changed files with 36 additions and 0 deletions
|
@ -48,6 +48,12 @@ type Engine interface {
|
|||
SumInt(bean interface{}, columnName string) (res int64, err error)
|
||||
}
|
||||
|
||||
const (
|
||||
// When queries are broken down in parts because of the number
|
||||
// of parameters, attempt to break by this amount
|
||||
maxQueryParameters = 300
|
||||
)
|
||||
|
||||
var (
|
||||
x *xorm.Engine
|
||||
tables []interface{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue