Bug 678279 - Perf: Add an index on rhq_resource (inventory_status)
Summary: Perf: Add an index on rhq_resource (inventory_status)
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Database
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: rhq-perf
TreeView+ depends on / blocked
 
Reported: 2011-02-17 12:29 UTC by Heiko W. Rupp
Modified: 2024-03-04 13:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Heiko W. Rupp 2011-02-17 12:29:55 UTC
After more digging into the sources and queries, I propose to add an index like this:

CREATE INDEX "RHQ_RES_I_STAT_IDX" ON "RHQ_RESOURCE" ("INVENTORY_STATUS") TABLESPACE "USERS" PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 64K BUFFER_POOL DEFAULT) NOLOGGING LOCAL

While it may not help a lot on this specific query, there is a large number of queries in the system that uses the inventory_status column.

-----

In the longer run, it may make sense to turn the column into something integer based.

Comment 1 Jay Shaughnessy 2011-09-15 18:34:56 UTC
Given the low cardinality of the field would this index really be helpful or would the index just add overhead to insert/deletes on resources?

Comment 2 Ian Springer 2011-09-15 18:44:48 UTC
Heiko,

Are there particular queries you know are slow because of no index here? We need more justification for adding this.

Comment 3 Heiko W. Rupp 2012-03-05 08:20:33 UTC
I don't recall. Original idea came from observations in OracleEM.


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