Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a subquery instead of a join for the assignment user filter #6582

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

marcospri
Copy link
Member

@marcospri marcospri commented Aug 21, 2024

For:

In general a subquery is better for filtering, in this case because:

  • It allows us to compose a query better, we don't have to worry about missing/duplicating a join

  • It can be faster for non-correlated subqueries (ie queries that produce the same values for all rows). This should be the case here.

  • They don't introduce duplicate rows, we can remove the distinct here.

No behaviour changes, to sanity check:

  • Launch the dashboard and list assignments in the dropdown and for one particular course.

  • Use the student drop down to filter assignments.

In general a subquery is better for filtering, in this case because:

- It allows us to compose a query better, we don't have to worry about
  missing/duplicating a join

- It can be faster for non-correlated subqueries (ie queries that
  produce the same values for all rows). This should be the case here.

- They don't introduce duplicate rows, we can remove the distinct here.
@marcospri marcospri merged commit b4e0de3 into main Aug 21, 2024
9 checks passed
@marcospri marcospri deleted the tweak-get-assignments branch August 21, 2024 15:18
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