Skip to content

TD-7640-Optimised stored procedure usp_GetSelfAssessmentReport - #3738

Merged
rshrirohit merged 2 commits into
DLS-Release-v1.3.3from
Develop/feature/TD-7640-usp_GetSelfAssessmentReport-Optimisation
Aug 21, 2026
Merged

TD-7640-Optimised stored procedure usp_GetSelfAssessmentReport#3738
rshrirohit merged 2 commits into
DLS-Release-v1.3.3from
Develop/feature/TD-7640-usp_GetSelfAssessmentReport-Optimisation

Conversation

@Auldrin-Possa

@Auldrin-Possa Auldrin-Possa commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

JIRA link

TD-7640

Description

  1. Aggregates assessment results before joining to report rows.
  2. Aggregates supervisor verification data separately.
  3. Removes unnecessary GROUP BY and row multiplication.
  4. Uses clustered indexes on temporary-table join keys.
  5. Replaces centre joins with an EXISTS check.
  6. Removes the unused SupervisorDelegates join.
  7. Preserves existing output columns and filtering logic.

Local environment test ( SSMS)
Old stored procedure : CPU time 23580ms, elapsed time 5259ms
Optimised stored procedure : CPU time 219ms elapsed time 434ms
Confirmed that rows return are same in both the stored procedure execution.

Screenshots

N/A


Developer checks

I have:

  • Run the IDE auto formatter on all files I’ve worked on and made sure there are no IDE errors relating to them
  • Written or updated tests for the changes (accessibility ui tests for views, tests for controller, data services, services, view models created or modified) and made sure all tests are passing
  • Manually tested my work with and without JavaScript (adding notes where functionality requires JavaScript)
  • Tested any Views or partials created or changed with Wave Chrome plugin. Addressed any valid accessibility issues and documented any invalid errors
  • Updated my Jira ticket with testing notes, including information about other parts of the system that were touched as part of the MR and need to be tested to ensure nothing is broken
  • Scanned over my pull request in GitHub and addressed any warnings from the GitHub Build and Test checks in the GitHub PR ‘Files Changed’ tab
    Either:
  • Documented my work in Confluence, updating any business rules applied or modified. Updated GitHub readme/documentation for the repository if appropriate. List of documentation links added/changed:
  • Confirmed that none of the work that I have undertaken requires any updates to documentation

@Auldrin-Possa
Auldrin-Possa marked this pull request as ready for review August 12, 2026 15:52
@rshrirohit
rshrirohit merged commit 325cc9b into DLS-Release-v1.3.3 Aug 21, 2026
3 checks passed
@rshrirohit
rshrirohit deleted the Develop/feature/TD-7640-usp_GetSelfAssessmentReport-Optimisation branch August 21, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants