Refactor #5936

Unnecessary call to FactName.maximum slows down ENC

Added by Daniel Lobato Garcia over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Daniel Lobato Garcia
Category:External Nodes
Target version:Sprint 24
Difficulty: Bugzilla link:1107671
Found in release: Pull request:
Story points-
Velocity based estimate-
Release1.5.1Release relationshipAuto

Description

As explained here: https://github.com/theforeman/foreman/pull/1477

The query "SELECT MAX 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.

History

#1 Updated by Dominic Cleal over 3 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100
  • Release set to 1.5.1

#2 Updated by Bryan Kearney over 3 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1107671

Also available in: Atom PDF