Actions
Refactor #25053
closedRun expensive db_facts query just once and unordered
Difficulty:
Triaged:
No
Description
It looks like this query is very expensive on MySQL: host.fact_values.where(:fact_name => fact_names.values).reorder('')
We call it twice currently while it is not needed to run this query twice, we can fetch the list of fact value IDs stored in database in update step and prepare list of facts to be added in the next step in advance.
Also we order the query by ID for some reason, we can process them unordered just fine.
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6093 added
Updated by The Foreman Bot about 6 years ago
- Pull request https://github.com/theforeman/foreman/pull/6108 added
Updated by The Foreman Bot about 6 years ago
- Pull request https://github.com/theforeman/foreman/pull/6130 added
Updated by Tomer Brisker about 6 years ago
- Pull request deleted (
https://github.com/theforeman/foreman/pull/6108) - Fixed in Releases 1.20.0 added
Updated by Lukas Zapletal about 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset ce5bf100406c691769ba5dcbb55726b9386fe379.
Updated by Tomer Brisker almost 6 years ago
- Related to Bug #25923: Puppet fact processing failed for hosts with large number of LUNs attached added
Actions