Bug 726524 - Consider adding an index for the RHQ_ALERT_CONDITION_LOG.CONDITION_ID to optimize queries.
Consider adding an index for the RHQ_ALERT_CONDITION_LOG.CONDITION_ID to opti...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
4.0.1
Unspecified Unspecified
medium Severity medium (vote)
: ---
: ---
Assigned To: Robert Buck
Mike Foley
: Reopened
Depends On:
Blocks: jon30-perf rhq41beta
  Show dependency treegraph
 
Reported: 2011-07-28 18:20 EDT by Robert Buck
Modified: 2012-02-07 14:22 EST (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Robert Buck 2011-07-28 18:20:53 EDT
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 09:53:28 EDT
branch: feature/performance

commit 5b82b1e38bc6df304ae5eb11dfa87a13091c20d5
Author: Robert Buck <buck.robert.j@gmail.com>
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 16:22:18 EDT
Fixed and merge to master in:

6328219f0cb2a251463111bf5f481d92fafc78a6
d7e9e35c5326c1c36f1d323fc5448d703f225bca
Comment 4 Mike Foley 2011-08-11 11:25:51 EDT
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 14:22:07 EST
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.