Speed up SELECTs with filters by tenant_id

Bug #1419815 reported by Ann Taraday
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Ann Taraday

Bug Description

Adding index on tenant_id could greatly speed up SELECTs with filters by tenant_id when some value is selected per resource
per tenant.

Simple example with adding index on securitygrouprules show that speed could increase twice.
For MySQL http://paste.openstack.org/show/169810/
For PostgreSQL http://paste.openstack.org/show/169957/

Tags: db
Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Ann Kamyshnikova (akamyshnikova)
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/154492

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-vpnaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/154506

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lbaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/154525

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

Reviewed: https://review.openstack.org/143120
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e1cf83534552ca39f8408d531b9f5bd814586ce2
Submitter: Jenkins
Branch: master

commit e1cf83534552ca39f8408d531b9f5bd814586ce2
Author: Roman Podoliaka <email address hidden>
Date: Fri Dec 19 12:31:07 2014 +0200

    Add index on tenant_id

    This will greatly speed up SELECTs with filters by tenant_id (e.g.
    when checking if we are going to exceed the quota value per resource
    per tenant).

    Closes-bug: #1419815

    Change-Id: Iab80cce701e1f12dbf7a4f60d5ce945c6e7d0e2d

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-lbaas (master)

Reviewed: https://review.openstack.org/154525
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=58c7f4e979aa4de506592543cf006620d5f77cac
Submitter: Jenkins
Branch: master

commit 58c7f4e979aa4de506592543cf006620d5f77cac
Author: Ann Kamyshnikova <email address hidden>
Date: Tue Feb 10 18:35:57 2015 +0300

    Add index on tenant_id

    Adding index on tenant_id could greatly speed up SELECTs with
    filters by tenant_id when some value is selected per resource
    per tenant.
    As a continuation part of https://review.openstack.org/143120 for
    service tables.

    Change-Id: I89966cbcee23c651a61d3191f3454a24cd0c3280
    Partial-bug: #1419815

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-vpnaas (master)

Reviewed: https://review.openstack.org/154506
Committed: https://git.openstack.org/cgit/openstack/neutron-vpnaas/commit/?id=e055639ec9b152fbdec211364e01ed865e1c6032
Submitter: Jenkins
Branch: master

commit e055639ec9b152fbdec211364e01ed865e1c6032
Author: Ann Kamyshnikova <email address hidden>
Date: Tue Feb 10 17:59:16 2015 +0300

    Add index on tenant_id

    Adding index on tenant_id could greatly speed up SELECTs with
    filters by tenant_id when some value is selected per resource
    per tenant.
    As a continuation part of https://review.openstack.org/143120 for
    service tables.

    Change-Id: I9f67a82b0e0a493ff8b39424296699e7e517e9df
    Partial-bug: #1419815

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-fwaas (master)

Reviewed: https://review.openstack.org/154492
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=8c2f492772bfbafc0fe5f48e28e50b24322842c6
Submitter: Jenkins
Branch: master

commit 8c2f492772bfbafc0fe5f48e28e50b24322842c6
Author: Ann Kamyshnikova <email address hidden>
Date: Tue Feb 10 17:21:24 2015 +0300

    Add index on tenant_id

    Adding index on tenant_id could greatly speed up SELECTs with
    filters by tenant_id when some value is selected per resource
    per tenant.

    As a continuation part of https://review.openstack.org/143120 for
    service tables.

    Partial-bug: #1419815

    Change-Id: I4f3e323293a4205df3d99b1faa94ea2f546a1cde

Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.