Bug 610495 - Perf: Async deletion of resource slow due to call time data deletion
Summary: Perf: Async deletion of resource slow due to call time data deletion
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Monitoring
Version: 4.0.0
Hardware: All
OS: All
high vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
Depends On:
Blocks: rhq-perf
TreeView+ depends on / blocked
Reported: 2010-07-02 08:54 UTC by Heiko W. Rupp
Modified: 2014-05-29 21:12 UTC (History)
1 user (show)

Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Heiko W. Rupp 2010-07-02 08:54:35 UTC
@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 21:12:07 UTC
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.