Project

General

Profile

Bug #26567

n+1 when listing VMs on VMware

Added by Timo Goebel over 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

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

Associated revisions

Revision 3188de3a (diff)
Added by Marek Hulán 8 months ago

Fixes #26567 - improve vm listing performance

History

#1 Updated by The Foreman Bot over 1 year ago

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

#2 Updated by The Foreman Bot over 1 year ago

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

#3 Updated by Tomer Brisker 8 months ago

  • Status changed from Ready For Testing to New

#4 Updated by The Foreman Bot 8 months ago

  • Status changed from New to Ready For Testing

#5 Updated by The Foreman Bot 8 months ago

  • Fixed in Releases 2.1.0 added

#6 Updated by Marek Hulán 8 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF