I think the cause of the problem is that get_meters() exec full scan query to join of resource and meter tables and then remove duplicated record in python codes.
https://github.com/openstack/ceilometer/blob/master/ceilometer/storage/impl_sqlalchemy.py#L274
Using 'group by' clause to required columns in meter table and check resource_id existense using subquery is fast in my test.
I think the cause of the problem is that get_meters() exec full scan query to join of resource and meter tables and then remove duplicated record in python codes.
https:/ /github. com/openstack/ ceilometer/ blob/master/ ceilometer/ storage/ impl_sqlalchemy .py#L274
Using 'group by' clause to required columns in meter table and check resource_id existense using subquery is fast in my test.