Comment 7 for bug 1509677

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/kilo)

Reviewed: https://review.openstack.org/242962
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=14586b2eac909dd76431e4eb9ff00b8f5a4c2d0c
Submitter: Jenkins
Branch: stable/kilo

commit 14586b2eac909dd76431e4eb9ff00b8f5a4c2d0c
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: If85dbea15d42d42c6b0be7402c06f258e278b2eb
    Closes-Bug: #1509677
    (cherry picked from commit a4f442940551a8a38e26e132c7efa766226daa15)