Query Performance Investigation - 4458344713234267000 - SELECT "merge_requests".* FROM "merge_requests" WHERE "merge_requests"."target_project_id" = $1 AND ("merge_requests"."state_id" IN ($2)) ...
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
- For example -
-
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
SELECT "merge_requests".* FROM
"merge_requests" WHERE "merge_requests"."target_project_id"
= $1 AND ("merge_requests"."state_id"
IN ($2)) ORDER BY "merge_requests"."created_at"
DESC, "merge_requests"."id" DESC
LIMIT $3 OFFSET $4
Data from Elastic
Instructions on collecting data from PostgreSQL slow logs stored in Elasticsearch
Requested Data points
Edited by Kerri Miller