Project

General

Profile

Actions

Bug #7430

closed

User management doing unnecessary joins

Bug #7430: User management doing unnecessary joins

Added by krileon almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
21 January 2019
Due date:
% Done:

100%

Estimated time:

Description

The count query is joining session and usergroups table unnecessarily. There are other queries in user management that could also use further optimization.

Updated by krileon almost 7 years ago Actions #2

  • % 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.

Updated by krileon almost 7 years ago Actions #3

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).

Updated by krileon almost 7 years ago Actions #4

  • Status changed from Assigned to Resolved
  • % Done changed from 30 to 100

Fixed in MR !1449

Updated by beat almost 7 years ago Actions #5

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom