I have a basic view that displays published article teasers. The view has a contextual filter on the article content type's tags field, e.g. field_tags. The contextual filter is configured to accept multiple ids, e.g. 1+2+3 for OR.
When I pass 1+2+3
for the contextual filter's value, if an article has more than one of the passed values in field_tags, the article appears multiple times in the results.
I can easily remove the duplicate results by checking the Advanced > Query settings > Distinct checkbox. However, there's a warning with this checkbox stating that it may slow down the query:
This will make the view display only distinct items. If there are multiple identical items, each will be displayed only once. You can use this to try and remove duplicates from a view, though it does not always work. Note that this can slow queries down, so use it with caution.
Alternatively, I can remove duplicate results by enabling Advanced > Use aggregation. This option doesn't have a warning about performance, but I imagine it must also slow down my query.
Both methods are effective for removing duplicate results from my view. With this simple view, I don't expect any performance issues, but:
What's the difference between Advanced > Use aggregation vs Advanced > Query settings > Distinct to remove duplicates? Which is more performant?