Project

General

Profile

Actions

Bug #11358

closed

tasks table needs index for type & value

Added by Justin Sherrill over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

calling ForemanTasks::Task::DynflowTask.for_action queries the tasks table by label and type which is very very slow on systems with a lot of tasks. One such user has ~140,000 tasks and when hitting an api that uses this query and joins with the locks table the query was very slow.

In this customer's case without this index the api was taking ~1.3 minutes, with this index it dropped to 10 seconds.

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1253802

Actions

Also available in: Atom PDF