Use QuerySet.alias for values that do not need to be returned
While looking at the Django 5.2.1 release notes for #1905 (closed), I learnt about QuerySet.alias(), a method that does the same thing as .annotate() but without requiring the new column to be returned in the SELECT statement. This can be a performance boost in some cases.
This behemoth of a comment includes the hack that we have used in the past: build the annotation, use it, then overwrite it with a constant value (.annotate(has_elements=Value(False))). That hack decreased a query's execution time by 10%.
We do not have that query anymore though, so this MR does not do that much of a change for now.