Skip to content

feat(database): Implement Automated Slow Query Logging and Weekly Digest Report #583

Description

@Dydex

Rationale & Scope

Surface database performance regressions proactively by logging queries exceeding a duration threshold and rolling them up into a weekly digest for the team, instead of relying on ad-hoc complaints.

Concrete Tasks

  • Enable Postgres slow query logging above a configurable duration threshold.
  • Build a scheduled job aggregating the past week's slow queries by frequency and average duration.
  • Deliver the digest report via email/Slack with the top offending query patterns.

Acceptance Criteria

  • Queries exceeding the threshold are consistently captured in the slow query log.
  • The weekly digest accurately ranks the top slow query patterns by frequency and duration.

Suggested Branch Name

git checkout -b feat/database-slow-query-digest

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions