Bug 726524 - Consider adding an index for the RHQ_ALERT_CONDITION_LOG.CONDITION_ID to optimize queries.
Summary: Consider adding an index for the RHQ_ALERT_CONDITION_LOG.CONDITION_ID to opti...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 4.0.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Robert Buck
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon30-perf rhq41beta
TreeView+ depends on / blocked
 
Reported: 2011-07-28 22:20 UTC by Robert Buck
Modified: 2018-11-14 11:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:22:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Robert Buck 2011-07-28 22:20:53 UTC
The query of concern is:

  select alertCondLog.ID, alertCondLog.CTIME, alertCondLog.VALUE, 
    alertCondLog.ALERT_ID, alertCondLog.CONDITION_ID
    from RHQ_ALERT_CONDITION_LOG alertCondLog, RHQ_ALERT_CONDITION alertCond  
    where alertCondLog.CONDITION_ID = alertCond.ID 
      and alertCond.ALERT_DEFINITION_ID=:1
      and (alertCondLog.ALERT_ID is null)

The cardinality of the RHQ_ALERT_CONDITION_LOG and RHQ_ALERT_CONDITION tables in this case were 2963114 and 5268, respectively.

Comment 1 Robert Buck 2011-08-02 13:53:28 UTC
branch: feature/performance

commit 5b82b1e38bc6df304ae5eb11dfa87a13091c20d5
Author: Robert Buck <buck.robert.j>
Date:   2011-07-28 18:22:40 -0400

    [BZ 726524] Consider adding an index for the RHQ_ALERT_CONDITION_LOG.CONDITION_ID to optimize queries.

Comment 3 Robert Buck 2011-08-08 20:22:18 UTC
Fixed and merge to master in:

6328219f0cb2a251463111bf5f481d92fafc78a6
d7e9e35c5326c1c36f1d323fc5448d703f225bca

Comment 4 Mike Foley 2011-08-11 15:25:51 UTC
verified as follows:  visual inspection of an oracle database to verify the presence of this new index, functional testing of alerts, reviewed server logs looking for sql or hibernate errors (none).

Comment 5 Mike Foley 2012-02-07 19:22:07 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE


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