]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix glance metadata SQL query performance
authorMathieu Gagné <mgagne@iweb.com>
Tue, 29 Jul 2014 15:57:15 +0000 (11:57 -0400)
committerMathieu Gagné <mgagne@iweb.com>
Tue, 29 Jul 2014 16:07:19 +0000 (12:07 -0400)
commit8f8a8a6ffe14cf7bb461dc26d178bf8acc8ddf12
treec7264eb9d7ce997a32d76f7684e3ec18f378599a
parentd5b77351379b642c5c74afaee201050b76bad777
Fix glance metadata SQL query performance

The query built to retrieve glance metadata associated to a volume
was sub-optimal: all rows of volume_glance_metadata were returned.

Fix it by properly joining the 2 tables with volume_id field.

Closes-bug: #1349936
Change-Id: Ic09414de769e71f8b8f99113838af48d8520e187
cinder/db/sqlalchemy/api.py