Closed vorpal-buildbot closed 5 years ago
Exceeded slow_query limit (5.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
Cookies: {'__cfduid': 'd88862542ea53594f209730f56d4312881528043629', '_ga': 'GA1.2.1479978537.1528043745', 'hide_intro': 'True', '_gid': 'GA1.2.809406100.1541797742', '_gat_gtag_UA_109131120_1': '1', 'session': '.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DseWVw.kiYxVOnx5lI4qZ87LJnuRcqudG4'}
Endpoint: post_rules
View Args: {}
Person: 280140312205197313
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '75', 'include': 'Temur Ascendancy\r\n', 'exclude': 'Prophet of Kruphix'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: GB
X-Forwarded-For: 92.18.199.175, 162.158.155.52
Cf-Ray: 477396afef646b73-LHR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: __cfduid=d88862542ea53594f209730f56d4312881528043629; _ga=GA1.2.1479978537.1528043745; hide_intro=True; _gid=GA1.2.809406100.1541797742; _gat_gtag_UA_109131120_1=1; session=.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DseWVw.kiYxVOnx5lI4qZ87LJnuRcqudG4
Cf-Connecting-Ip: 92.18.199.175
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 68
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (7.5 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 7.5, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DseY5w.bzLd-GfUu5PZqA50XyiZ1gqIpz0', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '100', 'include': 'Salvage Titan', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.142.121
Cf-Ray: 4773a6924e156c9a-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DseY5w.bzLd-GfUu5PZqA50XyiZ1gqIpz0; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 42
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.8 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.8, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DseZBA.A4Us2C46h_bSu49cwOu96VVvEuk', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '99', 'include': 'Runeflare Trap', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.142.121
Cf-Ray: 4773a6b8db116c9a-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DseZBA.A4Us2C46h_bSu49cwOu96VVvEuk
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 42
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (7.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 7.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsehRg.BzsSs49DZ47yWp2aQA55C0i_ZvY', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '100', 'include': 'Salvage Titan\r\n', 'exclude': 'Metalwork Colossus'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.223
Cf-Ray: 4773db247d3b93ba-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DsehRg.BzsSs49DZ47yWp2aQA55C0i_ZvY
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 66
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (7.9 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 7.9, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
Cookies: {'__cfduid': 'd88862542ea53594f209730f56d4312881528043629', '_ga': 'GA1.2.1479978537.1528043745', 'hide_intro': 'True', '_gid': 'GA1.2.809406100.1541797742', 'session': '.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DsehKQ.yrc2Ltzv9Yhe6OF5zfCR-N4gI-Y'}
Endpoint: post_rules
View Args: {}
Person: 280140312205197313
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'archetype_id': '140'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: GB
X-Forwarded-For: 92.18.199.175, 162.158.158.35
Cf-Ray: 4773db1e8c346ac7-LHR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: __cfduid=d88862542ea53594f209730f56d4312881528043629; _ga=GA1.2.1479978537.1528043745; hide_intro=True; _gid=GA1.2.809406100.1541797742; session=.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DsehKQ.yrc2Ltzv9Yhe6OF5zfCR-N4gI-Y
Cf-Connecting-Ip: 92.18.199.175
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 16
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.6 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.6, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
Cookies: {'__cfduid': 'd88862542ea53594f209730f56d4312881528043629', '_ga': 'GA1.2.1479978537.1528043745', 'hide_intro': 'True', '_gid': 'GA1.2.809406100.1541797742', 'session': '.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.Dsenew.seOCWZGGN3iBKbpe_W3q7x8Un0E'}
Endpoint: post_rules
View Args: {}
Person: 280140312205197313
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '10', 'include': 'Tempered Steel\r\n', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: GB
X-Forwarded-For: 92.18.199.175, 162.158.158.35
Cf-Ray: 477401f8b8e86ac7-LHR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: __cfduid=d88862542ea53594f209730f56d4312881528043629; _ga=GA1.2.1479978537.1528043745; hide_intro=True; _gid=GA1.2.809406100.1541797742; session=.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.Dsenew.seOCWZGGN3iBKbpe_W3q7x8Un0E
Cf-Connecting-Ip: 92.18.199.175
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 48
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (7.0 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 7.0, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
Cookies: {'__cfduid': 'd88862542ea53594f209730f56d4312881528043629', '_ga': 'GA1.2.1479978537.1528043745', 'hide_intro': 'True', '_gid': 'GA1.2.809406100.1541797742', '_gat_gtag_UA_109131120_1': '1', 'session': '.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.Dsepjg.eDoJjHtF9kVkDBwZBLDHjHFNVJU'}
Endpoint: post_rules
View Args: {}
Person: 280140312205197313
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '114', 'include': 'Veteran Motorist', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: GB
X-Forwarded-For: 92.18.199.175, 141.101.99.229
Cf-Ray: 47740ea9b8c26b55-LHR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: __cfduid=d88862542ea53594f209730f56d4312881528043629; _ga=GA1.2.1479978537.1528043745; hide_intro=True; _gid=GA1.2.809406100.1541797742; _gat_gtag_UA_109131120_1=1; session=.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.Dsepjg.eDoJjHtF9kVkDBwZBLDHjHFNVJU
Cf-Connecting-Ip: 92.18.199.175
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 45
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (7.8 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 7.8, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsepkg.V5lOy_OoScyr1MxkSRthAOSiY9A', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '77', 'include': 'Precinct Captain\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.223
Cf-Ray: 47740e94ea1193ba-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.Dsepkg.V5lOy_OoScyr1MxkSRthAOSiY9A
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 224
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (14.0 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 14.0, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsepkg.V5lOy_OoScyr1MxkSRthAOSiY9A', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '78', 'include': 'Soldier of the Pantheon\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader\r\n'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.223
Cf-Ray: 47740ed04e5893ba-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.Dsepkg.V5lOy_OoScyr1MxkSRthAOSiY9A
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 237
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (14.7 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 14.7, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsepkg.V5lOy_OoScyr1MxkSRthAOSiY9A', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '52', 'include': 'Burst Lightning\r\n', 'exclude': 'Plains\r\nIsland\r\nSwamp\r\nForest\r\nWildfire\r\nBurning of Xinye\r\nQuest for Pure Flame\r\nVolt Charge\r\nCloudpost\r\nRites of Initiation\r\nDragonstorm\r\nDevastating Dreams\r\nIncandescent Soulstoke\r\nRivalry\r\nFanatic of Mogis\r\nQuest for the Goblin Lord\r\nMyr Incubator'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.223
Cf-Ray: 47740f46abeb93ba-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.Dsepkg.V5lOy_OoScyr1MxkSRthAOSiY9A
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 363
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.2 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.2, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsesmA.Vvczj6fY2TD-3T49to3aMudl5eU', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '29', 'include': 'Cephalid Illusionist\r\nHermit Druid\r\n', 'exclude': 'Necrotic Ooze\r\nPeregrine Drake'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.223
Cf-Ray: 477427727e7493ba-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsesmA.Vvczj6fY2TD-3T49to3aMudl5eU
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 106
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.5 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.5, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsesmA.Vvczj6fY2TD-3T49to3aMudl5eU', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '66', 'include': 'Tendrils of Agony\r\nIsland\r\nForest\r\nSwamp\r\n', 'exclude': 'Mountain\r\nPlains\r\nPeregrine Drake'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.223
Cf-Ray: 4774280e7ccc93ba-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsesmA.Vvczj6fY2TD-3T49to3aMudl5eU
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 127
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (6.2 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 6.2, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsewcg.MWQlsJUoQT1EwNHQxX52RbiJ_P4', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '76', 'include': 'Smokestack\r\n', 'exclude': 'Gift of Immortality\r\nRofellos, Llanowar Emissary\r\nBurning of Xinye\r\nWildfire\r\nTempered Steel\r\nMist of Stagnation\r\nNecropotence\r\n'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.223
Cf-Ray: 477439b0192f93ba-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.Dsewcg.MWQlsJUoQT1EwNHQxX52RbiJ_P4; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 202
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsezCg.YTv95bJwyQDQTd97tXSwDy6TEoo', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '17', 'include': 'Horror of the Broken Lands\r\nVile Manifestation\r\nAnimate Dead\r\n', 'exclude': 'Island'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.223
Cf-Ray: 47744ba7bb0593ba-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsezCg.YTv95bJwyQDQTd97tXSwDy6TEoo
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 108
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (6.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 6.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
Cookies: {'__cfduid': 'd88862542ea53594f209730f56d4312881528043629', '_ga': 'GA1.2.1479978537.1528043745', 'hide_intro': 'True', '_gid': 'GA1.2.809406100.1541797742', 'session': '.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DsgewA.pCbZUQgcBY7kygCPKGicE-ey3Zo', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 280140312205197313
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'archetype_id': '144'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: GB
X-Forwarded-For: 92.18.199.175, 141.101.107.122
Cf-Ray: 4776eba9af616b73-LHR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: __cfduid=d88862542ea53594f209730f56d4312881528043629; _ga=GA1.2.1479978537.1528043745; hide_intro=True; _gid=GA1.2.809406100.1541797742; session=.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DsgewA.pCbZUQgcBY7kygCPKGicE-ey3Zo; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 92.18.199.175
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 16
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.2 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.2, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
Cookies: {'__cfduid': 'd88862542ea53594f209730f56d4312881528043629', '_ga': 'GA1.2.1479978537.1528043745', 'hide_intro': 'True', '_gid': 'GA1.2.809406100.1541797742', 'session': '.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DsgfGA.BdwZJRmPdYmUNj2O2IKLcBE7MGA', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 280140312205197313
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '122', 'include': 'Carrier Thrall\r\nButcher of the Horde', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: GB
X-Forwarded-For: 92.18.199.175, 141.101.107.122
Cf-Ray: 4776ed0069866b73-LHR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: __cfduid=d88862542ea53594f209730f56d4312881528043629; _ga=GA1.2.1479978537.1528043745; hide_intro=True; _gid=GA1.2.809406100.1541797742; session=.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DsgfGA.BdwZJRmPdYmUNj2O2IKLcBE7MGA; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 92.18.199.175
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 69
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (9.0 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 9.0, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DshyNw.OEOdTNTVWpw3iWKNyWzcgxylYkg', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '77', 'include': 'Precinct Captain\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader\r\nPearlspear Courier\r\n\r\n'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 4778f5b2ace86d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DshyNw.OEOdTNTVWpw3iWKNyWzcgxylYkg
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 260
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (10.6 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 10.6, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DshyNw.OEOdTNTVWpw3iWKNyWzcgxylYkg', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '78', 'include': 'Soldier of the Pantheon\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader\r\nPearlspear Courier\r\n\r\n'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 4778f5c46abb6d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DshyNw.OEOdTNTVWpw3iWKNyWzcgxylYkg
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 267
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.7 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.7, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DshzEQ.rl1vZLHi0vUtHRJZfCl571EKjy0', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '118', 'include': 'Rampant Growth\r\nArtisan of Kozilek\r\n', 'exclude': 'Cloudpost\r\nRofellos, Llanowar Emissary\r\nCoalition Victory\r\nGrowing Ranks\r\nBattle of Wits\r\nCall the Bloodline\r\nVillainous Wealth\r\n'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 4778f9fa6bf16d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DshzEQ.rl1vZLHi0vUtHRJZfCl571EKjy0
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 232
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.7 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.7, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DshzEQ.rl1vZLHi0vUtHRJZfCl571EKjy0', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '119', 'include': 'Cultivate\r\nSylvan Primordial\r\n', 'exclude': 'Temur Ascendancy\r\nVillainous Wealth'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 4778fa066f306d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DshzEQ.rl1vZLHi0vUtHRJZfCl571EKjy0
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 106
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.2 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.2, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DshznA.H47LrCL0NqwR0QalyENk2-bd8c4', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '76', 'include': 'Smokestack\r\n', 'exclude': 'Gift of Immortality\r\nRofellos, Llanowar Emissary\r\nBurning of Xinye\r\nWildfire\r\nTempered Steel\r\nMist of Stagnation\r\nNecropotence\r\nAbzan Ascendancy\r\n'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 4778fe2379076d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DshznA.H47LrCL0NqwR0QalyENk2-bd8c4
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 224
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.5 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.5, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dshz5Q.POJ0l-XM14qbecWjRSSJfdgTNnU', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '56', 'include': 'Demonic Rising\r\n', 'exclude': 'Battle of Wits\r\nPhylactery Lich\r\nCurse of Thirst\r\nCruel Ultimatum\r\n'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 477900457a4e6d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.Dshz5Q.POJ0l-XM14qbecWjRSSJfdgTNnU
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 131
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.3 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.3, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsh0ww.xZcPNqA2_ZN1eV1pelF1UoCiXms', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '13', 'include': 'Nest of Scarabs\r\n', 'exclude': 'Immortal Servitude'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 47790468a8726d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.Dsh0ww.xZcPNqA2_ZN1eV1pelF1UoCiXms
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 67
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsh12Q.6UHGwIH3b6UK0X48RiJ-Xo1ogWs', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '72', 'include': 'Selvala, Explorer Returned\r\nYosei, the Morning Star\r\n', 'exclude': 'Biovisionary\r\nIce Storm'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 47790c07db276d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.Dsh12Q.6UHGwIH3b6UK0X48RiJ-Xo1ogWs
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 120
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsh12Q.6UHGwIH3b6UK0X48RiJ-Xo1ogWs', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'archetype_id': '171'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 47790c5f19196d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.Dsh12Q.6UHGwIH3b6UK0X48RiJ-Xo1ogWs
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 16
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.8 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.8, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsh6_w.sExvuzjZRGhRldhgMJHw1PUYI1A', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '78', 'include': 'Soldier of the Pantheon\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader\r\nPearlspear Courier\r\nElixir of Immortality'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 47792bda8a856d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.Dsh6_w.sExvuzjZRGhRldhgMJHw1PUYI1A
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 282
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (6.0 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 6.0, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsh9Lg.q_AVRhwW_cdl7oVbwMV08e6NfwM', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '41', 'include': 'Paradox Haze\r\nReality Strobe\r\nChronomantic Escape', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 47793af80b416d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.Dsh9Lg.q_AVRhwW_cdl7oVbwMV08e6NfwM
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 85
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.7 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.7, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsh9Lg.q_AVRhwW_cdl7oVbwMV08e6NfwM', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '41', 'include': 'Paradox Haze\r\nReality Strobe\r\nChronomantic Escape', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 47793b059fce6d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.Dsh9Lg.q_AVRhwW_cdl7oVbwMV08e6NfwM
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 85
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.9 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.9, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiFZw.pGvkHZH9wT5Jn61Q1ZAZg7ObezA', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '77', 'include': 'Precinct Captain\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader\r\nPearlspear Courier\r\nElixir of Immortality\r\nGempalm Avenger'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 47796d3f4c886d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiFZw.pGvkHZH9wT5Jn61Q1ZAZg7ObezA; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 296
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.7 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.7, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiFZw.pGvkHZH9wT5Jn61Q1ZAZg7ObezA', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '78', 'include': 'Soldier of the Pantheon\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader\r\nPearlspear Courier\r\nElixir of Immortality\r\nGempalm Avenger'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.141.228
Cf-Ray: 47796d59087c6d72-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiFZw.pGvkHZH9wT5Jn61Q1ZAZg7ObezA; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 303
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.2 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.2, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiLQg.Pn_JU_D9IW3rcWWsMbm9wc9j1HA', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '48', 'include': 'Villainous Wealth\r\n', 'exclude': 'Battle of Wits\r\nUmbral Mantle\r\nHorde of Notions\r\nWorldgorger Dragon\r\nBiovisionary\r\nCruel Ultimatum\r\nRosheen Meanderer\r\nLegacy Weapon\r\n'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 4779920f6f3e93d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiLQg.Pn_JU_D9IW3rcWWsMbm9wc9j1HA
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 217
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (6.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 6.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiMJA.iKUtD9LQC3g_dFoGBXg9MjjuUZg', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'archetype_id': '75'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 477996931db693d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DsiMJA.iKUtD9LQC3g_dFoGBXg9MjjuUZg
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 15
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.1 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.1, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiMJA.iKUtD9LQC3g_dFoGBXg9MjjuUZg', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'archetype_id': '75'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 4779969fbd0593d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DsiMJA.iKUtD9LQC3g_dFoGBXg9MjjuUZg
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 15
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (8.9 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 8.9, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiMJA.iKUtD9LQC3g_dFoGBXg9MjjuUZg', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '13', 'include': 'Nest of Scarabs\r\n', 'exclude': 'Immortal Servitude\r\nPlague Stinger'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 477996e9ed1a93d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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; _gat_gtag_UA_109131120_1=1; session=.eJx1kNtuwjAQRP9ln6PKTpxAeGvpDQqiVxCtqsiNN8bCuch2Wiji3-sgUaRKfZyd2R377CBr0JS8wsrBwJkWA-CiVNVRCGXz2ohMCRgATeOEsZT2SJ8yRsIkhgD-d3Sdc43exeqgpETR1dm6OtyjLAqgdLLOWoum4mWX_eBrNC5N_UbNW7cKM-u465wmvp7fr75H00cqeKhuinEyuzyPWjXXxbw85V299oWDHfA8R2uPGoSdbtjLWGrFGjV5kKPnoS0mS_IaueXC-H3cNMqgzbhHQeMwpmGapNEZSdJe1Kcnv6OTENYnJACDhR-tfkvC5OnudjIbkofPq5EsvsajHInuLejMyM3Ql3icjf_Nm-fmmati62eyVVpYeA_gcCZz2y4CF8gNGtgH8Bea40aif2XVar3_Abpoj4o.DsiMJA.iKUtD9LQC3g_dFoGBXg9MjjuUZg
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 87
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.7 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.7, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiMew.nwjnOiu_dg-yqkoEJP8o90vXQxU', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'archetype_id': '145'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 477998f87fe593d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiMew.nwjnOiu_dg-yqkoEJP8o90vXQxU
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 16
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (8.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 8.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiMug.TdaZ37SevgjRW-AkR2Q6rUuW_9I', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '129', 'include': 'Rot Wolf', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 47799a365cd293d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiMug.TdaZ37SevgjRW-AkR2Q6rUuW_9I; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 37
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (6.9 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 6.9, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiMug.TdaZ37SevgjRW-AkR2Q6rUuW_9I', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642', '_gat_gtag_UA_109131120_1': '1'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '130', 'include': 'Ichor Rats', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 47799a521d1893d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiMug.TdaZ37SevgjRW-AkR2Q6rUuW_9I; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 39
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.5 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.5, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiNMQ.MhOy1uwGRKmcIIVTrsNnJSXQM5Q', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '77', 'include': 'Precinct Captain\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader\r\nPearlspear Courier\r\nElixir of Immortality\r\nGempalm Avenger\r\nArgentum Armor'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 47799f45ea9093d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiNMQ.MhOy1uwGRKmcIIVTrsNnJSXQM5Q
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 316
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (7.3 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 7.3, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiNMQ.MhOy1uwGRKmcIIVTrsNnJSXQM5Q', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '78', 'include': 'Soldier of the Pantheon\r\n', 'exclude': 'Odric, Lunarch Marshal\r\nPreeminent Captain\r\nTempered Steel\r\nFavored Hoplite\r\nSwamp\r\nIsland\r\nMountain\r\nForest\r\nSmokestack\r\nAysen Crusader\r\nPearlspear Courier\r\nElixir of Immortality\r\nGempalm Avenger\r\nArgentum Armor'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 47799f5ccb4093d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiNMQ.MhOy1uwGRKmcIIVTrsNnJSXQM5Q
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 323
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (8.7 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 8.7, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiNMQ.MhOy1uwGRKmcIIVTrsNnJSXQM5Q', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'archetype_id': '128'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 47799f99ccbf93d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiNMQ.MhOy1uwGRKmcIIVTrsNnJSXQM5Q
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 16
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (6.0 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 6.0, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiPkA.unwkVNvXkwaIjz5p9FrGCgeQKxA', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '124', 'include': 'Vizier of Remedies\r\nBloodthrone Vampire\r\n', 'exclude': 'Butcher of the Horde\r\nForest\r\nIsland\r\nMountain\r\nAbzan Charm\r\nUlvenwald Mysteries'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 4779ad91bde693d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiPkA.unwkVNvXkwaIjz5p9FrGCgeQKxA
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 178
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (7.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 7.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiQfw.z8hZxvri22hlOU5UkeBkqGSPXS4', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '28', 'include': 'Felidar Guardian\r\nParallax Wave\r\n', 'exclude': 'Hypergenesis\r\nReality Acid\r\nSéance\r\nBloodthrone Vampire\r\nBraids, Cabal Minion'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 162.158.255.6
Cf-Ray: 4779b31e7c6893d2-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiQfw.z8hZxvri22hlOU5UkeBkqGSPXS4
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 169
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.4 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.4, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiQfw.z8hZxvri22hlOU5UkeBkqGSPXS4', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '112', 'include': 'Fleecemane Lion\r\n', 'exclude': 'Island\r\nSwamp\r\nMountain\r\nRecurring Nightmare\r\nSunbond\r\nDubious Challenge\r\nWoolly Thoctar\r\nUtter End\r\nDemonic Consultation'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.127
Cf-Ray: 4779eb7478326c46-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiQfw.z8hZxvri22hlOU5UkeBkqGSPXS4
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 203
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.2 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.2, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsijQg.lrBZeKx2B5x8ERIBGzWH5hzC1rY', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '65', 'include': 'Swamp\r\nIsland\r\nTendrils of Agony\r\n', 'exclude': 'Forest\r\nPlains\r\nMountain\r\nPeregrine Drake\r\nLeave // Chance'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.127
Cf-Ray: 477a271eeef66c46-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsijQg.lrBZeKx2B5x8ERIBGzWH5hzC1rY
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 152
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.2 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.2, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsijpA.Ng59qttJ_VtfMQ_dGSbiUpYORIQ', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '13', 'include': 'Nest of Scarabs\r\n', 'exclude': 'Immortal Servitude\r\nPlague Stinger\r\nHand of the Praetors\r\nReaper of Sheoldred'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.127
Cf-Ray: 477a2a157ebe6c46-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsijpA.Ng59qttJ_VtfMQ_dGSbiUpYORIQ
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 138
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (9.7 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 9.7, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsimaQ.4h3RWZVQklPqX42R9hzFomL5Liw', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'archetype_id': '146'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.127
Cf-Ray: 477a40028e746c46-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsimaQ.4h3RWZVQklPqX42R9hzFomL5Liw
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 16
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.1 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.1, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.Dsio_Q.wIbmENZ-QAMK3DNzf1s2z9KocjQ', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '75', 'include': 'Temur Ascendancy\r\n', 'exclude': 'Prophet of Kruphix\r\nWarp World\r\nArtisan of Kozilek\r\nSigil of the Empty Throne'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.127
Cf-Ray: 477a5101ecbc6c46-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.Dsio_Q.wIbmENZ-QAMK3DNzf1s2z9KocjQ
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 139
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (5.9 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 5.9, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsirLg.KXcl2vhsTb2JEqA2O0h4oGbqyhQ', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '74', 'include': 'Preeminent Captain\r\n', 'exclude': 'Wizened Cenn\r\nWilt-Leaf Cavaliers'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.127
Cf-Ray: 477a60066d636c46-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsirLg.KXcl2vhsTb2JEqA2O0h4oGbqyhQ
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 89
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
Exceeded slow_query limit (6.0 > 5.0) in mysql: ```
SELECT
deck_id,
GROUP_CONCAT(archetype_name) AS concat_archetypes
FROM
(
WITH rule_card_count AS
(
SELECT
rule.id, COUNT(card) AS card_count
FROM
rule
JOIN
rule_card
ON
rule.id = rule_card.rule_id
WHERE
rule_card.include = TRUE
GROUP BY
rule.id
),
candidates AS
(
SELECT
deck.id AS deck_id,
COUNT(DISTINCT deck_card.card) AS included_count,
MAX(rule_card_count.card_count) AS required_count,-- fake MAX due to aggregate function
rule.id AS rule_id
FROM
deck
JOIN
deck_card
ON
deck.id = deck_card.deck_id
JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = TRUE
) AS inclusions
ON
deck_card.card = inclusions.card
JOIN
rule
ON
rule.id = inclusions.rule_id
JOIN
rule_card_count
ON
rule.id = rule_card_count.id
WHERE
deck_card.sideboard = FALSE AND 1 = 1
GROUP BY
deck.id, rule.id
HAVING
included_count = required_count
)
SELECT
candidates.deck_id,
rule.id AS rule_id,
suggested_archetype.id AS archetype_id,
suggested_archetype.name AS archetype_name
FROM
candidates
INNER JOIN
rule
ON
candidates.rule_id = rule.id
JOIN
archetype AS suggested_archetype
ON
rule.archetype_id = suggested_archetype.id
LEFT JOIN
(
SELECT
*
FROM
rule_card
WHERE
include = FALSE
) AS exclusions
ON
candidates.rule_id = exclusions.rule_id
LEFT JOIN
deck_card
ON
candidates.deck_id = deck_card.deck_id AND exclusions.card = deck_card.card
GROUP BY
candidates.deck_id, rule_id
HAVING
COUNT(deck_card.card) = 0
) AS applied_rules
GROUP BY
deck_id
HAVING
COUNT(DISTINCT archetype_id) > 1
```
[]
(slow_query, 6.0, mysql)
Reported on decksite by mysql-perf
--------------------------------------------------------------------------------
Request Method: POST
Path: /admin/rules/?
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.DsiweQ.N-LmWs_sUJdp7e6c64zgALEQ4cU', '_gid': 'GA1.2.929041383.1541262584', 'deck_id': '28642'}
Endpoint: post_rules
View Args: {}
Person: 195644917081440265
Referrer: https://pennydreadfulmagic.com/admin/rules/
Request Data: {'rule_id': '135', 'include': 'Bassara Tower Archer', 'exclude': ''}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 136.25.151.189, 172.68.132.127
Cf-Ray: 477a7a17b9926c46-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Origin: https://pennydreadfulmagic.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-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
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/admin/rules/
Accept-Language: en-US,en;q=0.9,es;q=0.8
Cookie: __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.DsiweQ.N-LmWs_sUJdp7e6c64zgALEQ4cU
Cf-Connecting-Ip: 136.25.151.189
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 49
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5
Labels: decksite
[]
(slow_query, 7.3, mysql)Reported on decksite by mysql-perf
Location Hash: 8c48d4d980b16bfc55d38abcd3a4b890aa9c05d5