{"action":"opened","issue":{"url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/38752","repository_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports","labels_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/38752/labels{/name}","comments_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/38752/comments","events_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/38752/events","html_url":"https://github.com/PennyDreadfulMTG/perf-reports/issues/38752","id":365652932,"node_id":"MDU6SXNzdWUzNjU2NTI5MzI=","number":38752,"title":"Exceeded slow_query limit (11.0 > 5.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-10-01T21:35:24Z","updated_at":"2018-10-01T21:35:24Z","closed_at":null,"author_association":"NONE","body":"        CREATE TABLE IF NOT EXISTS _new_matchup_stats (\n            archetype_id INT NOT NULL,\n            opponent_archetype_id INT NOT NULL,\n            season_id INT NOT NULL,\n            wins INT NOT NULL,\n            losses INT NOT NULL,\n            draws INT NOT NULL,\n            PRIMARY KEY (season_id, archetype_id, opponent_archetype_id),\n            FOREIGN KEY (season_id) REFERENCES season (id) ON UPDATE CASCADE ON DELETE CASCADE,\n            FOREIGN KEY (archetype_id) REFERENCES archetype (id) ON UPDATE CASCADE ON DELETE CASCADE,\n            FOREIGN KEY (opponent_archetype_id) REFERENCES archetype (id) ON UPDATE CASCADE ON DELETE CASCADE\n        ) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci AS\n        SELECT\n            a.id AS archetype_id,\n            oa.id AS opponent_archetype_id,\n            season.id AS season_id,\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            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        GROUP BY\n            a.id,\n            oa.id,\n            season.id\n    ```\n\n```[]``` (slow_query, 11.0, mysql)\n\nReported on decksite by mysql-perf```\n            --------------------------------------------------------------------------------\n            Request Method: GET\n            Path: /archetypes/3/?locale=it\n            Cookies: {}\n            Endpoint: archetype\n            View Args: {'archetype_id': '3'}\n            Person: logged_out\n            Referrer: None\n            Request Data: {}\nHost: pennydreadfulmagic.com\nAccept-Encoding: gzip\nCf-Ipcountry: RU\nX-Forwarded-For: 93.158.166.151, 172.68.11.139\nCf-Ray: 46320ec1da958fd5-DME\nX-Forwarded-Proto: https\nCf-Visitor: {\"scheme\":\"https\"}\nUser-Agent: Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)\nFrom: support@search.yandex.ru\nAccept: */*\nAccept-Language: en, *;q=0.01\nCf-Connecting-Ip: 93.158.166.151\nX-Forwarded-Host: pennydreadfulmagic.com\nX-Forwarded-Server: pennydreadfulmagic.com\nConnection: Keep-Alive\n```\n"}}
{"actor":{"display_login":"vorpal-buildbot"}}