{"action":"opened","issue":{"url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/33759","repository_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports","labels_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/33759/labels{/name}","comments_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/33759/comments","events_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/33759/events","html_url":"https://github.com/PennyDreadfulMTG/perf-reports/issues/33759","id":354124160,"node_id":"MDU6SXNzdWUzNTQxMjQxNjA=","number":33759,"title":"Exceeded slow_query limit (19.6 > 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-08-26T20:03:40Z","updated_at":"2018-08-26T20:03:40Z","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, 19.6, mysql)\n\nReported on decksite by mysql-perf```\n            --------------------------------------------------------------------------------\n            Request Method: GET\n            Path: /seasons/all/archetypes/?\n            Cookies: {'__cfduid': 'dbbaeaf004b46114da480ca1ea67b1fe41519487476', 'hide_intro': 'True', '_ga': 'GA1.2.336853490.1519750417', 'session': '.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DmSVwA.bcruBNVTkB3fslclqgRrG691YHg', '_gid': 'GA1.2.420011529.1531413207', 'deck_id': '22410'}\n            Endpoint: seasons.archetypes\n            View Args: {}\n            Person: 195644917081440265\n            Referrer: None\n            Request Data: {}\nHost: pennydreadfulmagic.com\nAccept-Encoding: gzip\nCf-Ipcountry: FR\nX-Forwarded-For: 90.78.208.159, 108.162.229.132\nCf-Ray: 4508e6ac1db5bd65-CDG\nX-Forwarded-Proto: https\nCf-Visitor: {\"scheme\":\"https\"}\nUpgrade-Insecure-Requests: 1\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\nAccept-Language: en-US,en;q=0.9,es;q=0.8\nCookie: __cfduid=dbbaeaf004b46114da480ca1ea67b1fe41519487476; hide_intro=True; _ga=GA1.2.336853490.1519750417; session=.eJx1UMtuwjAQ_Jc9R5WdOIFwa-krFETpA0SrKnLjjbEwSWQ7LRTx73WQWqRKPc7OzM7u7IGLjapg4EyLAQhli9qIXAkYAE3jhLGU9kifMkbCJIYA_md0XXCNnsXqiKREkTdobF0d91EWBbBxss5bi6bim077ztdoXJp6R81btwpz67jrmCa-nt-vvrLJAxU8VDflKJlenketmutyvjnpXb32gYM98KJAa38wCDvZsueR1Io1ajyT2dPQluMleYnccmG8H7eNMmhz7vxtcRjTME3S6IwkaS_q0xPftZMQ1ickAIOlH61-Q8Lk8e52PB2S2cdVJsvPUVYg0b0FnRq5HfoQX2fjv3n1vWHlVLnzM9kqLSy8BXBck7tdJ4EL5AYNHAL4W5rjRqK_smq1PnwDU6SI9w.Dfj1kQ.6zIYF2Bw9YqqBtAVtkhDIFSf-AA; _gid=GA1.2.420011529.1531413207; deck_id=22410; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DmSVwA.bcruBNVTkB3fslclqgRrG691YHg\nCf-Connecting-Ip: 90.78.208.159\nX-Forwarded-Host: pennydreadfulmagic.com\nX-Forwarded-Server: pennydreadfulmagic.com\nConnection: Keep-Alive\n```\n"}}
{"actor":{"display_login":"vorpal-buildbot"}}