** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => havana-3
--
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/1204916
Title:
Empty nova list causes expensive in predicate queries
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
Requesting a list of servers through the API runs some queries that
become more expensive when there are no instances returned.
Example:
/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/expression.py:1927:
SAWarning: The IN-predicate on "instance_system_metadata.instance_u
uid" was invoked with an empty sequence. This results in a contradiction,
which nonetheless can be expensive to evaluate. Consider alternati
ve strategies for improved performance.
return self._in_impl(operators.in_op, operators.notin_op, other)
2013-07-24 20:42:46.126 DEBUG sqlalchemy.pool.QueuePool [-] Connection
<_mysql.connection open to 'localhost' at 60bc290> checked out from po
ol from (pid=24610) __init__
/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py:415
2013-07-24 20:42:46.127 INFO sqlalchemy.engine.base.Engine [-] SELECT
instance_system_metadata.created_at AS instance_system_metadata_created_at,
instance_system_metadata.updated_at AS instance_system_metadata_updated_at,
instance_system_metadata.deleted_at AS instance_system_metadata_deleted_at,
instance_system_metadata.deleted AS instance_system_metadata_deleted,
instance_system_metadata.id AS instance_system_metadata_id,
instance_system_metadata.`key` AS instance_system_metadata_key,
instance_system_metadata.value AS instance_system_metadata_value,
instance_system_metadata.instance_uuid AS
instance_system_metadata_instance_uuid
FROM instance_system_metadata
WHERE instance_system_metadata.deleted = %s AND
instance_system_metadata.instance_uuid != instance_system_metadata.instance_uuid
instance_system_metadata, instance_metadata, and instance_faults all
do the same thing. You can see by the WHERE clause that this will not
return any rows, but it still scans a large part of the tables.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1204916/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp