Usage ping times out on GitLab.com

Originally from gitlab-com/organization#41 (closed).

It appears counting all the pushes in the system via the events table (Event.unscoped.code_push.count) takes longer than our configured database statement timeout (60 s) (see https://sentry.gitlap.com/gitlab/gitlabcom/issues/20383/). We have a few options:

  1. Omit that data if things take too long
  2. Disable statement timeouts for this query

Thoughts, @yorickpeterse, @ernstvn, @victorwu, @regisF?