diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-08-04 15:40:33 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-08-07 12:38:27 +0200 |
commit | f77fda6437bfeb946510abdf5c56872af392f624 (patch) | |
tree | 247834fbb53527e37e8948c1bf001f3c69d0307a /changelogs | |
parent | 81933cfdd3e23d24ae18c0d2f5452ecd9690ab63 (diff) | |
download | gitlab-ce-f77fda6437bfeb946510abdf5c56872af392f624.tar.gz |
Improve checking if projects would be returned
In various places we check if the same relation would return projects.
This is done using "any?" which will run a COUNT query with any
LIMIT/OFFSET values still applied.
To work around all this we introduce 2 helper methods that take care of
doing the right thing. This leads to the produced queries being simpler
and fewer queries being executed.
Diffstat (limited to 'changelogs')
-rw-r--r-- | changelogs/unreleased/dont-use-limit-offset-when-counting-projects.yml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/changelogs/unreleased/dont-use-limit-offset-when-counting-projects.yml b/changelogs/unreleased/dont-use-limit-offset-when-counting-projects.yml new file mode 100644 index 00000000000..8ecea635ce5 --- /dev/null +++ b/changelogs/unreleased/dont-use-limit-offset-when-counting-projects.yml @@ -0,0 +1,4 @@ +--- +title: "Improve performance of checking for projects on the projects dashboard" +merge_request: +author: |