{"action":"opened","issue":{"url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/29802","repository_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports","labels_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/29802/labels{/name}","comments_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/29802/comments","events_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/29802/events","html_url":"https://github.com/PennyDreadfulMTG/perf-reports/issues/29802","id":342182739,"node_id":"MDU6SXNzdWUzNDIxODI3Mzk=","number":29802,"title":"Exceeded slow_query limit (13.7 > 10.0) 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":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-18T05:33:38Z","updated_at":"2018-07-18T05:33:38Z","closed_at":null,"author_association":"NONE","body":"        SELECT\n            a.id AS archetype_id,\n            a.name AS archetype_name,\n            oa.id,\n            oa.name,\n            SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS all_wins, -- IFNULL so we still count byes as wins.\n            SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS all_losses,\n            SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS all_draws,\n            IFNULL(ROUND((SUM(CASE WHEN dm.games > odm.games THEN 1 ELSE 0 END) / NULLIF(SUM(CASE WHEN dm.games <> IFNULL(odm.games, 0) THEN 1 ELSE 0 END), 0)) * 100, 1), '') AS all_win_percent\n        FROM\n            archetype AS a\n        INNER JOIN\n            deck AS d ON d.archetype_id IN (SELECT descendant FROM archetype_closure WHERE ancestor = a.id)\n        INNER JOIN\n            deck_match AS dm ON d.id = dm.deck_id\n        INNER JOIN\n            deck_match AS odm ON dm.match_id = odm.match_id AND odm.deck_id <> d.id\n        INNER JOIN\n            deck AS od ON od.id = odm.deck_id\n        INNER JOIN\n            archetype AS oa ON od.archetype_id IN (SELECT descendant FROM archetype_closure WHERE ancestor = oa.id)\n        \n        LEFT JOIN\n            (\n        SELECT\n            `start`.id,\n            `start`.code,\n            `start`.start_date AS start_date,\n            `end`.start_date AS end_date\n        FROM\n            season AS `start`\n        LEFT JOIN\n            season AS `end` ON `end`.id = `start`.id + 1\n    ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)\n    \n        WHERE\n            (TRUE) AND (TRUE)\n        GROUP BY\n            a.id,\n            oa.id\n        ORDER BY\n            `all_wins` DESC,\n            oa.name\n    ```\n\n```[]``` (slow_query, 13.7, mysql)\n\nReported on decksite by mysql-perf```\n            --------------------------------------------------------------------------------\n            Request Method: GET\n            Path: /seasons/all/archetypes/?\n            Cookies: {'__cfduid': 'd67078c88ef7a1b7b8e081bc0e8e147dc1531891937', 'session': '.eJxlzMEKwjAQBNB_ybkYteCh5wqKglg_ICxJmgQ3m5JswCL-u16KgrfhMTNPASYGEh1VxEaYUHTKRgWzyDdhcs4aNdlcEv00IrukarGZINoFE1T2W1UY-GOiIHk9zMNhN843fOw37dWXC_Snc9uvj6IRf68M2Vn-TD3zVDopJ0s0m2zBjBUjuKBXOkWJge5SvN7e2Ebn.DjBidw.Bpmzf1ELoKcSdigA2lzNE4SyL9k'}\n            Endpoint: seasons.archetypes\n            View Args: {}\n            Person: None\n            Referrer: None\n            Request Data: {}\nHost: pennydreadfulmagic.com\nAccept-Encoding: gzip\nCf-Ipcountry: US\nX-Forwarded-For: 2600:3c01:0:0:f03c:91ff:fee4:537c, 172.68.141.168\nCf-Ray: 43c292b9eea493b4-SJC\nX-Forwarded-Proto: https\nCf-Visitor: {\"scheme\":\"https\"}\nUser-Agent: pennydreadfulmagic.com cache renewer\nAccept: */*\nCookie: __cfduid=d67078c88ef7a1b7b8e081bc0e8e147dc1531891937; session=.eJxlzMEKwjAQBNB_ybkYteCh5wqKglg_ICxJmgQ3m5JswCL-u16KgrfhMTNPASYGEh1VxEaYUHTKRgWzyDdhcs4aNdlcEv00IrukarGZINoFE1T2W1UY-GOiIHk9zMNhN843fOw37dWXC_Snc9uvj6IRf68M2Vn-TD3zVDopJ0s0m2zBjBUjuKBXOkWJge5SvN7e2Ebn.DjBidw.Bpmzf1ELoKcSdigA2lzNE4SyL9k\nCf-Connecting-Ip: 2600:3c01:0:0:f03c:91ff:fee4:537c\nX-Forwarded-Host: pennydreadfulmagic.com\nX-Forwarded-Server: pennydreadfulmagic.com\nConnection: Keep-Alive\n```\n"}}
{"actor":{"display_login":"vorpal-buildbot"}}