Fix glance metadata SQL query performance
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

github-borat/cinder,bswartz/cinder,Datera/cinder,manojhirway/ExistingImagesOnNFS,potsmaster/cinder,nikesh-mahalka/cinder,rakeshmi/cinder,nexusriot/cinder,leilihh/cinder,winndows/cinder,julianwang/cinder,j-griffith/cinder,duhzecca/cinder,duhzecca/cinder,Hybrid-Cloud/cinder,Nexenta/cinder,redhat-openstack/cinder,JioCloud/cinder,CloudServer/cinder,abusse/cinder,cloudbase/cinder,Akrog/cinder,openstack/cinder,Akrog/cinder,leilihh/cinder,eharney/cinder,manojhirway/ExistingImagesOnNFS,hguemar/cinder,NetApp/cinder,hguemar/cinder,takeshineshiro/cinder,blueboxgroup/cinder,alex8866/cinder,tlakshman26/cinder-new-branch,scality/cinder,takeshineshiro/cinder,dims/cinder,saeki-masaki/cinder,Paul-Ezell/cinder-1,Datera/cinder,redhat-openstack/cinder,bswartz/cinder,ge0rgi/cinder,phenoxim/cinder,tlakshman26/cinder-new-branch,tlakshman26/cinder-https-changes,github-borat/cinder,abusse/cinder,mahak/cinder,Accelerite/cinder,NetApp/cinder,Accelerite/cinder,tlakshman26/cinder-https-changes,blueboxgroup/cinder,Hybrid-Cloud/cinder,petrutlucian94/cinder,petrutlucian94/cinder,nikesh-mahalka/cinder,winndows/cinder,Paul-Ezell/cinder-1,sasukeh/cinder,eharney/cinder,scottdangelo/RemoveVolumeMangerLocks,apporc/cinder,julianwang/cinder,dims/cinder,scality/cinder,phenoxim/cinder,Nexenta/cinder,sasukeh/cinder,tlakshman26/cinder-bug-fix-volume-conversion-full,scottdangelo/RemoveVolumeMangerLocks,openstack/cinder,j-griffith/cinder,potsmaster/cinder,saeki-masaki/cinder,mahak/cinder,nexusriot/cinder,JioCloud/cinder,CloudServer/cinder,tlakshman26/cinder-bug-fix-volume-conversion-full,rakeshmi/cinder,cloudbase/cinder,alex8866/cinder,apporc/cinder