Remove COALESCE operator from statistics query

COALESCE operator slows down the Namespace.with_statistics aggregated
query.
96 jobs for ac-namespaces-stats-no-coalesce in 53 minutes and 21 seconds (queued for 10 seconds)
Status Job ID Name Coverage
  Build
manual #214239100
gitlab-org allowed to fail manual
review-docs-deploy-manual
 
  Prepare
passed #214239101
gitlab-org
compile-assets

00:10:12

passed #214239103
gitlab-org
retrieve-tests-metadata

00:02:03

passed #214239102
gitlab-org
setup-test-env

00:04:50

 
  Test
failed #214239194
docker gitlab-org
build-qa-image

00:05:16

passed #214239114
allowed to fail
code_quality

00:09:11

passed #214239196
gitlab-org
danger-review

00:01:56

passed #214239186
gitlab-org
db:check-schema-pg

00:01:51

passed #214239185
gitlab-org
db:migrate:reset-mysql

00:03:44

passed #214239184
gitlab-org
db:migrate:reset-pg

00:02:28

passed #214239190
gitlab-org
db:rollback-mysql

00:03:55

passed #214239189
gitlab-org
db:rollback-pg

00:03:05

passed #214239116
allowed to fail
dependency_scanning

00:08:44

passed #214239104
gitlab-org
docs lint

00:03:15

passed #214239182
gitlab-org
downtime_check

00:02:34

failed #214239183
gitlab-org
ee_compat_check

00:05:15

passed #214239105
gitlab-org docker
gitlab:assets:compile

00:21:00

passed #214239192
gitlab-org
gitlab:setup-mysql

00:05:08

passed #214239191
gitlab-org
gitlab:setup-pg

00:03:47

passed #214239106
gitlab-org allowed to fail
gitlab:ui:visual

00:06:44

passed #214239197
gitlab-org
gitlab_git_test

00:00:25

passed #214239108
gitlab-org
jest

00:13:11

passed #214239107
gitlab-org
karma

00:11:32

57.03%
passed #214239188
gitlab-org
migration:path-mysql

00:17:33

passed #214239187
gitlab-org
migration:path-pg

00:16:31

passed #214239198
gitlab-org
no_ee_check

00:00:25

passed #214239112
gitlab-org
qa-frontend-node:10

00:13:43

passed #214239111
gitlab-org
qa-frontend-node:8

00:14:19

failed #214239113
gitlab-org allowed to fail
qa-frontend-node:latest

00:01:52

passed #214239109
gitlab-org
qa:internal

00:03:19

passed #214239110
gitlab-org
qa:selectors

00:02:57

passed #214239195
allowed to fail manual
review-build-cng

00:24:58

passed #214239180
gitlab-org
rspec-fast-spec-helper

00:02:36

passed #214239117
gitlab-org
rspec-pg 1/50

00:40:02

passed #214239127
gitlab-org
rspec-pg 10/50

00:14:05

passed #214239128
gitlab-org
rspec-pg 11/50

00:16:08

passed #214239129
gitlab-org
rspec-pg 12/50

00:14:59

passed #214239130
gitlab-org
rspec-pg 13/50

00:13:32

passed #214239131
gitlab-org
rspec-pg 14/50

00:14:39

passed #214239132
gitlab-org
rspec-pg 15/50

00:13:25

passed #214239134
gitlab-org
rspec-pg 16/50

00:15:11

passed #214239135
gitlab-org
rspec-pg 17/50

00:12:39

passed #214239136
gitlab-org
rspec-pg 18/50

00:11:45

failed #214239137
gitlab-org
rspec-pg 19/50

00:16:38

passed #214239118
gitlab-org
rspec-pg 2/50

00:38:45

passed #214239138
gitlab-org
rspec-pg 20/50

00:14:10

passed #214239139
gitlab-org
rspec-pg 21/50

00:14:46

passed #214239141
gitlab-org
rspec-pg 22/50

00:16:34

failed #214239143
gitlab-org
rspec-pg 23/50

00:14:36

passed #214239144
gitlab-org
rspec-pg 24/50

00:13:31

passed #214239145
gitlab-org
rspec-pg 25/50

00:12:36

passed #214239146
gitlab-org
rspec-pg 26/50

00:11:30

passed #214239147
gitlab-org
rspec-pg 27/50

00:13:39

passed #214239148
gitlab-org
rspec-pg 28/50

00:12:54

passed #214239149
gitlab-org
rspec-pg 29/50

00:12:57

passed #214239119
gitlab-org
rspec-pg 3/50

00:14:26

passed #214239150
gitlab-org
rspec-pg 30/50

00:14:38

passed #214239151
gitlab-org
rspec-pg 31/50

00:16:54

passed #214239152
gitlab-org
rspec-pg 32/50

00:13:09

passed #214239153
gitlab-org
rspec-pg 33/50

00:12:35

passed #214239154
gitlab-org
rspec-pg 34/50

00:12:58

passed #214239155
gitlab-org
rspec-pg 35/50

00:13:37

passed #214239156
gitlab-org
rspec-pg 36/50

00:12:38

passed #214239157
gitlab-org
rspec-pg 37/50

00:16:14

passed #214239158
gitlab-org
rspec-pg 38/50

00:15:52

passed #214239159
gitlab-org
rspec-pg 39/50

00:16:13

passed #214239120
gitlab-org
rspec-pg 4/50

00:13:06

passed #214239161
gitlab-org
rspec-pg 40/50

00:13:35

passed #214239162
gitlab-org
rspec-pg 41/50

00:14:38

passed #214239165
gitlab-org
rspec-pg 42/50

00:13:16

passed #214239167
gitlab-org
rspec-pg 43/50

00:12:37

passed #214239169
gitlab-org
rspec-pg 44/50

00:12:53

passed #214239171
gitlab-org
rspec-pg 45/50

00:14:15

passed #214239173
gitlab-org
rspec-pg 46/50

00:14:47

passed #214239174
gitlab-org
rspec-pg 47/50

00:16:46

passed #214239176
gitlab-org
rspec-pg 48/50

00:13:48

passed #214239177
gitlab-org
rspec-pg 49/50

00:14:03

passed #214239122
gitlab-org
rspec-pg 5/50

00:12:07

passed #214239178
gitlab-org
rspec-pg 50/50

00:14:38

passed #214239123
gitlab-org
rspec-pg 6/50

00:13:07

passed #214239124
gitlab-org
rspec-pg 7/50

00:11:52

passed #214239125
gitlab-org
rspec-pg 8/50

00:14:45

passed #214239126
gitlab-org
rspec-pg 9/50

00:13:15

passed #214239115
allowed to fail
sast

00:18:52

passed #214239181
gitlab-org
static-analysis

00:23:15

 
  Review
skipped #214239200
gitlab-org allowed to fail
review-deploy
skipped #214239201
gitlab-org allowed to fail manual
review-stop
 
  Qa
skipped #214239202
allowed to fail manual
package-and-qa
skipped #214239205
docker gitlab-org allowed to fail
review-performance
skipped #214239204
docker gitlab-org allowed to fail manual
review-qa-all
skipped #214239203
docker gitlab-org allowed to fail
review-qa-smoke
 
  Post Test
skipped #214239208
gitlab-org
coverage
skipped #214239209
gitlab-org allowed to fail
flaky-examples-check
skipped #214239207
gitlab-org
jsdoc
skipped #214239206
gitlab-org
lint:javascript:report
 
  Post Cleanup
skipped #214239210
gitlab-org allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
rspec-pg 19/50 Test
              (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Linux 4.19.23-coreos-r1 x86_64)
# ./vendor/ruby/2.6.0/gems/selenium-webdriver-3.141.0/lib/
Running after script...
$ date
Fri May 17 08:38:42 UTC 2019
Uploading artifacts...
coverage/: found 5 matching files
knapsack/: found 4 matching files
rspec_flaky/: found 4 matching files
rspec_profiling/: found 1 matching files
tmp/capybara/: found 59 matching files
failed
rspec-pg 23/50 Test
knapsack/: found 4 matching files                  
rspec_flaky/: found 4 matching files

rspec_profiling/: found 1 matching files

WARNING: tmp/capybara/: no matching files
Uploading artifacts to coordinator... ok
id=214239143 responseStatus=201 Created token=8byZ2xZA
Uploading artifacts...
junit_rspec.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=214239143 responseStatus=201 Created token=8byZ2xZA
ERROR: Job failed: exit code 1
failed
build-qa-image Test
real	3m27.202s
user 0m0.197s
sys 0m0.150s
$ echo "${CI_JOB_TOKEN}" | docker login --username gitlab-ci-token --password-stdin ${CI_REGISTRY}
Error response from daemon: Get https://registry.gitlab.com/v2/: Get https://gitlab.com/jwt/auth?account=gitlab-ci-token&client_id=docker&offline_token=true&service=container_registry: net/http: request canceled (Client.Timeout exceeded while awaiting headers) (Client.Timeout exceeded while awaiting headers)
Running after script...
$ date
Fri May 17 08:26:39 UTC 2019
ERROR: Job failed: exit code 1
failed
ee_compat_check Test
    

Running after script...
$ date
Fri May 17 08:27:31 UTC 2019
Uploading artifacts...
ee_compat_check/patches/*.patch: found 1 matching files
Uploading artifacts to coordinator... ok id=214239183 responseStatus=201 Created token=DgcsZALm
ERROR: Job failed: exit code 1
failed
qa-frontend-node:latest Test
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Running after script...
$ date
Fri May 17 08:23:30 UTC 2019
ERROR: Job failed: exit code 1