Skip to content

Feature: Query execution statistics and dashboard #38

@muk2

Description

@muk2

Summary

Add a query execution statistics dashboard that tracks and displays performance metrics across query history, helping users identify slow queries and optimize their workflow.

Motivation

Understanding query performance patterns is crucial for database optimization. While pgrsql tracks execution time per query in history, there's no aggregated view or analysis. A statistics dashboard would help users identify performance bottlenecks and track improvements over time.

Proposed Behavior

  • Stats panel: Accessible via a keyboard shortcut (e.g., Ctrl+Shift+S) or sidebar tab
  • Metrics displayed:
    • Total queries executed (session and all-time)
    • Average/median/p95 execution time
    • Slowest queries list
    • Most frequently run queries
    • Success/failure rate
    • Queries per database breakdown
  • Session metrics: Current session stats in header bar (queries run, avg time)

Acceptance Criteria

  • Statistics panel accessible via keyboard shortcut
  • Aggregated metrics computed from query history
  • Slowest queries list with execution times
  • Most frequent queries list
  • Success/failure rate display
  • Per-database breakdown
  • Session statistics in header bar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions