Investigate 'selectin' relation optimization with newer SQLAlchemy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Triaged
|
Medium
|
Unassigned |
Bug Description
We have attempted to optimize the number of sql queries neutron makes during testing with some "cheap wins" such as using `joined` instead of `subquery` relationship [1]. This helped with the number of queries but the actual optimization was never measured, it was just marked as "significant".
By doing this "cheap win" we have introduced regression in the development code for some cases where a large amount of tags is defined. This is documented in LP[2] and subsequently reverted in [3].
This LP was created to go back and explore the use of `selectin`[4] relation which should help with reducing the queries AND not cause regression with large deployments. The `selectin` option has been available since around SQLAlchemy 1.3 but given it was in its infancy back then, we should consider this with later sqlalchemy, e.i. 2.0+.
[1] https:/
[2] https:/
[3] https:/
[4] https:/
Changed in neutron: | |
importance: | Undecided → Medium |
tags: | added: db |
description: | updated |
Changed in neutron: | |
status: | New → Triaged |
Related fix proposed to branch: stable/zed /review. opendev. org/c/openstack /neutron/ +/921780
Review: https:/