Comment 18 for bug 1373851

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/juno)

Reviewed: https://review.openstack.org/130101
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c14b58b1f8ba2f87c717441cdfca1c4c1be2f050
Submitter: Jenkins
Branch: stable/juno

commit c14b58b1f8ba2f87c717441cdfca1c4c1be2f050
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
    Change-Id: I12899413004838d2d22b691f1e2f3b18f7ec2c27
    (cherry picked from commit 04df85b6e5a098f8f55bb82f04d9769763beb487)