ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Toader (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-15011) Decrease the load on ambari database after cluster creation
Date Thu, 18 Feb 2016 14:21:18 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-15011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebastian Toader updated AMBARI-15011:
--------------------------------------
    Attachment:     (was: AMBARI-15011-trunk.v1.patch)

> Decrease the load on ambari database after cluster creation
> -----------------------------------------------------------
>
>                 Key: AMBARI-15011
>                 URL: https://issues.apache.org/jira/browse/AMBARI-15011
>             Project: Ambari
>          Issue Type: Improvement
>          Components: ambari-server
>            Reporter: Sebastian Toader
>            Assignee: Sebastian Toader
>            Priority: Critical
>             Fix For: 2.2.2
>
>         Attachments: AMBARI-15011-branch-2.2.v1.patch
>
>
> Decrease the load generated by queries that are periodically executed after cluster creation.
> Queries executed frequently:
> {code}
> SELECT t0.service_config_id, t0.cluster_id, t0.create_timestamp, t0.group_id, t0.note,
t0.service_name, t0.user_name, t0.version, t0.stack_id FROM serviceconfig t0 WHERE ((t0.cluster_id
= @P0) AND (t0.create_timestamp = (SELECT MAX(t1.create_timestamp) FROM serviceconfig t1 WHERE
(((t1.service_name = t0.service_name) AND (t1.cluster_id = @P1)) AND (t1.group_id IS NULL)))))

> {code}
> {code}
> SELECT MAX(t0.skippable), MIN(t1.start_time), MAX(t1.end_time), t1.stage_id, SUM(CASE
 WHEN (t1.status = @P0) THEN @P1 ELSE @P2 END), SUM(CASE  WHEN (t1.status = @P3) THEN @P4
ELSE @P5 END), SUM(CASE  WHEN (t1.status = @P6) THEN @P7 ELSE @P8 END), SUM(CASE  WHEN (t1.status
= @P9) THEN @P10 ELSE @P11 END), SUM(CASE  WHEN (t1.status = @P12) THEN @P13 ELSE @P14 END),
SUM(CASE  WHEN (t1.status = @P15) THEN @P16 ELSE @P17 END), SUM(CASE  WHEN (t1.status = @P18)
THEN @P19 ELSE @P20 END), SUM(CASE  WHEN (t1.status = @P21) THEN @P22 ELSE @P23 END), SUM(CASE
 WHEN (t1.status = @P24) THEN @P25 ELSE @P26 END), SUM(CASE  WHEN (t1.status = @P27) THEN
@P28 ELSE @P29 END), SUM(CASE  WHEN (t1.status = @P30) THEN @P31 ELSE @P32 END) FROM stage
t0, host_role_command t1 WHERE ((t0.stage_id = t1.stage_id) AND (t0.request_id = t1.request_id))
GROUP BY t1.request_id, t1.stage_id HAVING (t1.request_id = @P33)
> {code}
> {code}
> SELECT DISTINCT t0.task_id FROM host_role_command t0, hosts t1 WHERE ((((t1.host_name
= @P0) AND (t0.role = @P1)) AND (t0.status = @P2)) AND (t1.host_id = t0.host_id)) ORDER BY
t0.task_id
> {code}
> {code}
> SELECT DISTINCT task_id FROM host_role_command WHERE ((role = @P0) AND (status = @P1))
ORDER BY task_id
> {code}
> {code}
> SELECT COUNT(task_id) FROM host_role_command WHERE (status IN (@P0,@P1,@P2,@P3,@P4,@P5))
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message