Open vorpal-buildbot opened 5 months ago
Exceeded slow_query limit (1.1 > 1.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name,
COUNT(*) OVER () AS total
FROM
deck AS d
LEFT JOIN
competition AS c ON d.competition_id = c.id
LEFT JOIN
competition_series AS cs ON cs.id = c.competition_series_id
LEFT JOIN
competition_type AS ct ON ct.id = cs.competition_type_id
LEFT JOIN
deck_cache AS cache ON d.id = cache.deck_id
LEFT JOIN deck_cache AS season ON d.id = season.deck_id
WHERE
(TRUE) AND (
d.retired
OR
IFNULL(ct.name, '') <> 'League'
OR
IFNULL(cache.wins, 0) + IFNULL(cache.draws, 0) + IFNULL(cache.losses, 0) >= 5
OR
c.end_date < UNIX_TIMESTAMP(NOW())
OR d.person_id = 8786) AND (d.archetype_id IN (SELECT descendant FROM archetype_closure WHERE ancestor = 3)) AND (TRUE)
GROUP BY
d.id,
d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
season.season_id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
HAVING
TRUE
ORDER BY
cache.active_date DESC, d.finish ASC, cache.active_date DESC
LIMIT 0, 100
```
[]
(slow_query, 1.1, mysql)
Reported on decksite by mysql-perf
Location Hash: 179ff7efaba83d4e8eeb45920b4be4a13395dbbe
Labels: decksite
[]
(slow_query, 3.7, mysql)Reported on decksite by mysql-perf
Location Hash: 179ff7efaba83d4e8eeb45920b4be4a13395dbbe
Request Data
``` Request Method: GET Path: /api/decks/?achievementKey=&archetypeId=3&cardName=&competitionId=&competitionFlagId=&deckType=all&page=0&pageSize=100&personId=&q=&seasonId=0 Cookies: ImmutableMultiDict([('hide_intro', 'True'), ('session', '.eJx1UctuwjAQ_BefU-QYYkJv0IdoKfRBCyhVFbnJJoQmdurYNID4926QgEPVm2d2Z2d3vCNhCboQEqQhl0ZbcIiIi0weQQxFVqj4BLMqUjoOM2SI6_cY7fhdSrnncur2GDl35CoSOWAXyIu3KRb-l2QyTG2Wn0xylaYQN4tVSh6sXMqZQwqTqtBWoKUomsmRijch6pWwZsnCygjT0DFn49fAG7fLYCV79jN_sZGA5G7aGdTB7Nxv1BfgnTsiogiq6ohJfzbK191hvzMpaxiBXRXz-f3D0_p6FGzVGvVQl5mGKhQYmcvbjHLe6Xotxtq-T_1zvUmR47WUOkRDgtTyZBL8LAaPlpeL7-HidpF8Pw-j-mbrLtnEg6sSTTDFEq95x9zwb7Jkg9whper0aK0UWnw45DA0NJtGQAYgNGiyd8ifAI3QKeDS0ub5_hfvY6Qe.Zib1RQ.b67hYGrzVIq2rfC70p2RagNUn8s'), ('session', '.eJx1UctuwjAQ_BefU-QYYkJv0IdoKfRBCyhVFbnJJoQmdurYNID4926QgEPVm2d2Z2d3vCNhCboQEqQhl0ZbcIiIi0weQQxFVqj4BLMqUjoOM2SI6_cY7fhdSrnncur2GDl35CoSOWAXyIu3KRb-l2QyTG2Wn0xylaYQN4tVSh6sXMqZQwqTqtBWoKUomsmRijch6pWwZsnCygjT0DFn49fAG7fLYCV79jN_sZGA5G7aGdTB7Nxv1BfgnTsiogiq6ohJfzbK191hvzMpaxiBXRXz-f3D0_p6FGzVGvVQl5mGKhQYmcvbjHLe6Xotxtq-T_1zvUmR47WUOkRDgtTyZBL8LAaPlpeL7-HidpF8Pw-j-mbrLtnEg6sSTTDFEq95x9zwb7Jkg9whper0aK0UWnw45DA0NJtGQAYgNGiyd8ifAI3QKeDS0ub5_hfvY6Qe.Zklp3w.BjXgYpIDETeVqgPnzAWfF_SfC3A'), ('page_size', '100'), ('views', '134')]) Endpoint: decks_api View Args: {} Person: 189204870065160192 Referrer: https://pennydreadfulmagic.com/seasons/all/archetypes/control/ Request Data: {} Host: pennydreadfulmagic.com Connection: Keep-Alive Accept-Encoding: gzip, br X-Forwarded-For: 184.64.168.181 Cf-Ray: 8860cd571bb62d60-YVR X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Sec-Ch-Ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99" Accept: application/json, text/plain, */* Sec-Ch-Ua-Mobile: ?0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Sec-Ch-Ua-Platform: "Windows" Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: https://pennydreadfulmagic.com/seasons/all/archetypes/control/ Accept-Language: en-US,en;q=0.9,es;q=0.8,en-GB;q=0.7 Priority: u=1, i Cookie: hide_intro=True; session=.eJx1UctuwjAQ_BefU-QYYkJv0IdoKfRBCyhVFbnJJoQmdurYNID4926QgEPVm2d2Z2d3vCNhCboQEqQhl0ZbcIiIi0weQQxFVqj4BLMqUjoOM2SI6_cY7fhdSrnncur2GDl35CoSOWAXyIu3KRb-l2QyTG2Wn0xylaYQN4tVSh6sXMqZQwqTqtBWoKUomsmRijch6pWwZsnCygjT0DFn49fAG7fLYCV79jN_sZGA5G7aGdTB7Nxv1BfgnTsiogiq6ohJfzbK191hvzMpaxiBXRXz-f3D0_p6FGzVGvVQl5mGKhQYmcvbjHLe6Xotxtq-T_1zvUmR47WUOkRDgtTyZBL8LAaPlpeL7-HidpF8Pw-j-mbrLtnEg6sSTTDFEq95x9zwb7Jkg9whper0aK0UWnw45DA0NJtGQAYgNGiyd8ifAI3QKeDS0ub5_hfvY6Qe.Zib1RQ.b67hYGrzVIq2rfC70p2RagNUn8s; page_size=100; session=.eJx1UctuwjAQ_BefU-QYYkJv0IdoKfRBCyhVFbnJJoQmdurYNID4926QgEPVm2d2Z2d3vCNhCboQEqQhl0ZbcIiIi0weQQxFVqj4BLMqUjoOM2SI6_cY7fhdSrnncur2GDl35CoSOWAXyIu3KRb-l2QyTG2Wn0xylaYQN4tVSh6sXMqZQwqTqtBWoKUomsmRijch6pWwZsnCygjT0DFn49fAG7fLYCV79jN_sZGA5G7aGdTB7Nxv1BfgnTsiogiq6ohJfzbK191hvzMpaxiBXRXz-f3D0_p6FGzVGvVQl5mGKhQYmcvbjHLe6Xotxtq-T_1zvUmR47WUOkRDgtTyZBL8LAaPlpeL7-HidpF8Pw-j-mbrLtnEg6sSTTDFEq95x9zwb7Jkg9whper0aK0UWnw45DA0NJtGQAYgNGiyd8ifAI3QKeDS0ub5_hfvY6Qe.Zklp3w.BjXgYpIDETeVqgPnzAWfF_SfC3A; views=134 Cf-Connecting-Ip: 184.64.168.181 Cdn-Loop: cloudflare Cf-Ipcountry: CA ```