Updated openstack/openstack
Project: openstack/nova  ac1e41a5b2613615e5ae16e3d9e7ef5aeb5f182c

Fixes network_get_all_by_host to use indexes

The OR in the subquery was constructed in a way that didn't allow
the fixed_ips without instances allocated to be filtered out. It
also had an unnecessary join through virtual interfaces. We have a
denormalized field for instance_uuid with an index in the fixed_ips
table that we can use. This patch removes the unnecessary join and
ads an extra filter inside the OR to reject fixed_ips without
instances. In my test with 300000 fixed ips, this reduced the query
time from about 2.5 seconds to less than 0.01 seconds.

Change-Id: I26fb0dfaf5ff64bd70c947982de4ec1728c84856
Resolves-bug: #1369009