Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 50,598
    • Issues 50,598
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,553
    • Merge requests 1,553
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #292900
Closed
Open
Issue created Dec 11, 2020 by Jose Finotto@FinottoDeveloper

Select statements that are in execution during database CPU utilization peak times - licenses table

After investigating spikes over 70% of CPU usage on the database here:

Link to reports/investigations

we find out this statement being executed thousands of times:

Query
SELECT "licenses".* FROM "licenses" ORDER BY "licenses"."id" DESC LIMIT $1

Could be possible creating or improving our caching on those tables? Could we have a unified cache to query, and when we execute updates on it, we could refresh the cache?

Metrics

Collected from https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/snippets/2047044

Metric Measurement
Total number of calls
% of Total time
TPS
Duration
Edited Dec 17, 2020 by Craig Gomes
Assignee
Assign to
Time tracking