Fixes #4890 * Optimized listing labels query by refactoring correlated subquery. * Optimized aggregate that counts host's labels to executed once, and skip the join to hosts entirely when the team filter allows all hosts.
2 lines
242 B
Plaintext
2 lines
242 B
Plaintext
- Improved the performance of listing labels with host counts by aggregating membership counts in a single pass instead of a per-label subquery, and skipping the unnecessary join to the hosts table when the requesting user can see all hosts.
|