Actions
Bug #11358
closedtasks table needs index for type & value
Difficulty:
easy
Triaged:
Pull request:
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