Actions
Bug #26567
closedn+1 when listing VMs on VMware
Difficulty:
Triaged:
No
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
Updated by The Foreman Bot over 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
Updated by The Foreman Bot over 5 years ago
- Pull request https://github.com/theforeman/foreman/pull/6740 added
Updated by Tomer Brisker almost 5 years ago
- Status changed from Ready For Testing to New
Updated by The Foreman Bot almost 5 years ago
- Status changed from New to Ready For Testing
Updated by Marek Hulán almost 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 3188de3a156347a89a6a9dd6014d6424f9e0b4a7.
Actions