Bug 611495

Summary: Perf: Display of callime data uses huge amounts of memory on database
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: Core ServerAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0CC: jshaughn
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-02 19:05:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 620933    

Description Heiko W. Rupp 2010-07-05 12:19:08 UTC
Postgres is creating temp files when a query does not fit into the main memory like below:



LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp56743.0", size 2308400
STATEMENT:  select count(distinct calltimeda1_.CALL_DESTINATION) as col_0_0_ from RHQ_CALLTIME_DATA_VALUE calltimeda0_, RHQ_CALLTIME_DATA_KEY calltimeda1_, RHQ_MEASUREMENT_SCHED measuremen3_, RHQ_MEASUREMENT_DEF measuremen4_ where calltimeda0_.KEY_ID=calltimeda1_.id and calltimeda1_.SCHEDULE_ID=measuremen3_.id and measuremen3_.DEFINITION=measuremen4_.ID and measuremen4_.DATA_TYPE=$1 and (calltimeda0_.id in (select calltimeda5_.id from RHQ_CALLTIME_DATA_VALUE calltimeda5_, RHQ_CALLTIME_DATA_KEY calltimeda6_, RHQ_MEASUREMENT_SCHED measuremen7_ where calltimeda5_.KEY_ID=calltimeda6_.id and calltimeda6_.SCHEDULE_ID=measuremen7_.id and measuremen7_.RESOURCE_ID=$2)) and calltimeda0_.BEGIN_TIME>$3 and calltimeda0_.END_TIME<$4
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp56743.1", size 12830168
STATEMENT:  select count(distinct calltimeda1_.CALL_DESTINATION) as col_0_0_ from RHQ_CALLTIME_DATA_VALUE calltimeda0_, RHQ_CALLTIME_DATA_KEY calltimeda1_, RHQ_MEASUREMENT_SCHED measuremen3_, RHQ_MEASUREMENT_DEF measuremen4_ where calltimeda0_.KEY_ID=calltimeda1_.id and calltimeda1_.SCHEDULE_ID=measuremen3_.id and measuremen3_.DEFINITION=measuremen4_.ID and measuremen4_.DATA_TYPE=$1 and (calltimeda0_.id in (select calltimeda5_.id from RHQ_CALLTIME_DATA_VALUE calltimeda5_, RHQ_CALLTIME_DATA_KEY calltimeda6_, RHQ_MEASUREMENT_SCHED measuremen7_ where calltimeda5_.KEY_ID=calltimeda6_.id and calltimeda6_.SCHEDULE_ID=measuremen7_.id and measuremen7_.RESOURCE_ID=$2)) and calltimeda0_.BEGIN_TIME>$3 and calltimeda0_.END_TIME<$4
LOG:  duration: 1242.267 ms  execute <unnamed>: select count(distinct calltimeda1_.CALL_DESTINATION) as col_0_0_ from RHQ_CALLTIME_DATA_VALUE calltimeda0_, RHQ_CALLTIME_DATA_KEY calltimeda1_, RHQ_MEASUREMENT_SCHED measuremen3_, RHQ_MEASUREMENT_DEF measuremen4_ where calltimeda0_.KEY_ID=calltimeda1_.id and calltimeda1_.SCHEDULE_ID=measuremen3_.id and measuremen3_.DEFINITION=measuremen4_.ID and measuremen4_.DATA_TYPE=$1 and (calltimeda0_.id in (select calltimeda5_.id from RHQ_CALLTIME_DATA_VALUE calltimeda5_, RHQ_CALLTIME_DATA_KEY calltimeda6_, RHQ_MEASUREMENT_SCHED measuremen7_ where calltimeda5_.KEY_ID=calltimeda6_.id and calltimeda6_.SCHEDULE_ID=measuremen7_.id and measuremen7_.RESOURCE_ID=$2)) and calltimeda0_.BEGIN_TIME>$3 and calltimeda0_.END_TIME<$4
DETAIL:  parameters: $1 = '3', $2 = '12791', $3 = '1278158986846', $4 = '1278331786846'