Skip to content

[#202] feat: SQL aggregation for count-based report metrics - #203

Merged
sksingh2005 merged 1 commit into
mnemosyne-systems:mainfrom
Mohamed-Alkafory:feature/count-metrics-sql
Oct 9, 2026
Merged

sksingh2005 merged 1 commit into
mnemosyne-systems:mainfrom
Mohamed-Alkafory:feature/count-metrics-sql

Conversation

@Mohamed-Alkafory

Copy link
Copy Markdown
Contributor

Summary

Closes #202

Follow-up to #192: the count-based report metrics (status, category, company, timeline, histogram) now come from SQL instead of hydrating full Ticket/Message entities in Java.

Changes

  • ReportQueryService: new GROUP BY queries for the counts, a dedicated COUNT(*) for the total, slim timeline rows, and an extended resolutionRows shared by the resolution stats and the histogram.
  • ReportService.buildReportData: removed both entity queries; builds ReportData from slim rows.
  • Same approach as Report: Collect event statistics once #192: portable native SQL, date math and timeline bucketing stay in Java. Cache, resources and PdfService are untouched.

@Mohamed-Alkafory

Copy link
Copy Markdown
Contributor Author

@sksingh2005 PTAL.

@sksingh2005 sksingh2005 added the enhancement Enhancement to an existing feature label Oct 9, 2026

@sksingh2005 sksingh2005 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM Thanks !!

@sksingh2005
sksingh2005 merged commit 998db3b into mnemosyne-systems:main Oct 9, 2026
2 checks passed
@sksingh2005

Copy link
Copy Markdown
Collaborator

Merged. Thanks for your contribution :)

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

Labels

enhancement Enhancement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report: Single-pass SQL aggregation for count-based metrics

2 participants