Open vorpal-buildbot opened 6 months ago
Exceeded slow_query limit (1.2 > 1.0) in mysql: ```
SELECT
p.id,
LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS name,
p.mtgo_username,
p.tappedout_username,
p.mtggoldfish_username,
p.discord_id,
p.elo,
p.locale,
p.banned,
SUM(1) AS num_decks,
SUM(dc.wins) AS wins,
SUM(dc.losses) AS losses,
SUM(dc.draws) AS draws,
SUM(dc.wins - dc.losses) AS record,
SUM(CASE WHEN dc.wins >= 5 AND dc.losses = 0 AND d.source_id IN (SELECT id FROM source WHERE name = 'League') THEN 1 ELSE 0 END) AS perfect_runs,
SUM(CASE WHEN d.finish = 1 THEN 1 ELSE 0 END) AS tournament_wins,
SUM(CASE WHEN d.finish <= 8 THEN 1 ELSE 0 END) AS tournament_top8s,
IFNULL(ROUND((SUM(dc.wins) / NULLIF(SUM(dc.wins + dc.losses), 0)) * 100, 1), '') AS win_percent,
SUM(DISTINCT CASE WHEN d.competition_id IS NOT NULL THEN 1 ELSE 0 END) AS num_competitions,
COUNT(*) OVER () AS total
FROM
person AS p
LEFT JOIN
deck AS d ON d.person_id = p.id
LEFT JOIN
deck_cache AS dc ON d.id = dc.deck_id
WHERE
(p.mtgo_username IS NOT NULL) AND (TRUE)
GROUP BY
p.id
ORDER BY
num_decks DESC, p.name
```
[]
(slow_query, 1.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 0967d037ca8a7b80f9b1b4ad6871db9bbfe638db
Labels: decksite
[]
(slow_query, 1.2, mysql)Reported on decksite by mysql-perf
Location Hash: 0967d037ca8a7b80f9b1b4ad6871db9bbfe638db
Request Data
``` Request Method: GET Path: /matchups/?locale=ru Cookies: ImmutableMultiDict([]) Endpoint: matchups View Args: {} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Connection: Keep-Alive Accept-Encoding: gzip, br X-Forwarded-For: 46.146.70.252 Cf-Ray: 885f5e72dd245a8f-VIE X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} 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 Accept: */* Sec-Fetch-Site: none Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7 Priority: u=1, i Cf-Connecting-Ip: 46.146.70.252 Cdn-Loop: cloudflare Cf-Ipcountry: RU ```