Project

General

Profile

Actions

Bug #26504

closed

Search Hosts by owner = current_user is very inefficient

Added by Timo Goebel about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When a user is a member of four groups and the groups each have a role that allows view_hosts access with a "owner = current_user" search condition, page loading is very slow.
For every group the user leaves, the requests get faster.

This gist contains a request log from api/hosts/redacted.example.com.

https://gist.github.com/timogoebel/91bc1b6af28a1a6cdb598d713c3dc264/raw/0c33d1e7d8c379f52ca958641472828bcc6113a4/api-cleaned-sql.txt

The (very simple) request took 30 seconds to be generated.

Actions

Also available in: Atom PDF