{"action":"closed","issue":{"url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/7977","repository_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports","labels_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/7977/labels{/name}","comments_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/7977/comments","events_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/7977/events","html_url":"https://github.com/PennyDreadfulMTG/perf-reports/issues/7977","id":288314538,"node_id":"MDU6SXNzdWUyODgzMTQ1Mzg=","number":7977,"title":"Exceeded slow_query limit (31.2 > 5) in mysql: ","user":{"login":"vorpal-buildbot","id":23072004,"node_id":"MDQ6VXNlcjIzMDcyMDA0","avatar_url":"https://avatars2.githubusercontent.com/u/23072004?v=4","gravatar_id":"","url":"https://api.github.com/users/vorpal-buildbot","html_url":"https://github.com/vorpal-buildbot","followers_url":"https://api.github.com/users/vorpal-buildbot/followers","following_url":"https://api.github.com/users/vorpal-buildbot/following{/other_user}","gists_url":"https://api.github.com/users/vorpal-buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/vorpal-buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vorpal-buildbot/subscriptions","organizations_url":"https://api.github.com/users/vorpal-buildbot/orgs","repos_url":"https://api.github.com/users/vorpal-buildbot/repos","events_url":"https://api.github.com/users/vorpal-buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/vorpal-buildbot/received_events","type":"User","site_admin":false},"labels":[{"id":763867617,"node_id":"MDU6TGFiZWw3NjM4Njc2MTc=","url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/labels/wontfix","name":"wontfix","color":"ffffff","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-13T09:06:11Z","updated_at":"2018-07-17T06:45:27Z","closed_at":"2018-07-17T06:45:27Z","author_association":"NONE","body":"        SELECT\n            a.id,\n            a.name,\n            aca.ancestor AS parent_id,\n            \n        SUM(CASE WHEN TRUE THEN 1 ELSE 0 END) AS `all_num_decks`,\n        SUM(CASE WHEN TRUE THEN wins ELSE 0 END) AS `all_wins`,\n        SUM(CASE WHEN TRUE THEN losses ELSE 0 END) AS `all_losses`,\n        SUM(CASE WHEN TRUE THEN draws ELSE 0 END) AS `all_draws`,\n        SUM(CASE WHEN TRUE AND wins >= 5 AND losses = 0 AND d.source_id IN (SELECT id FROM source WHERE name = 'League') THEN 1 ELSE 0 END) AS all_perfect_runs,\n        SUM(CASE WHEN TRUE AND dsum.finish = 1 THEN 1 ELSE 0 END) AS `all_tournament_wins`,\n        SUM(CASE WHEN TRUE AND dsum.finish <= 8 THEN 1 ELSE 0 END) AS `all_tournament_top8s`,\n        IFNULL(ROUND((SUM(CASE WHEN TRUE THEN wins ELSE 0 END) / NULLIF(SUM(CASE WHEN TRUE THEN wins + losses ELSE 0 END), 0)) * 100, 1), '') AS `all_win_percent`\n    ,\n            \n        SUM(CASE WHEN dsum.created_date >= 1506668400 THEN 1 ELSE 0 END) AS `season_num_decks`,\n        SUM(CASE WHEN dsum.created_date >= 1506668400 THEN wins ELSE 0 END) AS `season_wins`,\n        SUM(CASE WHEN dsum.created_date >= 1506668400 THEN losses ELSE 0 END) AS `season_losses`,\n        SUM(CASE WHEN dsum.created_date >= 1506668400 THEN draws ELSE 0 END) AS `season_draws`,\n        SUM(CASE WHEN dsum.created_date >= 1506668400 AND wins >= 5 AND losses = 0 AND d.source_id IN (SELECT id FROM source WHERE name = 'League') THEN 1 ELSE 0 END) AS season_perfect_runs,\n        SUM(CASE WHEN dsum.created_date >= 1506668400 AND dsum.finish = 1 THEN 1 ELSE 0 END) AS `season_tournament_wins`,\n        SUM(CASE WHEN dsum.created_date >= 1506668400 AND dsum.finish <= 8 THEN 1 ELSE 0 END) AS `season_tournament_top8s`,\n        IFNULL(ROUND((SUM(CASE WHEN dsum.created_date >= 1506668400 THEN wins ELSE 0 END) / NULLIF(SUM(CASE WHEN dsum.created_date >= 1506668400 THEN wins + losses ELSE 0 END), 0)) * 100, 1), '') AS `season_win_percent`\n    \n        FROM\n            archetype AS a\n        LEFT JOIN\n            archetype_closure AS aca ON a.id = aca.descendant AND aca.depth = 1\n        LEFT JOIN\n            archetype_closure AS acd ON a.id = acd.ancestor\n        LEFT JOIN\n            deck AS d ON acd.descendant = d.archetype_id\n        \n        LEFT JOIN\n            (\n                SELECT\n                    d.id,\n                    d.created_date,\n                    d.finish,\n                    SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, -- IFNULL so we still count byes as wins.\n                    SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses,\n                    SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws\n                FROM\n                    deck_match AS dm\n                INNER JOIN\n                    deck_match AS odm ON dm.match_id = odm.match_id AND dm.deck_id <> odm.deck_id\n                INNER JOIN\n                    deck AS d ON d.id = dm.deck_id\n                GROUP BY\n                    d.id\n            ) AS dsum ON d.id = dsum.id\n    \n        WHERE\n            1 = 1\n        GROUP BY\n            a.id,\n            aca.ancestor -- aca.ancestor will be unique per a.id because of integrity constraints enforced elsewhere (each archetype has one ancestor) but we let the database know here.\n        ORDER BY\n            a.name\n    ; [] (slow_query, 31.2, mysql)\n\nReported on mysql by perf\n--------------------------------------------------------------------------------\nRequest Method: GET\nPath: /decks/2912/?\nCookies: {}\nEndpoint: deck\nView Args: {'deck_id': '2912'}\nPerson: logged_out\nUser-Agent: Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)\nReferrer: None\nRequest Data: {}\n"}}
{"actor":{"display_login":"stale"}}