Bug 1131724 - Full table scan of RHQ_CONFIG_UPDATE in delete for RHQ_CONFIG
Summary: Full table scan of RHQ_CONFIG_UPDATE in delete for RHQ_CONFIG
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Database
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.13
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-19 23:17 UTC by Elias Ross
Modified: 2014-10-16 13:18 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-10-16 13:18:08 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1131726 0 unspecified ON_QA Data from RHQ_CONFIG_UPDATE never purged 2022-03-31 04:28:05 UTC

Internal Links: 1131726

Description Elias Ross 2014-08-19 23:17:48 UTC
Description of problem:

This query:

delete from RHQ_CONFIG where id in (
   select resourceco1_.CONFIGURATION_ID from
     RHQ_CONFIG_UPDATE resourceco1_, RHQ_RESOURCE resource2_
   where
     resourceco1_.DTYPE='resource' and resourceco1_.CONFIG_RES_ID=resource2_.ID and
     (resourceco1_.CONFIG_RES_ID in (564877)) and
      resourceco1_.CONFIGURATION_ID<>resource2_.RES_CONFIGURATION_ID)

Explain plan:

DELETE STATEMENT	0.0 %
RHQ.RHQ_CONFIG  DELETE	0.0 %
NESTED LOOPS	0.9 %
SYS.VW_NSO_1  VIEW	0.0 %
SORT (UNIQUE)	0.0 %
HASH JOIN	0.0 %	
RHQ.RHQ_RESOURCE  TABLE ACCESS (BY INDEX ROWID)	0.1 %
RHQ.SYS_C0012508  INDEX (UNIQUE SCAN)	0.1 %	
RHQ.RHQ_CONFIG_UPDATE  TABLE ACCESS (FULL)	98.8 %
^^^	
RHQ.SYS_C0012490  INDEX (UNIQUE SCAN)	0.1 %	

My RHQ_CONFIG_UPDATE contains 600,000+ rows.

Actually think the bigger problem is RHQ_CONFIG_UPDATE never seems to be purged. I have rows from 2012 in there...

Comment 1 Elias Ross 2014-08-19 23:37:22 UTC
See Bug 1131726 on the purge process need. Probably okay to do a table scan if the data is being purged.

Comment 2 Thomas Segismont 2014-10-16 13:18:08 UTC
(In reply to Elias Ross from comment #1)
> See Bug 1131726 on the purge process need. Probably okay to do a table scan
> if the data is being purged.

Resource config data purge will be possible when Bug 1131726 is fixed.


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