Project

General

Profile

Actions

Bug #2068

closed

Some queries are overly slow

Added by Nicolas CHARLES over 12 years ago. Updated almost 12 years ago.

Status:
Released
Priority:
2
Category:
Web - Compliance & node report
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

On the (small) test machine, some queries take a lot of time :
When displaying a node
2011-11-22 14:20:50 CET rudder rudder LOG: exécute <unnamed>: select executiondate, nodeid, configurationruleid, policyinstanceid, serial, component, keyValue, executionTimeStamp, eventtype, policy, msg from RudderSysEvents join (select
nodeid as Node, max(executiontimestamp) as Time from ruddersysevents where configurationRuleId = 'hasPolicyServer-root' and component = 'common' and keyValue = 'EndRun' group by nodeid ) as Ordering on Ordering.Node = nodeid and execution
TimeStamp = Ordering.Time where 1=1 and configurationRuleId = $1 and serial = $2 and executionTimeStamp > (now() - interval '15 minutes') and nodeId = $3
2011-11-22 14:20:50 CET rudder rudder DÉTAIL: paramètres : $1 = 'hasPolicyServer-root', $2 = '35', $3 = '06da3556-5204-4bd7-b3b0-fa5e7bcfbbea'
2011-11-22 14:20:56 CET rudder rudder LOG: durée : 5701.757 ms

2011-11-22 14:23:54 CET rudder rudder LOG: instruction : select executiondate, nodeid, configurationruleid, policyinstanceid, serial, component, keyValue, executionTimeStamp, eventtype, policy, msg from RudderSysEvents join (select nodei
d as Node, max(executiontimestamp) as Time from ruddersysevents where configurationRuleId = 'hasPolicyServer-root' and component = 'common' and keyValue = 'EndRun' group by nodeid ) as Ordering on Ordering.Node = nodeid and executionTimeS
tamp = Ordering.Time where 1=1 and configurationRuleId = 'hasPolicyServer-root' and serial = '35' and nodeId = '06da3556-5204-4bd7-b3b0-fa5e7bcfbbea';
2011-11-22 14:24:07 CET rudder rudder LOG: durée : 13198.511 ms

A view would be great, or at least an optimisation on the inner query


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #2064: postgres process uses 100%CPU when clicking on Administration MenuRejectedNicolas PERRON2011-11-21Actions
Actions

Also available in: Atom PDF