Bug 610495 - Perf: Async deletion of resource slow due to call time data deletion
Perf: Async deletion of resource slow due to call time data deletion
Status: NEW
Product: RHQ Project
Classification: Other
Component: Monitoring (Show other bugs)
All All
low Severity high (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
Blocks: rhq-perf
  Show dependency treegraph
Reported: 2010-07-02 04:54 EDT by Heiko W. Rupp
Modified: 2014-05-29 17:12 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Heiko W. Rupp 2010-07-02 04:54:35 EDT
@NamedQueries( { @NamedQuery(name = CallTimeDataKey.QUERY_DELETE_BY_RESOURCES, query = "DELETE CallTimeDataKey ctdk WHERE ctdk.schedule IN ( SELECT ms FROM MeasurementSchedule ms WHERE ms.resource.id IN ( :resourceIds ) )") })

forces the database into full table scans per resource id deleted (actually, only one resource id is passed in, but this does not matter here).

Putting an index on rhq_calltime_data_value.key_id speeds up the deletion dramatically (from multiple minutes in my case to several seconds)

CREATE INDEX ct_key_index
  ON rhq_calltime_data_value
  USING btree
Comment 1 Jay Shaughnessy 2014-05-29 17:12:07 EDT
This index was never put in place. Still valid, I guess.  Maybe not relevant as I thin calltime is moving to cassandra.

Note You need to log in before you can comment on or make changes to this bug.