IIUC the inner join is still needed to filter out resources that do not have any samples, otherwise [1] will loop over resources with no samples and generate 2 queries per resource that dont return anything..
[1] https://github.com/openstack/ceilometer/blob/b34865f80818165187552e7feca4ead2e61a30d3/ceilometer/storage/impl_sqlalchemy.py#L440
IIUC the inner join is still needed to filter out resources that do not have any samples, otherwise [1] will loop over resources with no samples and generate 2 queries per resource that dont return anything..
[1] https:/ /github. com/openstack/ ceilometer/ blob/b34865f808 18165187552e7fe ca4ead2e61a30d3 /ceilometer/ storage/ impl_sqlalchemy .py#L440