Skip to content

[+] enhance Query Performance Analysis pg dashboard#1375

Merged
0xgouda merged 1 commit intomasterfrom
improve-pg-query-perf-analysis-dashboard
Apr 27, 2026
Merged

[+] enhance Query Performance Analysis pg dashboard#1375
0xgouda merged 1 commit intomasterfrom
improve-pg-query-perf-analysis-dashboard

Conversation

@0xgouda
Copy link
Copy Markdown
Collaborator

@0xgouda 0xgouda commented Apr 22, 2026

  • Fix the panel queries' logic to use the sum(col - col_lag) pattern used in other dashboards instead of max(col) - min(col), which skips counting the changes between the elements at the boundaries of each time segment.
  • Fix the panel queries' logic to show the top $n for each time segment, not across the entire user-specified range.
  • Address Problem in query logic of some panels #1152 for this dashboard
  • Change the panels to have a stacked view, which is helpful for deducing the cumulative load of the top $n queries
  • Make panels display the rate per call/second instead of raw value increase (similar to prometheus rate()).

Screenshots (the updated version is hosted on the dc1 vm and is probably better to inspect it from there) :

image image image

TODO:

  • ask for review by our dbas.
  • evaluate how slow the new queries might be on full 2-weeks data, for both timescaledb and vanilla postgresql setups.

@0xgouda 0xgouda self-assigned this Apr 22, 2026
@0xgouda 0xgouda added the dashboards Grafana dashboards related label Apr 22, 2026
@0xgouda 0xgouda requested a review from pashagolub April 22, 2026 22:24
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 22, 2026

Coverage Report for CI Build 24842665207

Coverage decreased (-0.2%) to 83.333%

Details

  • Coverage decreased (-0.2%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 8 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

8 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
internal/sinks/prometheus.go 8 93.95%

Coverage Stats

Coverage Status
Relevant Lines: 5322
Covered Lines: 4435
Line Coverage: 83.33%
Coverage Strength: 0.95 hits per line

💛 - Coveralls

@0xgouda 0xgouda force-pushed the improve-pg-query-perf-analysis-dashboard branch from 404ebea to 69b3944 Compare April 23, 2026 15:04
Copy link
Copy Markdown
Collaborator

@pashagolub pashagolub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@0xgouda 0xgouda merged commit 4e57a9b into master Apr 27, 2026
9 checks passed
@0xgouda 0xgouda deleted the improve-pg-query-perf-analysis-dashboard branch April 27, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboards Grafana dashboards related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants