Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 (cherry picked from commit f23d7af)
- Loading branch information