Skip to content

Commit 39a1ffa

Browse files
committed
Remove distinct in import_issues_count
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
1 parent 29df001 commit 39a1ffa

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

app/helpers/imports_helper.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ module ImportsHelper
1414

1515
def import_issues_count
1616
vaccination_records_with_issues =
17-
policy_scope(VaccinationRecord).with_pending_changes.distinct.pluck(
18-
:patient_id
19-
)
17+
policy_scope(VaccinationRecord).with_pending_changes.pluck(:patient_id)
2018

2119
patients_with_issues = policy_scope(Patient).with_pending_changes.pluck(:id)
2220

0 commit comments

Comments
 (0)