Actions
Bug #7430
closedUser management doing unnecessary joins
Description
The count query is joining session and usergroups table unnecessarily. There are other queries in user management that could also use further optimization.
Actions
Added by krileon almost 7 years ago. Updated over 6 years ago.
Description
The count query is joining session and usergroups table unnecessarily. There are other queries in user management that could also use further optimization.
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.
session and usergroup_map join still slowing significantly (around 400ms on a 100k user table) when they aren't being filtered (so there's no reason to join them).
Fixed in MR !1449