User management doing unnecessary joins
The count query is joining session and usergroups table unnecessarily. There are other queries in user management that could also use further optimization.
#2 Updated by krileon over 1 year ago
- % Done changed from 0 to 30
Appears to just be the unnecessary client id filter being applied to the _sessions join as it's causing a nested loop since it's using IN. Removing it significantly improves the query performance as it's no longer a nested loop and can utilize its index. The filter isn't necessary either.