Bug 1107671

Summary: Unnecessary call to FactName.maximum slows down ENC
Product: Red Hat Satellite Reporter: Bryan Kearney <bkearney>
Component: ProvisioningAssignee: Daniel Lobato Garcia <dlobatog>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: bbuckingham, cwelton, jmontleo
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/5936
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-11 12:25:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bryan Kearney 2014-06-10 12:36:53 UTC
As explained here: https://github.com/theforeman/foreman/pull/1477

The query "SELECT MAX(`fact_names`.`id`) AS maximum_id, name AS name FROM `fact_names` GROUP BY name ORDER BY fact_names.name" needs to be called only when there are facts to create. Calling it every time slows down every ENC call, especially when the fact_names table is large.

Comment 1 Bryan Kearney 2014-06-10 12:36:55 UTC
Created from redmine issue http://projects.theforeman.org/issues/5936

Comment 2 Bryan Kearney 2014-06-10 12:37:00 UTC
Upstream bug assigned to dlobatog

Comment 4 Bryan Kearney 2014-06-10 13:03:41 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/5936 has been closed

Comment 7 Bryan Kearney 2014-09-11 12:25:09 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.