Actions
Bug #2982
closedNon Admin user Dashboard load is very slow with a large number of mangaged nodes
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
Actions