diff options
author | Ihtisham ul Haq <ihtisham.ul_haq@mail.schwarz> | 2023-04-17 12:23:30 +0200 |
---|---|---|
committer | Ihtisham ul Haq <ihtisham.ul_haq@mail.schwarz> | 2023-04-20 12:47:31 +0200 |
commit | f23d7af8d7e36b9d52a8c8ccf64355e22f3adb9c (patch) | |
tree | fbcf8224d6c98760f9e82daaf1c9d014cda88969 /neutron/db/provisioning_blocks.py | |
parent | cda5107e6582bce5f0b0630991acd84f5df4e8b2 (diff) | |
download | neutron-f23d7af8d7e36b9d52a8c8ccf64355e22f3adb9c.tar.gz |
Use explicit inner join for networks in port query
This improves the performance of the database when fetching a list of ports
for a project user. This change creates an inner join with the networks
belonging to the ports.
Previous SQL query:
SELECT ports ...
FROM network, ports ...
WHERE ports.project_id = <project>
OR ports.network_id = networks.id
AND networks.project_id = <project>
Current SQL query:
SELECT ports ...
FROM ports
INNER JOIN networks ON networks.id = ports.network_id
WHERE ports.project_id = <project>
OR networks.project_id = <project>
Closes-Bug: #2016704
Change-Id: I9c49a307956ecfbf8bd2e866cefb21a212c38bd6
Diffstat (limited to 'neutron/db/provisioning_blocks.py')
0 files changed, 0 insertions, 0 deletions