yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #20826
[Bug 1361631] Re: Do not query datetime type filed when it is not needed
This is a really deep optimization, I think something like this needs to
come up as a spec on database optimization not a one off bug.
** Changed in: nova
Status: New => Opinion
** Changed in: nova
Importance: Undecided => Wishlist
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1361631
Title:
Do not query datetime type filed when it is not needed
Status in OpenStack Compute (Nova):
Opinion
Bug description:
creating a datetime object is more expensive then any other type used
in the database.
Creating the datetime object is expensive especially for mysql
drivers, because creating the object from a datetime string
representation is expensive.
When listing 4k instances with details without the volumes_extension,
approximately 2 second spent in the mysql driver, which spent 1 second
for parsing the datetime (DateTime_or_None).
The datetime format is only useful when you are intended to present
the time for an end user, for the system the float or integer
representations are more efficient.
* consider changing the store type to float or int
* exclude the datetime fields from the query when it will not be part of an api response
* remove the datetime fields from the database where it is is not really needed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1361631/+subscriptions
References