Skip to content

Conversation

thomasleese
Copy link
Contributor

This WHERE clause is used on each page to render the count of import issues in the navigation bar, therefore we should try and speed up this query as it will have an impact on every page render. Adding an index on this filter should ensure that selecting the number of patients or vaccination records with import issues is quicker.

Jira Issue - MAV-2001

@thomasleese thomasleese added this to the v4.3.0 milestone Sep 16, 2025
@thomasleese thomasleese requested a review from a team as a code owner September 16, 2025 07:58
@thomasleese thomasleese added the performance Improving performance label Sep 16, 2025
@thomasleese thomasleese modified the milestones: v4.3.0, v4.2.1 Sep 16, 2025
@thomasleese thomasleese force-pushed the pending-changes-index branch 2 times, most recently from a3dff9e to 6d317e8 Compare September 16, 2025 09:42
This `WHERE` clause is used on each page to render the count of import
issues in the navigation bar, therefore we should try and speed up this
query as it will have an impact on every page render. Adding an index on
this filter should ensure that selecting the number of patients or
vaccination records with import issues is quicker.

Jira-Issue: MAV-2001
We make a call to `uniq` later on in the method so there's no need to
select on distinct entries here, which should slightly improve the
performance of the query, the downside being an increase in memory
usage.

Jira-Issue: MAV-2001
Copy link

@thomasleese thomasleese merged commit 75a8e43 into next Sep 16, 2025
13 checks passed
@thomasleese thomasleese deleted the pending-changes-index branch September 16, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Improving performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants