Project

General

Profile

Actions

Bug #8593

closed

N+1 query on Puppet class index, looking up class_params

Added by Dominic Cleal about 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

http://0.0.0.0:3000/puppetclasses
N+1 Query detected
  Puppetclass => [:class_params]
  Add to your finder: :include => [:class_params]
N+1 Query method call stack
  /home/dcleal/code/foreman/foreman/app/views/puppetclasses/index.html.erb:30:in `block in _app_views_puppetclasses_index_html_erb__247937742040578848_83062380'
  /home/dcleal/code/foreman/foreman/app/views/puppetclasses/index.html.erb:15:in `_app_views_puppetclasses_index_html_erb__247937742040578848_83062380'
  /home/dcleal/code/foreman/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
  /home/dcleal/code/foreman/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'

This seems to be coming from the check for whether to display the "Override all parameters" action button, which checks for overridden lookup keys.

Actions

Also available in: Atom PDF