{"action":"created","issue":{"url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/42235","repository_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports","labels_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/42235/labels{/name}","comments_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/42235/comments","events_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/42235/events","html_url":"https://github.com/PennyDreadfulMTG/perf-reports/issues/42235","id":379964377,"node_id":"MDU6SXNzdWUzNzk5NjQzNzc=","number":42235,"title":"Exceeded slow_query limit (12.0 > 5.0) in mysql: ```SELECT COUNT(DISTINCT(deck_id)) AS c FROM (","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":958792189,"node_id":"MDU6TGFiZWw5NTg3OTIxODk=","url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/labels/decksite","name":"decksite","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":71,"created_at":"2018-11-12T21:44:32Z","updated_at":"2018-11-13T23:34:53Z","closed_at":null,"author_association":"NONE","body":"        WITH rule_card_count AS\n        (\n            SELECT\n                rule.id, COUNT(card) AS card_count\n            FROM\n                rule\n            JOIN\n                rule_card\n            ON\n                rule.id = rule_card.rule_id\n            WHERE\n                rule_card.include = TRUE\n            GROUP BY\n                rule.id\n        ),\n        candidates AS\n        (\n            SELECT\n                deck.id AS deck_id,\n                COUNT(DISTINCT deck_card.card) AS included_count,\n                MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function\n                rule.id AS rule_id\n            FROM\n                deck\n            JOIN\n                deck_card\n            ON\n                deck.id = deck_card.deck_id\n            JOIN\n                (\n                    SELECT\n                        *\n                    FROM\n                        rule_card\n                    WHERE\n                        include = TRUE\n                ) AS inclusions\n            ON\n                deck_card.card = inclusions.card\n            JOIN\n                rule\n            ON\n                rule.id = inclusions.rule_id\n            JOIN\n                rule_card_count\n            ON\n                rule.id = rule_card_count.id\n            WHERE\n                deck_card.sideboard = FALSE AND deck_card.n >= inclusions.n AND 1 = 1\n            GROUP BY\n                deck.id, rule.id\n            HAVING\n                included_count = required_count\n        )\n        SELECT\n            candidates.deck_id,\n            rule.id AS rule_id,\n            suggested_archetype.id AS archetype_id,\n            suggested_archetype.name AS archetype_name\n        FROM\n            candidates\n        INNER JOIN\n            rule\n        ON\n            candidates.rule_id = rule.id\n        JOIN\n            archetype AS suggested_archetype\n        ON\n            rule.archetype_id = suggested_archetype.id\n        LEFT JOIN\n            (\n                SELECT\n                    *\n                FROM\n                    rule_card\n                WHERE\n                    include = FALSE\n            ) AS exclusions\n        ON\n            candidates.rule_id = exclusions.rule_id\n        LEFT JOIN\n            deck_card\n        ON\n            candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card AND deck_card.n >= exclusions.n\n        GROUP BY\n            candidates.deck_id, rule_id\n        HAVING\n            COUNT(deck_card.card) = 0\n    ) AS applied_rules```\n\n```[]``` (slow_query, 12.0, mysql)\n\nReported on decksite by mysql-perf\n\n```\n            --------------------------------------------------------------------------------\n            Request Method: POST\n            Path: /admin/rules/?\n            Cookies: {'__cfduid': 'd88862542ea53594f209730f56d4312881528043629', '_ga': 'GA1.2.1479978537.1528043745', 'hide_intro': 'True', '_gid': 'GA1.2.809406100.1541797742', 'deck_id': '28843', 'session': '.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DsuFNg.sF0foLwh8ruL-FffA_iUuxCWdL4'}\n            Endpoint: post_rules\n            View Args: {}\n            Person: 280140312205197313\n            Referrer: https://pennydreadfulmagic.com/admin/rules/\n            Request Data: {'rule_id': '139', 'include': '3 Court Homunculus\\r\\n', 'exclude': '1 Tempered Steel\\r\\n1 Consulate Dreadnought\\r\\n1 Peacewalker Colossus\\r\\n1 Liquimetal Coating\\r\\n1 Squadron Hawk'}\nHost: pennydreadfulmagic.com\nAccept-Encoding: gzip\nCf-Ipcountry: GB\nX-Forwarded-For: 92.18.196.166, 162.158.34.96\nCf-Ray: 478c2ddfdc62bfea-MAN\nX-Forwarded-Proto: https\nCf-Visitor: {\"scheme\":\"https\"}\nCache-Control: max-age=0\nOrigin: https://pennydreadfulmagic.com\nUpgrade-Insecure-Requests: 1\nContent-Type: application/x-www-form-urlencoded\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\nReferer: https://pennydreadfulmagic.com/admin/rules/\nAccept-Language: en-GB,en-US;q=0.9,en;q=0.8\nCookie: __cfduid=d88862542ea53594f209730f56d4312881528043629; _ga=GA1.2.1479978537.1528043745; hide_intro=True; _gid=GA1.2.809406100.1541797742; deck_id=28843; session=.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DsuFNg.sF0foLwh8ruL-FffA_iUuxCWdL4\nCf-Connecting-Ip: 92.18.196.166\nX-Forwarded-Host: pennydreadfulmagic.com\nX-Forwarded-Server: pennydreadfulmagic.com\nConnection: Keep-Alive\nContent-Length: 173\n```\nLocation Hash: 4737361bbc93e1fd829ebd46bbdc9dacaa970a16\n"},"comment":{"url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/comments/438479587","html_url":"https://github.com/PennyDreadfulMTG/perf-reports/issues/42235#issuecomment-438479587","issue_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/42235","id":438479587,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODQ3OTU4Nw==","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},"created_at":"2018-11-13T23:34:53Z","updated_at":"2018-11-13T23:34:53Z","author_association":"NONE","body":"Exceeded slow_query limit (15.6 > 5.0) in mysql: ```SELECT COUNT(DISTINCT(deck_id)) AS c FROM (\n\n        WITH rule_card_count AS\n        (\n            SELECT\n                rule.id, COUNT(card) AS card_count\n            FROM\n                rule\n            JOIN\n                rule_card\n            ON\n                rule.id = rule_card.rule_id\n            WHERE\n                rule_card.include = TRUE\n            GROUP BY\n                rule.id\n        ),\n        candidates AS\n        (\n            SELECT\n                deck.id AS deck_id,\n                COUNT(DISTINCT deck_card.card) AS included_count,\n                MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function\n                rule.id AS rule_id\n            FROM\n                deck\n            JOIN\n                deck_card\n            ON\n                deck.id = deck_card.deck_id\n            JOIN\n                (\n                    SELECT\n                        *\n                    FROM\n                        rule_card\n                    WHERE\n                        include = TRUE\n                ) AS inclusions\n            ON\n                deck_card.card = inclusions.card\n            JOIN\n                rule\n            ON\n                rule.id = inclusions.rule_id\n            JOIN\n                rule_card_count\n            ON\n                rule.id = rule_card_count.id\n            WHERE\n                deck_card.sideboard = FALSE AND deck_card.n >= inclusions.n AND 1 = 1\n            GROUP BY\n                deck.id, rule.id\n            HAVING\n                included_count = required_count\n        )\n        SELECT\n            candidates.deck_id,\n            rule.id AS rule_id,\n            suggested_archetype.id AS archetype_id,\n            suggested_archetype.name AS archetype_name\n        FROM\n            candidates\n        INNER JOIN\n            rule\n        ON\n            candidates.rule_id = rule.id\n        JOIN\n            archetype AS suggested_archetype\n        ON\n            rule.archetype_id = suggested_archetype.id\n        LEFT JOIN\n            (\n                SELECT\n                    *\n                FROM\n                    rule_card\n                WHERE\n                    include = FALSE\n            ) AS exclusions\n        ON\n            candidates.rule_id = exclusions.rule_id\n        LEFT JOIN\n            deck_card\n        ON\n            candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card AND deck_card.n >= exclusions.n\n        GROUP BY\n            candidates.deck_id, rule_id\n        HAVING\n            COUNT(deck_card.card) = 0\n    ) AS applied_rules```\n\n```[]``` (slow_query, 15.6, mysql)\n\nReported on decksite by mysql-perf\n\n```\n            --------------------------------------------------------------------------------\n            Request Method: POST\n            Path: /admin/rules/?\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.DszvZQ.FE_ca1WOZR8Whk8MTvkbk7kSGf0', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}\n            Endpoint: post_rules\n            View Args: {}\n            Person: 195644917081440265\n            Referrer: https://pennydreadfulmagic.com/admin/rules/\n            Request Data: {'archetype_id': '59'}\nHost: pennydreadfulmagic.com\nAccept-Encoding: gzip\nCf-Ipcountry: US\nX-Forwarded-For: 136.25.151.189, 172.68.141.228\nCf-Ray: 47950cd19d6192dc-SJC\nX-Forwarded-Proto: https\nCf-Visitor: {\"scheme\":\"https\"}\nCache-Control: max-age=0\nOrigin: https://pennydreadfulmagic.com\nUpgrade-Insecure-Requests: 1\nContent-Type: application/x-www-form-urlencoded\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\nReferer: https://pennydreadfulmagic.com/admin/rules/\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.929041383.1541262584; deck_id=28642; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DszvZQ.FE_ca1WOZR8Whk8MTvkbk7kSGf0\nCf-Connecting-Ip: 136.25.151.189\nX-Forwarded-Host: pennydreadfulmagic.com\nX-Forwarded-Server: pennydreadfulmagic.com\nConnection: Keep-Alive\nContent-Length: 15\n```\nLocation Hash: 4737361bbc93e1fd829ebd46bbdc9dacaa970a16\n\n\nLabels: decksite"}}
{"actor":{"display_login":"vorpal-buildbot"}}