Public bug reported: Current "NeutronDbObject.objects_exist" implementation generates a query (quite complex most of the time) to retrieve an OVO object. That usually implies a large set of register columns, joined queries or subqueries. Then, the method adds the "count" SQL syntagm to return only the number of registers found.
This query can be optimized by: - Limiting the number of registers to be retrieved to only one. The goal of the "objects_exist" method is to know if there are objects or not. Finding one is enough - Limiting the complexity of the query by requesting only one column, provided as a method parameter, that could be, for example, the ID. ** Affects: neutron Importance: Wishlist Assignee: Rodolfo Alonso (rodolfo-alonso-hernandez) Status: New ** Changed in: neutron Importance: Undecided => Wishlist ** Changed in: neutron Assignee: (unassigned) => Rodolfo Alonso (rodolfo-alonso-hernandez) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1925528 Title: Improve "NeutronDbObject.objects_exist" performance Status in neutron: New Bug description: Current "NeutronDbObject.objects_exist" implementation generates a query (quite complex most of the time) to retrieve an OVO object. That usually implies a large set of register columns, joined queries or subqueries. Then, the method adds the "count" SQL syntagm to return only the number of registers found. This query can be optimized by: - Limiting the number of registers to be retrieved to only one. The goal of the "objects_exist" method is to know if there are objects or not. Finding one is enough - Limiting the complexity of the query by requesting only one column, provided as a method parameter, that could be, for example, the ID. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1925528/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp