← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1361631] [NEW] Do not query datetime type filed when it is not needed

 

Public bug reported:

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.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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):
  New

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


Follow ups

References