debian-mirror-gitlab/.gitlab/issue_templates/Query Performance Investigation.md
2021-04-29 21:17:54 +05:30

2.2 KiB

Description

As the name implies, the purpose of the template is to detail underperforming queries for further investigation.

Steps

  • Rename the issue to - Query Performance Investigation - [Query Snippet | Table info]
    • For example - Query Performance Investigation - SELECT "namespaces".* FROM "namespaces" WHERE "namespaces"."id" = $1 LIMIT $2
  • Provide information in the Requested Data Points table
  • Provide priority and severity labels
  • If this requires immediate attention cc @gitlab-org/database-team and reach out in the #g_database slack channel

SQL Statement


Data from Elastic

Instructions on collecting data from PostgreSQL slow logs stored in Elasticsearch

Requested Data points

Please provide as many of these fields as possible when submitting a query performance report.

  • Queries per second (on average or peak)
  • Number of calls per second and relative to total number of calls
  • Query timings (on average or peak)
  • Database time relative to total database time
  • Source of calls (Sidekiq, WebAPI, etc)
  • Query ID
  • Query Plan
  • Query Example
  • Total number of calls (relative)
  • % of Total time

/label ~"group::database" ~"database::triage"