commit a4f442940551a8a38e26e132c7efa766226daa15
Author: ZhiQiang Fan <email address hidden>
Date: Sat Oct 24 09:30:53 2015 -0600
avoid unnecessary inner join in get_resources() for SQL backend
To get distinct resource ids, we do a query on resource table which
inner join sample table, and apply filters on it.
Note that when sql_expire_samples_only is enabled, there will be
some resources without any sample, in such case we must use inner
join to avoid wrong result, no matter if there is a timestamp filter
or not.
But that option is disabled by default, so when there is no timestamp
filters, the inner join is unnecessary, we should avoid it to save
some RAM/CPU cost.
Reviewed: https:/ /review. openstack. org/239183 /git.openstack. org/cgit/ openstack/ ceilometer/ commit/ ?id=a4f44294055 1a8a38e26e132c7 efa766226daa15
Committed: https:/
Submitter: Jenkins
Branch: master
commit a4f442940551a8a 38e26e132c7efa7 66226daa15
Author: ZhiQiang Fan <email address hidden>
Date: Sat Oct 24 09:30:53 2015 -0600
avoid unnecessary inner join in get_resources() for SQL backend
To get distinct resource ids, we do a query on resource table which
inner join sample table, and apply filters on it.
Note that when sql_expire_ samples_ only is enabled, there will be
some resources without any sample, in such case we must use inner
join to avoid wrong result, no matter if there is a timestamp filter
or not.
But that option is disabled by default, so when there is no timestamp
filters, the inner join is unnecessary, we should avoid it to save
some RAM/CPU cost.
Change-Id: If85dbea15d42d4 2c6b0be7402c06f 258e278b2eb
Closes-Bug: #1509677