Project

General

Profile

Actions

Bug #26567

closed

n+1 when listing VMs on VMware

Added by Timo Goebel almost 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - VMware
Target version:
-
Fixed in Releases:
Found in Releases:

Description

When listing VMs on a Vmware Compute Resource, we hit the db with a n+1 query.

This is done for every host:

13:28:58 rails.1 | 2019-04-09T13:28:58 [D|sql|4b127620] Host::Managed Exists (0.7ms) SELECT 1 AS one FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."compute_resource_id" = $1 AND "hosts"."uuid" = $2 LIMIT $3 "compute_resource_id", 5], ["uuid", "5004a5ec-bc04-1e1d-d91d-be832dcde7b9"], ["LIMIT", 1
13:28:58 rails.1 | 2019-04-09T13:28:58 [D|sql|4b127620] ↳ app/helpers/compute_resources_vms_helper.rb:239

Actions #1

Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/foreman/pull/6666 added
Actions #2

Updated by The Foreman Bot almost 5 years ago

  • Pull request https://github.com/theforeman/foreman/pull/6740 added
Actions #3

Updated by Tomer Brisker about 4 years ago

  • Status changed from Ready For Testing to New
Actions #4

Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
Actions #5

Updated by The Foreman Bot about 4 years ago

  • Fixed in Releases 2.1.0 added
Actions #6

Updated by Marek Hulán about 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF