Bug #2982

Non Admin user Dashboard load is very slow with a large number of mangaged nodes

Added by Chuck Schweizer almost 5 years ago. Updated 7 days ago.

Status:Resolved
Priority:Normal
Assignee:Dmitri Dolguikh
Category:Database
Target version:1.3.1
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link: Found in Releases:
Pull request:

Description

This is on Foreman 1.2.1

A non admin user takes a very long time to load the Dashboard page if they have many nodes. In this instance there were 18,700 nodes returned. The following is the query most/all of the time is spent on. Possibly this should be a join or something more efficient than an IN list.

Report Load (181884.5ms)  SELECT "reports".* FROM "reports" WHERE "reports"."host_id" IN (15632, 1364, 6679, 12390, 7214, 1387, 8102, 10022, 14954, 782, 9807, 16707, 19704, 14674, 9565, 10311, 2396, 638, 8698, 10085, 278, 371, 16729, 586, 642,
<-----cut ------>
12460, 1717, 10215, 10568, 10469, 9631, 5912, 2390, 2434, 11247, 5749, 5275, 15752, 8620, 59, 7299, 7696, 6026, 8782, 11067, 13031, 8884, 18279, 10776, 19298, 19214, 17388, 294, 2033, 3398) AND (status != 0) AND (("reports"."reported_at" >= '2013-08-22')) ORDER BY "reports"."reported_at" DESC NULLS LAST LIMIT 6

Related issues

Related to Foreman - Bug #5841: Foreman dashboard slow in 1.5 for non admin users Closed 05/20/2014
Blocked by Foreman - Bug #3122: when fact filters are added to a user, error column refer... Closed 09/19/2013

History

#1 Updated by Chuck Schweizer over 4 years ago

Confirmed this is still an issue on 1.3

#2 Updated by Dominic Cleal over 4 years ago

  • Category set to Database

#3 Updated by Dominic Cleal over 4 years ago

  • Blocked by Bug #3122: when fact filters are added to a user, error column reference "id" is ambiguous for dashboard and fact_values added

#4 Updated by Dominic Cleal over 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Dmitri Dolguikh
  • Target version set to 1.15.0
  • % Done changed from 0 to 100
  • Legacy Backlogs Release (now unused) set to 1

Happened to be fixed by #3122.

#5 Updated by Dominic Cleal about 4 years ago

  • Related to Bug #5841: Foreman dashboard slow in 1.5 for non admin users added

Also available in: Atom PDF