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

Revert "Remove unneeded DISTINCT from list short URLs query" #2118

Merged
merged 1 commit into from
May 9, 2024

Conversation

acelaya
Copy link
Member

@acelaya acelaya commented May 9, 2024

Reverts #2117

The DISTINCT is actually needed, but there's no test covering the combination in which it is.

When filtering short URLs by tags or by search term, the query needs to join with the tags table, in which case the results are not correct without the DISTINCT.

The right fix here would be something in the lines of:

  1. Dynamically add DISTINCT only when strictly needed, to reduce the performance impact in some cases at least.
  2. Change the way filtering by tag or by search term works. Perhaps using a subquery would work here, but that can introduce its own performance issues and also needs to be tested.

A test covering this case needs to be added.

@acelaya acelaya merged commit added21 into develop May 9, 2024
21 checks passed
@acelaya acelaya deleted the revert-2117-feature/superfluous-distinct branch May 9, 2024 08:00
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.

1 participant