Repository navigation
Commit 61e96c5
fix(dashboards): join pull_request_commits on full PK in PR Details panel
The "2. PR Details" panel on the DORA Details - Lead Time for Changes
dashboard joined pull_request_commits on commit_sha alone. Since
pull_request_commits' primary key is (commit_sha, pull_request_id), a
commit shared across multiple PRs (e.g. cherry-picks) causes this join
to fan out to multiple rows, forcing a DISTINCT over a larger result
set and contributing to the slow/504 query reported for this panel.
Add the pull_request_id = pr.id predicate so the join goes through the
full primary key instead of just its leading column, restoring a
one-row-per-PR lookup for both the MySQL and PostgreSQL dashboards.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 3856a46 commit 61e96c5
2 files changed
Lines changed: 2 additions & 2 deletions
File tree
- grafana/dashboards
- mysql
- postgresql
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
| |||
0 commit comments