PennyDreadfulMTG / perf-reports

2 stars 2 forks source link

Exceeded slow_query limit (0.6 > 0.5) in mysql: ``` #61821

Open vorpal-buildbot opened 1 year ago

vorpal-buildbot commented 1 year ago
    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
    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, 0.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 80ac7c4465d3f3266e24bc314e2020bcab681314

Request Data ``` Request Method: GET Path: /matchups/?season_id=29&hero_archetype_id=&hero_person_id=&hero_card=Goblin+Charbelcher&enemy_archetype_id=&enemy_person_id=&enemy_card=Scarab+Feast Cookies: ImmutableMultiDict([('hide_intro', 'True'), ('deck_id', '217589'), ('page_size', '20'), ('views', '124')]) Endpoint: matchups View Args: {} Person: logged_out Referrer: https://pennydreadfulmagic.com/matchups/?season_id=29&hero_archetype_id=&hero_person_id=&hero_card=Goblin+Charbelcher&enemy_archetype_id=&enemy_person_id=&enemy_card=Delver+of+Secrets Request Data: {} Host: pennydreadfulmagic.com Connection: Keep-Alive Accept-Encoding: gzip X-Forwarded-For: 50.46.51.25 Cf-Ray: 7d2dbff59fd6275f-SEA X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Referer: https://pennydreadfulmagic.com/matchups/?season_id=29&hero_archetype_id=&hero_person_id=&hero_card=Goblin+Charbelcher&enemy_archetype_id=&enemy_person_id=&enemy_card=Delver+of+Secrets Upgrade-Insecure-Requests: 1 Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: same-origin Sec-Fetch-User: ?1 Cookie: hide_intro=True; deck_id=217589; page_size=20; views=124 Cdn-Loop: cloudflare Cf-Connecting-Ip: 50.46.51.25 Cf-Ipcountry: US ```
vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (0.6 > 0.5) 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
    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, 0.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 80ac7c4465d3f3266e24bc314e2020bcab681314

Request Data ``` Request Method: GET Path: /matchups/?season_id=29&hero_archetype_id=&hero_person_id=&hero_card=Goblin+Charbelcher&enemy_archetype_id=&enemy_person_id=&enemy_card=Scarab+Feast Cookies: ImmutableMultiDict([('hide_intro', 'True'), ('deck_id', '217589'), ('page_size', '20'), ('views', '124')]) Endpoint: matchups View Args: {} Person: logged_out Referrer: https://pennydreadfulmagic.com/matchups/?season_id=29&hero_archetype_id=&hero_person_id=&hero_card=Goblin+Charbelcher&enemy_archetype_id=&enemy_person_id=&enemy_card=Phyrexian+Dreadnought Request Data: {} Host: pennydreadfulmagic.com Connection: Keep-Alive Accept-Encoding: gzip X-Forwarded-For: 50.46.51.25 Cf-Ray: 7d2dc149e878275f-SEA X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Referer: https://pennydreadfulmagic.com/matchups/?season_id=29&hero_archetype_id=&hero_person_id=&hero_card=Goblin+Charbelcher&enemy_archetype_id=&enemy_person_id=&enemy_card=Phyrexian+Dreadnought Upgrade-Insecure-Requests: 1 Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: same-origin Sec-Fetch-User: ?1 Cookie: hide_intro=True; deck_id=217589; page_size=20; views=124 Cdn-Loop: cloudflare Cf-Connecting-Ip: 50.46.51.25 Cf-Ipcountry: US ```

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (0.7 > 0.5) 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
    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, 0.7, mysql)

Reported on decksite by mysql-perf

Location Hash: 80ac7c4465d3f3266e24bc314e2020bcab681314

Request Data ``` Request Method: HEAD Path: /matchups/?season_id=29&hero_archetype_id=&hero_person_id=&hero_card=Goblin+Charbelcher&enemy_archetype_id=&enemy_person_id=&enemy_card=Scarab+Feast Cookies: ImmutableMultiDict([]) Endpoint: matchups View Args: {} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Connection: Keep-Alive Accept-Encoding: gzip X-Forwarded-For: 217.182.175.162 Cf-Ray: 7d2dc7bb798801b9-CDG X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36 Cdn-Loop: cloudflare Cf-Connecting-Ip: 217.182.175.162 Cf-Ipcountry: FR ```

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (0.6 > 0.5) 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
    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, 0.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 80ac7c4465d3f3266e24bc314e2020bcab681314

Request Data ``` Request Method: HEAD Path: /matchups/?season_id=29&hero_archetype_id=&hero_person_id=&hero_card=Goblin+Charbelcher&enemy_archetype_id=&enemy_person_id=&enemy_card=Scarab+Feast Cookies: ImmutableMultiDict([]) Endpoint: matchups View Args: {} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Connection: Keep-Alive Accept-Encoding: gzip X-Forwarded-For: 51.15.164.30 Cf-Ray: 7d2dc93098c30265-CDG X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36 Cdn-Loop: cloudflare Cf-Connecting-Ip: 51.15.164.30 Cf-Ipcountry: FR ```

Labels: decksite