yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #87102
[Bug 1942863] Re: Improve "neutron_lib.db.model_query.get_collection_count" method
Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/807686
Committed: https://opendev.org/openstack/neutron-lib/commit/64e4dc29a424249aeee9d0755f20fa400238283a
Submitter: "Zuul (22348)"
Branch: master
commit 64e4dc29a424249aeee9d0755f20fa400238283a
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date: Tue Sep 7 08:37:53 2021 +0000
Improve "get_collection_count" method
This improvement is based on [1]. "get_collection_count" can now
request a model query requesting only one single field from the
model. That simplifies the SQL query and improves the performance.
The result provided will have the same number of elements; that
means the result of the collection count will be the same.
[1]https://review.opendev.org/c/openstack/neutron-lib/+/787672
Closes-Bug: #1942863
Change-Id: Ie0bffac20b9c40933b64f163de3cc03d45b24682
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1942863
Title:
Improve "neutron_lib.db.model_query.get_collection_count" method
Status in neutron:
Fix Released
Bug description:
Same as in [1], the object count query should use a simpler SQL query
instead of retrieving the full OVO objects. This goal of this bug is
to provide a kwarg to pass a model field. The SQL query will retrieve
only this field form the table register, avoiding most of the joined
and nested queries.
[1]https://bugs.launchpad.net/neutron/+bug/1925528
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1942863/+subscriptions
References