The _select_ips_for_remote_group method was joining the
IP allocation, port, allowed address pair, and security group tables
together in a single query. Additionally, it was loading all of
the port columns and using none of them. This resulted in a
very expensive query with no benefit.
This patch eliminates the unnecessary use of the port table by joining
the IP allocation table directly to the security groups and allowed
address pairs tables. In local testing of the method, this sped it up
by an order of magnitude.
Reviewed: https:/ /review. openstack. org/123997 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=04df85b6e5a 098f8f55bb82f04 d9769763beb487
Committed: https:/
Submitter: Jenkins
Branch: master
commit 04df85b6e5a098f 8f55bb82f04d976 9763beb487
Author: Kevin Benton <email address hidden>
Date: Wed Sep 24 05:23:32 2014 -0700
Improve performance of security group DB query
The _select_ ips_for_ remote_ group method was joining the
IP allocation, port, allowed address pair, and security group tables
together in a single query. Additionally, it was loading all of
the port columns and using none of them. This resulted in a
very expensive query with no benefit.
This patch eliminates the unnecessary use of the port table by joining
the IP allocation table directly to the security groups and allowed
address pairs tables. In local testing of the method, this sped it up
by an order of magnitude.
Closes-Bug: #1373851 d2d22b691f1e2f3 b18f7ec2c27
Change-Id: I12899413004838