PennyDreadfulMTG / perf-reports

2 stars 2 forks source link

Exceeded slow_query limit (9.5 > 0.5) in mysql: ``` #61058

Open vorpal-buildbot opened 1 year ago

vorpal-buildbot commented 1 year ago
    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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Sacred Peaks', 'Scarab Feast', 'Sheltered Thicket', 'Kitchen Finks', 'Thraben Inspector', 'Angel of Glory''s Rise', 'Oblivion Ring', 'Boros Elite', 'Silver-Fur Master', 'Kunoros, Hound of Athreos', 'Erebos, Bleak-Hearted', 'Moon-Circuit Hacker', 'Sleight of Hand', 'Valiant Rescuer', 'Simian Spirit Guide', 'Sweltering Suns', 'Phyrexian Dreadnought', 'Llanowar Augur', 'Pyretic Ritual', 'True Believer', 'Snow-Covered Plains', 'Pelakka Predation', 'Skymarcher Aspirant', 'Sunken Hollow', 'Caves of Koilos', 'Doomed Traveler', 'Memory Lapse', 'Kambal, Consul of Allocation', 'Secluded Steppe', 'Dreams of Steel and Oil', 'Fetid Heath', 'Languish', 'Flourishing Fox', 'Mishra''s Factory', 'Thrun, Breaker of Silence', 'Tendrils of Agony', 'Drowned Catacomb', 'Spikefield Hazard', 'Council''s Judgment', 'Cut Down', 'Azami, Lady of Scrolls', 'Slaughter Pact', 'Liliana Vess', 'Shizo, Death''s Storehouse', 'Akoum Warrior', 'Death Cloud', 'Hinterland Harbor', 'Arcum''s Astrolabe', 'Isolated Chapel', 'Snow-Covered Swamp', 'Impulse', 'Chain Lightning', 'Narcomoeba', 'Primal Command', 'Vraska, Relic Seeker', 'Blackbloom Rogue', 'Become Immense', 'Tempest Djinn', 'Timeless Dragon', 'Smuggler''s Copter', 'Cabal Ritual', 'Felidar Retreat', 'Mind''s Desire', 'Slip Out the Back', 'Timeless Witness', 'Spell Pierce', 'Woodland Cemetery', 'Pain Seer', 'Search for Tomorrow', 'Idyllic Beachfront', 'Kitesail Freebooter', 'Kaito, Dancing Shadow', 'Desperate Ritual', 'Shambling Vent', 'Tanglepool Bridge', 'Forbid', 'Treasure Cruise', 'Laboratory Maniac', 'Silverbluff Bridge', 'Dauntless Bodyguard', 'Founding the Third Path', 'Delver of Secrets', 'Shadow Prophecy', 'Ingenious Infiltrator', 'Prosperous Thief', 'Carnophage', 'Bloodchief''s Thirst', 'Blighted Agent', 'Repeal', 'Slagwoods Bridge', 'Farseek', 'Eiganjo Castle', 'Dire-Strain Rampage', 'Isamaru, Hound of Konda', 'Negate', 'Elas il-Kor, Sadistic Pilgrim', 'Malakir Rebirth', 'Maelstrom Pulse', 'Darksteel Colossus', 'Zof Consumption', 'Dark Ritual', 'Rally the Ranks', 'Changeling Outcast', 'Undercity Informer', 'Rustvale Bridge', 'Arguel''s Blood Fast', 'Thopter Spy Network', 'Seething Song', 'Elvish Visionary', 'Bloodbraid Elf', 'Grave Titan', 'Fallen Shinobi', 'Perilous Myr', 'Shardless Agent', 'Gryff''s Boon', 'Tyvar''s Stand', 'Temple of Silence', 'Invigorate', 'Recruitment Officer', 'Stern Dismissal', 'Lose Focus', 'War Falcon', 'Forsake the Worldly', 'Choked Estuary', 'Anoint with Affliction', 'Tangled Islet', 'Hesitation', 'Erebos''s Intervention', 'Thornglint Bridge', 'Dragonskull Summit', 'Serrated Scorpion', 'Favored Hoplite', 'Illuminator Virtuoso', 'Invoke Calamity', 'Strike It Rich', 'Viscera Seer', 'Sunlit Marsh', 'Audacity', 'Haunted Dead', 'Brain Freeze', 'Precinct Captain', 'Disrupting Shoal', 'Izzet Boilerworks', 'Duress', 'Rally the Ancestors', 'Tidehollow Sculler', 'Titania, Protector of Argoth', 'Goblin Charbelcher', 'Dream Trawler', 'Temple of Epiphany', 'Soul Snare', 'Hissing Quagmire', 'Ghost Quarter', 'Thousand-Faced Shadow', 'Phantasmagorian', 'Agonizing Remorse', 'Vapor Snag', 'Dryad Militant', 'Distortion Strike', 'Mana Leak', 'Prey''s Vengeance', 'Bontu''s Last Reckoning', 'Dawn of Hope', 'Gideon''s Lawkeeper', 'Ichorclaw Myr', 'Abundant Growth', 'Explore', 'Fade from Memory', 'Boon-Bringer Valkyrie', 'Vampire Lacerator', 'Hyena Umbra', 'Restoration Angel', 'Wild Defiance', 'Cleansing Wildfire', 'Honor of the Pure', 'Mnemonic Sphere', 'Vines of Vastwood', 'Dimir Aqueduct', 'Wall of Omens', 'Glorybringer', 'Brave the Elements', 'Garruk Wildspeaker', 'Cathedral of War', 'Judge''s Familiar', 'Barren Moor', 'Thragtusk', 'Defabricate', 'Herd Migration', 'Strategic Planning', 'Frantic Search', 'Phalanx Leader', 'Astral Slide', 'Remorseful Cleric', 'Adanto Vanguard', 'Cabaretti Courtyard', 'Soldier of the Pantheon', 'Deprive', 'Lotleth Giant', 'Glaring Aegis', 'Judith, the Scourge Diva', 'Mesmeric Fiend', 'Dark Petition', 'Vindicate', 'Gods Willing', 'Ethereal Armor', 'Lost Legacy', 'Burst Lightning', 'Oust', 'Glacial Fortress', 'Tuktuk the Explorer', 'Might of Old Krosa', 'Ponder', 'Wrath of God', 'Ornithopter', 'Glistener Elf', 'Benevolent Bodyguard', 'Murderous Cut', 'Ossification', 'Nissa, Worldwaker', 'Tolsimir, Friend to Wolves', 'Ground Seal', 'Yavimaya Coast', 'Grand Abolisher', 'Invasion of Zendikar', 'Sins of the Past', 'Bloodsoaked Champion', 'Gitaxian Probe', 'Jokulhaups', 'Night Market Lookout', 'Kaya, Ghost Assassin', 'Divinity of Pride', 'Wasteland Strangler', 'Goldmeadow Harrier', 'Biting-Palm Ninja', 'Seal of Removal', 'Trickbind', 'Tectonic Edge', 'Balustrade Spy', 'Sylvan Library', 'Easy Prey', 'Bastion of Remembrance', 'Briarbridge Tracker', 'Scattered Groves', 'Combat Thresher', 'Astral Drift', 'Haunted Mire', 'Ulcerate', 'Myth Realized', 'Bloodthrone Vampire', 'Dread Return'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 9.5, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (3.9 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Favored Hoplite', 'Cut Down', 'Temple of Enlightenment', 'Brineborn Cutthroat', 'Chain Lightning', 'Grave Titan', 'Changeling Outcast', 'Zof Consumption', 'Psychic Possession', 'Luminarch Ascension', 'Silver-Fur Master', 'Malakir Rebirth', 'Boon-Bringer Valkyrie', 'Mana Leak', 'Isolated Chapel', 'Defabricate', 'Gitaxian Probe', 'Gryff''s Boon', 'Shambling Vent', 'Timely Reinforcements', 'Caves of Koilos', 'Scarab Feast', 'Shardless Agent', 'Frantic Search', 'Detention Sphere', 'Dread Return', 'Tidehollow Sculler', 'Folio of Fancies', 'Runed Halo', 'Slip Out the Back', 'Mikokoro, Center of the Sea', 'Ghost Quarter', 'Kaito, Dancing Shadow', 'Thopter Spy Network', 'Ulcerate', 'Spikefield Hazard', 'Nissa, Worldwaker', 'Disrupting Shoal', 'Timeless Dragon', 'Orim''s Chant', 'Dire-Strain Rampage', 'Tanglepool Bridge', 'Blackbloom Rogue', 'Phoenix Chick', 'Mind''s Desire', 'Commit // Memory', 'Kaya, Ghost Assassin', 'Goblin Charbelcher', 'Akoum Warrior', 'Rift Bolt', 'Ghitu Lavarunner', 'Hyena Umbra', 'Biting-Palm Ninja', 'Resurgent Belief', 'Dryad Militant', 'Kumano Faces Kakkazan', 'Ingenious Infiltrator', 'Lotleth Giant', 'Ossification', 'Silverbluff Bridge', 'Seething Song', 'Narcomoeba', 'Prosperous Thief', 'Scour All Possibilities', 'Glaring Aegis', 'Cabal Ritual', 'Ground Seal', 'Loran''s Escape', 'Azami, Lady of Scrolls', 'Nevermore', 'Slagwoods Bridge', 'Ethereal Armor', 'Duress', 'Vindicate', 'Undercity Informer', 'Illuminator Virtuoso', 'Phantasmagorian', 'Balustrade Spy', 'Flame Rift', 'Vapor Snag', 'Search for Azcanta', 'Strike It Rich', 'Memory Lapse', 'Sweltering Suns', 'Big Score', 'Phyrexian Dreadnought', 'Mazemind Tome', 'Ponder', 'Laboratory Maniac', 'Thousand-Faced Shadow', 'Fetid Heath', 'Moon-Circuit Hacker', 'Celestial Colonnade', 'Fae of Wishes', 'Wayward Guide-Beast', 'Drowned Catacomb', 'Barbarian Ring', 'Incinerate', 'Solitary Confinement', 'Day of Judgment', 'Cleansing Wildfire', 'Dark Ritual', 'Angel of Glory''s Rise', 'Delver of Secrets', 'Choked Estuary', 'Mishra''s Factory', 'Spell Pierce', 'Pelakka Predation', 'Night of Souls'' Betrayal', 'Simian Spirit Guide', 'Ornithopter', 'Haunted Dead', 'Goblin Electromancer', 'Bloodchief''s Thirst', 'Treasure Cruise', 'Judge''s Familiar', 'Lost Legacy', 'Lose Focus', 'Phalanx Leader', 'Shard Volley', 'Bloodbraid Elf', 'Fallen Shinobi', 'Lightning Strike', 'Burst Lightning', 'Jokulhaups', 'Izzet Boilerworks', 'Viashino Pyromancer', 'Glacial Fortress', 'Kunoros, Hound of Athreos'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 3.9, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (33.9 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Yavimaya Coast', 'Vines of Vastwood', 'Lonely Sandbar', 'Pain Seer', 'Glacial Fortress', 'Arcbound Javelineer', 'Ulcerate', 'Glistener Elf', 'Sudden Edict', 'Ezuri, Renegade Leader', 'Blight Mamba', 'Tangled Islet', 'Trickbind', 'Curse of Exhaustion', 'Hinterland Harbor', 'Icehide Golem', 'Ash Zealot', 'Reckless Rage', 'Shrine of Burning Rage', 'Kaya, Ghost Assassin', 'Azorius Signet', 'Unstable Mutation', 'Springleaf Drum', 'Stone Rain', 'Fact or Fiction', 'Llanowar Elves', 'Prey''s Vengeance', 'Vindicate', 'Laboratory Maniac', 'Arcbound Mouser', 'Ghost Quarter', 'Repeal', 'Lightning Strike', 'Impulse', 'Earthshaker Khenra', 'Elvish Archdruid', 'Carnophage', 'Haunted Dead', 'Breach the Multiverse', 'Mistvault Bridge', 'Cruel Reality', 'Memory Lapse', 'Spell Pierce', 'Mishra''s Factory', 'Undercity Informer', 'Celestial Colonnade', 'Torment of Scarabs', 'Ancient Grudge', 'Bitter Reunion', 'Incinerate', 'Flame Rift', 'Noxious Gearhulk', 'Shizo, Death''s Storehouse', 'Mulldrifter', 'Slip Out the Back', 'Drossforge Bridge', 'Okina, Temple to the Grandfathers', 'Ral, Izzet Viceroy', 'Dark Ritual', 'Michiko''s Reign of Truth', 'Boon-Bringer Valkyrie', 'Caves of Koilos', 'Simian Spirit Guide', 'Brain Maggot', 'Malakir Rebirth', 'Spikefield Hazard', 'Spirited Companion', 'Defiant Strike', 'Goldmire Bridge', 'Kumano Faces Kakkazan', 'Blackbloom Rogue', 'Mana Leak', 'Obliterate', 'Vapor Snag', 'Lose Focus', 'Price of Progress', 'Pilfer', 'Battlefield Forge', 'Audacity', 'Jokulhaups', 'Ray of Revelation', 'Blighted Agent', 'Leonin Lightscribe', 'Balustrade Spy', 'Ponder', 'Wayward Guide-Beast', 'Darksteel Colossus', 'Izzet Charm', 'Rift Bolt', 'Tectonic Giant', 'Shaman of the Pack', 'Elvish Visionary', 'Arcbound Ravager', 'Phoenix Chick', 'Kitesail Freebooter', 'Dakkon, Shadow Slayer', 'Tolarian Terror', 'Bloodsoaked Champion', 'Satyr Hoplite', 'Fight as One', 'Vault Skirge', 'Curse of Death''s Hold', 'Archangel of Wrath', 'Kaito, Dancing Shadow', 'Silverbluff Bridge', 'Ornithopter', 'Day of Judgment', 'Bloodchief''s Thirst', 'Ichorclaw Myr', 'Secluded Courtyard', 'Phyrexian Dreadnought', 'Cut Down', 'Peek', 'Clifftop Retreat', 'Nimble Obstructionist', 'Genesis Wave', 'Servo Exhibition', 'Vampire Lacerator', 'Gird for Battle', 'Nether Traitor', 'Snow-Covered Plains', 'Might of Old Krosa', 'Forked Bolt', 'Favored Hoplite', 'Rustvale Bridge', 'Shambling Vent', 'Frostwalk Bastion', 'All That Glitters', 'Lost Legacy', 'Smuggler''s Copter', 'Disrupting Shoal', 'Gitaxian Probe', 'Distortion Strike', 'Drowned Catacomb', 'Samut, Tyrant Smasher', 'Heliod''s Pilgrim', 'Goblin Charbelcher', 'Viashino Pyromancer', 'Curse of Misfortunes', 'Goblin Dark-Dwellers', 'Zof Consumption', 'Disallow', 'Inkwell Leviathan', 'Memory''s Journey', 'Elvish Mystic', 'Steel Overseer', 'Phalanx Leader', 'Delver of Secrets', 'Sleight of Hand', 'Narcomoeba', 'Wild Cantor', 'Cleansing Wildfire', 'Defabricate', 'Fyndhorn Elves', 'Curse of Thirst', 'Burning Sun''s Fury', 'Akoum Warrior', 'Ghitu Lavarunner', 'Angel of Glory''s Rise', 'Pelakka Predation', 'Invigorate', 'Treasure Cruise', 'Koth, Fire of Resistance', 'Dimir Signet', 'Magmatic Insight', 'Deprive', 'Cabal Ritual', 'Duress', 'Erebos''s Intervention', 'Dread Return', 'Tezzeret the Schemer', 'Phantasmagorian', 'Night of Souls'' Betrayal', 'Azami, Lady of Scrolls', 'Llanowar Tribe', 'Wild Defiance', 'Barbarian Ring', 'Kaervek, the Spiteful', 'Recoup', 'Reckless Charge', 'Cleansing Nova', 'Anoint with Affliction', 'Akroan Crusader', 'Shard Volley', 'Legacy Weapon', 'Lotleth Giant', 'Heartless Act', 'Molten Rain', 'Pillage', 'Marwyn, the Nurturer', 'Burst Lightning', 'Isolated Chapel', 'Chain Lightning', 'Elves of Deep Shadow', 'Soulshriek', 'Night Market Lookout', 'Stromkirk Noble', 'Sweltering Suns', 'Halo Scarab', 'Sheoldred''s Edict'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 33.9, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (10.7 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Pyroclasm', 'Repeal', 'Isolated Chapel', 'Strategic Planning', 'Phantasmagorian', 'Jokulhaups', 'Arcum''s Astrolabe', 'Goblin Dark-Dwellers', 'Zof Consumption', 'Memory Lapse', 'Narcomoeba', 'Pillage', 'Glint Hawk Idol', 'Orim''s Chant', 'Ponder', 'Halo Scarab', 'Barren Moor', 'Smuggler''s Copter', 'Easy Prey', 'Stone Rain', 'Cabal Ritual', 'Treasure Cruise', 'Forked Bolt', 'Mind''s Desire', 'Secluded Steppe', 'Halo Forager', 'Spoils of the Vault', 'Sins of the Past', 'Pelakka Predation', 'Impulse', 'Simian Spirit Guide', 'Phyrexian Revoker', 'Duress', 'The Flame of Keld', 'Tempered Steel', 'Snow-Covered Mountain', 'Myth Realized', 'Ossification', 'Dispatch', 'Jeskai Ascendancy', 'Vector Asp', 'Plague Stinger', 'Magmatic Insight', 'Pieces of the Puzzle', 'Defabricate', 'Blazing Shoal', 'Ghitu Lavarunner', 'Ray of Revelation', 'Waterveil Cavern', 'Glacial Fortress', 'Sweltering Suns', 'Faerie Conclave', 'Scarab Feast', 'Vault Skirge', 'Razortide Bridge', 'Burst Lightning', 'Porcelain Legionnaire', 'Koth, Fire of Resistance', 'Rustvale Bridge', 'Mesmeric Fiend', 'Snow-Covered Swamp', 'Tendo Ice Bridge', 'Balustrade Spy', 'Tidehollow Sculler', 'Izzet Charm', 'Founding the Third Path', 'Shenanigans', 'Mishra''s Factory', 'Battlefield Forge', 'Ghost Quarter', 'Runed Halo', 'Shrapnel Blast', 'Lightning Strike', 'Flourishing Fox', 'Lost Legacy', 'Undercity Informer', 'Tolarian Terror', 'Trickbind', 'Gitaxian Probe', 'Fetid Heath', 'Dark Ritual', 'Dimir Aqueduct', 'Delver of Secrets', 'Incinerate', 'Wasteland Strangler', 'Astral Slide', 'Price of Progress', 'Wrath of God', 'Recoup', 'Search for Azcanta', 'Nimbus Maze', 'Timeless Dragon', 'Astral Drift', 'Choked Estuary', 'Goblin Charbelcher', 'Lose Focus', 'Darksteel Colossus', 'Tendrils of Agony', 'Kumano Faces Kakkazan', 'Haunted Dead', 'Mana Leak', 'Combat Thresher', 'Disrupting Shoal', 'Malakir Rebirth', 'Valiant Rescuer', 'Molten Rain', 'Legacy Weapon', 'Lonely Sandbar', 'Yahenni''s Expertise', 'Snow-Covered Plains', 'Catch // Release', 'Nimble Obstructionist', 'Phyrexian Dreadnought', 'Rift Bolt', 'Wild Cantor', 'Fatestitcher', 'Dread Return', 'Lotleth Giant', 'Forbid', 'Gaea''s Will', 'Icehide Golem', 'Drowned Catacomb', 'Detention Sphere', 'Chain Lightning', 'Azami, Lady of Scrolls', 'Laboratory Maniac', 'Experimental Synthesizer', 'Spell Pierce', 'Deprive', 'Blackbloom Rogue', 'Sunken Hollow', 'Archon of Sun''s Grace', 'Nether Traitor', 'Court Homunculus', 'Cleansing Wildfire', 'Toolcraft Exemplar', 'Shard Volley', 'Thirst for Meaning', 'Memory''s Journey', 'Dark Petition', 'Sleight of Hand', 'Barbarian Ring', 'Soulshriek', 'Blighted Agent', 'Servo Exhibition', 'Viashino Pyromancer', 'Wayward Guide-Beast', 'Slip Out the Back', 'Akoum Warrior', 'Fade from Memory', 'Frantic Search', 'Angel of Glory''s Rise', 'Flame Rift', 'Silverbluff Bridge', 'Spikefield Hazard'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 10.7, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (20.1 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Boros Elite', 'Triskaidekaphile', 'Strategic Planning', 'Oust', 'Mana Leak', 'Wasteland Strangler', 'Grand Abolisher', 'Godo, Bandit Warlord', 'Lose Focus', 'Origin Spellbomb', 'Fierce Empath', 'Barren Moor', 'Impulse', 'Djeru''s Renunciation', 'Rally the Ranks', 'Recruitment Officer', 'Weathered Wayfarer', 'Yavimaya Coast', 'Eiganjo Castle', 'Fetid Pools', 'Astral Drift', 'Dark Ritual', 'Angel of Glory''s Rise', 'Dread Return', 'Rootbound Crag', 'Undercity Informer', 'Enter the God-Eternals', 'Servo Exhibition', 'Disrupting Shoal', 'Crawling Barrens', 'Elvish Rejuvenator', 'Judge''s Familiar', 'Simian Spirit Guide', 'Tidehollow Sculler', 'Court Homunculus', 'Balustrade Spy', 'Soldier of the Pantheon', 'Ajani Goldmane', 'Spikefield Hazard', 'Frantic Search', 'Lost Legacy', 'Tangled Islet', 'Beastmaster Ascension', 'Wrath of God', 'Glacial Fortress', 'Helm of the Host', 'Dawn of Hope', 'Stern Lesson', 'Gold Myr', 'Benevolent Bodyguard', 'Lotleth Giant', 'Fade from Memory', 'Illuminator Virtuoso', 'Invasion of Mercadia', 'Goblin Instigator', 'Tolarian Terror', 'Venser, Shaper Savant', 'Gitaxian Probe', 'Dark Petition', 'Slip Out the Back', 'Port Town', 'Azorius Charm', 'Ghost Quarter', 'Glistener Elf', 'Narcomoeba', 'Orim''s Chant', 'Vesperlark', 'Invigorate', 'Remorseful Cleric', 'Loran''s Escape', 'Defabricate', 'Control Magic', 'Dryad Militant', 'Midnight Clock', 'Isamaru, Hound of Konda', 'Snow-Covered Plains', 'Skirk Prospector', 'Skymarcher Aspirant', 'Game Trail', 'Yawgmoth''s Bargain', 'Honor of the Pure', 'Explore', 'Azami, Lady of Scrolls', 'Scatter the Seeds', 'Steel Sabotage', 'Secluded Steppe', 'Snow-Covered Swamp', 'Darksteel Colossus', 'Founding the Third Path', 'Adanto Vanguard', 'Wall of Omens', 'Sheltered Thicket', 'Wild Cantor', 'Repeal', 'Night of Souls'' Betrayal', 'Treasure Cruise', 'Tendrils of Agony', 'Deprive', 'Faerie Vandal', 'Drowned Catacomb', 'Lonely Sandbar', 'Mind''s Desire', 'Fetid Heath', 'Thraben Inspector', 'Trickbind', 'Goldmeadow Harrier', 'Hyena Umbra', 'Audacity', 'War Falcon', 'Sheoldred''s Edict', 'Scarab Feast', 'Mazemind Tome', 'Ponder', 'Valiant Rescuer', 'Escape Protocol', 'Delver of Secrets', 'Haunted Dead', 'Sleight of Hand', 'Sram''s Expertise', 'Angel of Invention', 'Blackbloom Rogue', 'Duress', 'Forbid', 'Condemn', 'Jace, Architect of Thought', 'Glint Hawk Idol', 'Step Through', 'Mistveil Plains', 'Phyrexian Dreadnought', 'Thaumatic Compass', 'Priest of Urabrask', 'Astral Slide', 'Staff of Nin', 'Laboratory Maniac', 'Mesmeric Fiend', 'Easy Prey', 'Monument to Perfection', 'Deceiver Exarch', 'Brave the Elements', 'Ethereal Armor', 'Nimble Obstructionist', 'Favored Hoplite', 'Peek', 'Curiosity', 'Fact or Fiction', 'Tempered Steel', 'Goblin Charbelcher', 'Gilded Light', 'Fight as One', 'Cabal Ritual', 'Precinct Captain', 'Cloudpost', 'Platinum Angel', 'Glaring Aegis', 'Sunken Hollow', 'Memory Lapse', 'Flourishing Fox', 'Dimir Aqueduct', 'Phantasmagorian', 'Arcum''s Astrolabe', 'Artisan of Kozilek', 'True Believer', 'Dispatch', 'Hinterland Harbor', 'Thassa''s Intervention', 'Goblin Oriflamme', 'Blighted Agent', 'Vapor Snag', 'Sprout Swarm', 'Azusa''s Many Journeys', 'Spell Pierce', 'Vines of Vastwood', 'Spider Umbra', 'Glimmerpost', 'Akroma''s Blessing', 'Dream Trawler', 'Phalanx Leader', 'Zof Consumption', 'Gryff''s Boon', 'Mulch', 'Might of Old Krosa', 'Hieroglyphic Illumination', 'Isolated Chapel', 'Ichorclaw Myr', 'Ancient Stirrings', 'Temple of Abandon', 'Kaervek, the Spiteful', 'Archaeomancer', 'Chatterstorm', 'Erebos''s Intervention', 'Malakir Rebirth', 'Palladium Myr', 'Nest Invader', 'Pelakka Predation', 'Celestial Colonnade', 'Hour of Promise', 'Tempest Djinn', 'Combat Thresher', 'Dauntless Bodyguard', 'Akoum Warrior', 'Gideon''s Lawkeeper', 'Choked Estuary', 'Azorius Chancery', 'Sins of the Past', 'Day of Judgment'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 20.1, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (9.6 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Brave the Elements', 'Founding the Third Path', 'Simian Spirit Guide', 'Eiganjo Castle', 'Goblin Dark-Dwellers', 'Dark Petition', 'Narcomoeba', 'Haunted Dead', 'Kitesail Freebooter', 'Rally the Ancestors', 'Benevolent Bodyguard', 'Angel of Glory''s Rise', 'Wrath of God', 'Ranger''s Guile', 'Reforge the Soul', 'Overgrown Battlement', 'Koth, Fire of Resistance', 'Might of Old Krosa', 'Vines of Vastwood', 'Glistener Elf', 'Needle Spires', 'Precinct Captain', 'Temple of Silence', 'Dark Ritual', 'Elas il-Kor, Sadistic Pilgrim', 'Spikefield Hazard', 'Blood Artist', 'Touch the Spirit Realm', 'Canyon Slough', 'Pillage', 'Empty the Warrens', 'Lightning Spear', 'Sylvan Caryatid', 'Llanowar Elves', 'War Falcon', 'Volcanic Spite', 'Approach of the Second Sun', 'Dryad Militant', 'Tolarian Terror', 'Ranger of Eos', 'Faerie Vandal', 'Ray of Revelation', 'Fetid Heath', 'Seething Song', 'Bloodchief''s Thirst', 'Distortion Strike', 'Scryb Ranger', 'Recoup', 'Agonizing Remorse', 'Spell Pierce', 'Stone Haven Outfitter', 'Aetherblade Agent', 'Duress', 'Leather Armor', 'Invigorate', 'Abundant Harvest', 'Lizard Blades', 'Midnight Reaper', 'Skymarcher Aspirant', 'Lost Legacy', 'Ponder', 'Balustrade Spy', 'Council''s Judgment', 'Goldmeadow Harrier', 'True Believer', 'Tidehollow Sculler', 'Pelakka Predation', 'Clifftop Retreat', 'Judge''s Familiar', 'Cabal Ritual', 'Caves of Koilos', 'Gideon''s Lawkeeper', 'Burst Lightning', 'Lose Focus', 'Glacial Fortress', 'Malakir Rebirth', 'Rally the Ranks', 'Grim Haruspex', 'Goblin Charbelcher', 'Gitaxian Probe', 'Fact or Fiction', 'Hieroglyphic Illumination', 'Combat Thresher', 'Kunoros, Hound of Athreos', 'Valakut Invoker', 'Cremate', 'Boon-Bringer Valkyrie', 'Laboratory Maniac', 'Shambling Vent', 'Isamaru, Hound of Konda', 'Fyndhorn Elves', 'Blackbloom Rogue', 'Tendo Ice Bridge', 'Zof Consumption', 'Tendrils of Agony', 'Blighted Agent', 'Battlefield Forge', 'Condemn', 'Sweltering Suns', 'Mirran Crusader', 'Myr Battlesphere', 'Invoke Calamity', 'Halo Scarab', 'Walking Bulwark', 'Blossoming Calm', 'Steel Hellkite', 'Thraben Inspector', 'Erebos''s Intervention', 'Weapons Trainer', 'Simian Sling', 'Fight as One', 'Viscera Seer', 'Molten Rain', 'Kami of False Hope', 'Boros Elite', 'Dread Return', 'Chain Lightning', 'Tangled Florahedron', 'Birds of Paradise', 'Nekrataal', 'Skirk Prospector', 'Isolated Chapel', 'Repeal', 'Dragonskull Summit', 'Recruitment Officer', 'Cabal Therapist', 'Kemba, Kha Enduring', 'Pull from Tomorrow', 'Ertai''s Scorn', 'Kogla, the Titan Ape', 'Pyretic Ritual', 'Adanto Vanguard', 'Dauntless Bodyguard', 'Become Immense', 'Tuktuk Rubblefort', 'Graven Cairns', 'Regal Force', 'Heartless Act', 'Hazoret''s Undying Fury', 'Flooded Grove', 'Yavimaya Coast', 'Wander in Death', 'Vapor Snag', 'Drift of Phantasms', 'Vindicate', 'Wild Cantor', 'Magmatic Insight', 'Day of Judgment', 'Audacity', 'Akiri, Fearless Voyager', 'Mana Leak', 'Centaur Garden', 'Abiding Grace', 'Curiosity', 'Fireblade Charger', 'Soldier of the Pantheon', 'Rabbit Battery', 'Ancient Grudge', 'Honor of the Pure', 'Remorseful Cleric', 'Phantasmagorian', 'Tempest Djinn', 'Celestial Colonnade', 'Jor Kadeen, First Goldwarden', 'Stone Rain', 'Ichorclaw Myr', 'Wasteland Strangler', 'Grand Abolisher', 'Axebane Guardian', 'Azami, Lady of Scrolls', 'Lead the Stampede', 'Treasure Cruise', 'Desperate Ritual', 'Gideon Jura', 'Graveborn Muse', 'Settle the Wreckage', 'Forked Bolt', 'Undercity Informer', 'Kaya, Ghost Assassin', 'Hinterland Harbor', 'Galvanic Alchemist', 'Lotleth Giant', 'Hornet Queen'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 9.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (6.3 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Night Market Lookout', 'Secluded Steppe', 'Snow-Covered Plains', 'Fetid Pools', 'Carnophage', 'Tyvar''s Stand', 'Gideon Jura', 'Memory Lapse', 'Anoint with Affliction', 'Mishra''s Factory', 'Ranger of Eos', 'Ulcerate', 'Narcomoeba', 'Invasion of Azgol', 'Kami of False Hope', 'Rakdos Headliner', 'Combat Thresher', 'Curiosity', 'Gitaxian Probe', 'Celestial Colonnade', 'Wander in Death', 'Smuggler''s Copter', 'Recruitment Officer', 'Blacksmith''s Skill', 'Galvanic Alchemist', 'Tangled Florahedron', 'Might of Old Krosa', 'Drift of Phantasms', 'Erebos''s Intervention', 'Lurrus of the Dream-Den', 'Tempered Steel', 'Malakir Rebirth', 'Mana Leak', 'Cabal Ritual', 'Chain Lightning', 'Darksteel Colossus', 'Kaervek, the Spiteful', 'Tolarian Terror', 'Fyndhorn Elves', 'Dispatch', 'Duress', 'Brain Maggot', 'Condemn', 'Yavimaya Coast', 'Axebane Guardian', 'Dream Trawler', 'Ertai''s Scorn', 'Heap Doll', 'Distortion Strike', 'Defabricate', 'Bloodchief''s Thirst', 'Basking Rootwalla', 'Luminarch Ascension', 'Cabal Therapist', 'Dark Ritual', 'Valiant Rescuer', 'Simian Spirit Guide', 'Frostwalk Bastion', 'Haunted Dead', 'Glistener Elf', 'Ichorclaw Myr', 'Graven Cairns', 'Fetid Heath', 'Goldmeadow Harrier', 'Pull from Tomorrow', 'Umbral Mantle', 'Vapor Snag', 'Hieroglyphic Illumination', 'Ranger''s Guile', 'Jace, Architect of Thought', 'Stern Lesson', 'Triskaidekaphile', 'Kitesail Freebooter', 'Boros Elite', 'Elas il-Kor, Sadistic Pilgrim', 'Servo Exhibition', 'Bloodsoaked Champion', 'Undercity Informer', 'Pain Seer', 'Court Homunculus', 'Peek', 'Icehide Golem', 'Spider Umbra', 'Flooded Grove', 'Dryad Militant', 'Thaumatic Compass', 'Barren Moor', 'Phyrexian Dreadnought', 'Sleight of Hand', 'Flourishing Fox', 'Caves of Koilos', 'Azorius Charm', 'Wild Cantor', 'Doomskar', 'Dragonskull Summit', 'Orim''s Chant', 'Rix Maadi Reveler', 'Choked Estuary', 'Thassa''s Intervention', 'Tidehollow Sculler', 'Spikefield Hazard', 'Overgrown Battlement', 'Kumano Faces Kakkazan', 'Valakut Invoker', 'Treasure Cruise', 'Blackbloom Rogue', 'Nevinyrral''s Disk', 'Impulse', 'Dawn of Hope', 'Rally the Ancestors', 'Port Town', 'Glacial Fortress', 'Mazemind Tome', 'Scryb Ranger', 'Forbid', 'Rift Bolt', 'Kogla, the Titan Ape', 'Cystbearer', 'Vampire Lacerator', 'Scarab Feast', 'Dread Return', 'Night of Souls'' Betrayal', 'Yawgmoth''s Bargain', 'Isolated Chapel', 'Blighted Agent', 'Ashes of the Abhorrent', 'Disrupting Shoal', 'Council''s Judgment', 'Steel Hellkite', 'Mesmeric Fiend', 'Fiery Temper', 'Lotleth Giant', 'Oust', 'Tempest Djinn', 'Skymarcher Aspirant', 'Wasteland Strangler', 'Brave the Elements', 'Midnight Clock', 'Tuktuk Rubblefort', 'War Falcon', 'Tangled Islet', 'Arcum''s Astrolabe', 'Astral Slide', 'Lose Focus', 'Spell Pierce', 'Birds of Paradise', 'Day of Judgment', 'Thraben Inspector', 'Delver of Secrets', 'Blossoming Calm', 'Deprive', 'Sram''s Expertise', 'Angel of Glory''s Rise', 'Soldier of the Pantheon', 'Grim Haruspex', 'Ancient Grudge', 'Benevolent Bodyguard', 'Hinterland Harbor', 'Falkenrath Pit Fighter', 'Pelakka Predation', 'Akoum Warrior', 'Llanowar Elves', 'Ray of Revelation', 'Astral Drift', 'Sylvan Caryatid', 'Brineborn Cutthroat', 'Cleansing Nova', 'Audacity', 'Honor of the Pure', 'Sheoldred''s Edict', 'Hornet Queen', 'Vines of Vastwood', 'Balustrade Spy', 'Rally the Ranks', 'Blood Artist', 'Viscera Seer', 'Walking Bulwark', 'Centaur Garden', 'Goblin Charbelcher', 'Regal Force', 'Halo Scarab', 'Midnight Reaper', 'Abiding Grace', 'Invigorate', 'Zof Consumption', 'Fade from Memory', 'Trickbind', 'Azami, Lady of Scrolls', 'Ponder', 'Eiganjo Castle', 'Gideon''s Lawkeeper', 'Lead the Stampede', 'Myr Battlesphere', 'Dimir Aqueduct', 'Drowned Catacomb', 'Laboratory Maniac', 'Repeal', 'Faerie Vandal', 'High-Speed Hoverbike', 'Easy Prey', 'Wrath of God', 'Blazing Rootwalla', 'Snow-Covered Swamp', 'Slip Out the Back', 'Enter the God-Eternals', 'Phantasmagorian', 'Shizo, Death''s Storehouse'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 6.3, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (8.1 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Astral Drift', 'Astral Slide', 'Earthshaker Khenra', 'Llanowar Tribe', 'Barren Moor', 'Recurring Nightmare', 'Rift Bolt', 'Flame Rift', 'Barbarian Ring', 'Delver of Secrets', 'Secluded Steppe', 'Llanowar Elves', 'Kitchen Finks', 'Woodfall Primus', 'Isolated Chapel', 'Idyllic Beachfront', 'Siege Rhino', 'Sweltering Suns', 'Phantasmagorian', 'Treasure Cruise', 'Hinterland Harbor', 'Slogurk, the Overslime', 'Avacyn''s Pilgrim', 'Memory Lapse', 'Condemn', 'Wild Cantor', 'Gilt-Leaf Archdruid', 'Ashen Rider', 'Burst Lightning', 'Koth, Fire of Resistance', 'Halo Scarab', 'Sunpetal Grove', 'Vault of the Archangel', 'Stern Lesson', 'Spell Pierce', 'Day of Judgment', 'Celestial Colonnade', 'Disrupting Shoal', 'Elvish Mystic', 'Satyr Wayfinder', 'Ezuri, Renegade Leader', 'Birds of Paradise', 'Defabricate', 'Dream Trawler', 'Easy Prey', 'Snow-Covered Swamp', 'Lose Focus', 'Gavony Township', 'Stromkirk Noble', 'Phyrexian Dreadnought', 'Mazemind Tome', 'Sleight of Hand', 'Angel of Glory''s Rise', 'Elvish Archdruid', 'Simian Spirit Guide', 'Viashino Pyromancer', 'Ash Zealot', 'Wasteland Strangler', 'Ponder', 'Azorius Charm', 'Yosei, the Morning Star', 'Restoration Angel', 'Ancient Grudge', 'Dread Return', 'Timeless Witness', 'Knight of the Reliquary', 'Oust', 'Goblin Dark-Dwellers', 'Radiant Grove', 'Peek', 'Malakir Rebirth', 'Snow-Covered Plains', 'Genesis Wave', 'Dive Down', 'Scarab Feast', 'Ghitu Lavarunner', 'Woodland Cemetery', 'Nimble Obstructionist', 'Flourishing Fox', 'Gitaxian Probe', 'Dark Ritual', 'Pillage', 'Price of Progress', 'Duress', 'Tidehollow Sculler', 'Terramorphic Expanse', 'Laboratory Maniac', 'Lonely Sandbar', 'Molten Rain', 'Coiling Oracle', 'Unburial Rites', 'Recommission', 'Lightning Strike', 'Arbor Elf', 'Fyndhorn Elves', 'Port Town', 'Incinerate', 'Spikefield Hazard', 'Lead the Stampede', 'Dawn of Hope', 'Thassa''s Intervention', 'Ghost Quarter', 'Pelakka Wurm', 'Purify the Grave', 'Shard Volley', 'Fade from Memory', 'Ramunap Excavator', 'Forbid', 'Midnight Clock', 'Undercity Informer', 'Combat Thresher', 'Valiant Rescuer', 'Faerie Vandal', 'Haunted Mire', 'Fetid Heath', 'Slip Out the Back', 'Ray of Revelation', 'Mesmeric Fiend', 'Zof Consumption', 'Sandsteppe Citadel', 'Retreat to Coralhelm', 'Azami, Lady of Scrolls', 'Mishra''s Factory', 'Balustrade Spy', 'Cabal Ritual', 'Tectonic Giant', 'Mortify', 'Forked Bolt', 'Chain Lightning', 'Trickbind', 'Recoup', 'Impulse', 'Blackbloom Rogue', 'Tangled Florahedron', 'Arcum''s Astrolabe', 'Stone Rain', 'Narcomoeba', 'Saffi Eriksdotter', 'Vapor Snag', 'Vitu-Ghazi, the City-Tree', 'Kumano Faces Kakkazan', 'Stain the Mind', 'Goblin Charbelcher', 'Sunlit Marsh', 'Wayward Guide-Beast', 'Deprive', 'Lotleth Giant', 'Wrath of God', 'Shrine of Burning Rage', 'Pelakka Predation', 'Repeal', 'Evolving Wilds', 'Commune with the Gods', 'Titania, Protector of Argoth', 'Thragtusk', 'Haunted Dead', 'Putrefy', 'Thaumatic Compass', 'Joraga Treespeaker', 'Hieroglyphic Illumination', 'Mana Leak', 'Lingering Souls', 'Greater Good', 'Jace, Architect of Thought', 'Glacial Fortress'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 8.1, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (34.8 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Malakir Rebirth', 'Fetid Heath', 'Slip Out the Back', 'Flourishing Fox', 'High-Speed Hoverbike', 'Cleansing Wildfire', 'Rustvale Bridge', 'Benevolent Bodyguard', 'Anoint with Affliction', 'Laboratory Maniac', 'Combat Thresher', 'Founding the Third Path', 'Steel Leaf Champion', 'Cut Down', 'Cabal Ritual', 'Mnemonic Sphere', 'Leonin Arbiter', 'Pain Seer', 'Eiganjo Castle', 'Brineborn Cutthroat', 'Vampire Lacerator', 'Ponder', 'Not of This World', 'Emmara, Soul of the Accord', 'Forbid', 'Caves of Koilos', 'Snow-Covered Swamp', 'Kunoros, Hound of Athreos', 'Archangel of Wrath', 'Bloodbraid Elf', 'Languish', 'Winds of Abandon', 'Spikefield Hazard', 'Isolated Chapel', 'Vindicate', 'Jeskai Ascendancy', 'Aegis of the Gods', 'Lotleth Giant', 'Silverbluff Bridge', 'Choked Estuary', 'Vapor Snag', 'Scattered Groves', 'Avatar of the Resolute', 'Yasharn, Implacable Earth', 'Cataclysmic Gearhulk', 'Vines of Vastwood', 'Cankerbloom', 'Duskmantle Guildmage', 'Gitaxian Probe', 'Dizzy Spell', 'Night Market Lookout', 'Tangled Florahedron', 'Tainted Indulgence', 'Ajani, Mentor of Heroes', 'Demolition Field', 'Tanglepool Bridge', 'Judge''s Familiar', 'Chain Lightning', 'Ray of Revelation', 'Dread Return', 'Mishra''s Factory', 'Izzet Charm', 'Ghitu Lavarunner', 'Tezzeret the Schemer', 'Scarab Feast', 'Ground Seal', 'Adanto Vanguard', 'Darkmoss Bridge', 'Drowned Catacomb', 'Astral Slide', 'Pelt Collector', 'Shard Volley', 'Barkhide Troll', 'Narcomoeba', 'Halo Scarab', 'Shardless Agent', 'Angel of Glory''s Rise', 'Shigeki, Jukai Visionary', 'Lightning Strike', 'Fetid Pools', 'Tidehollow Sculler', 'Brain Maggot', 'Balustrade Spy', 'Razortide Bridge', 'Fatestitcher', 'Aspect of Hydra', 'Trinket Mage', 'Ghost Quarter', 'Mesmeric Fiend', 'Valiant Rescuer', 'Wild Cantor', 'Faerie Vandal', 'The Mending of Dominaria', 'Dauntless Bodyguard', 'Wildborn Preserver', 'Barren Moor', 'Ulcerate', 'Yorvo, Lord of Garenbrig', 'Eldrazi Mimic', 'Treasure Cruise', 'Trickbind', 'Grove of the Guardian', 'Defabricate', 'Spell Pierce', 'Mistvault Bridge', 'Clifftop Retreat', 'Dire-Strain Rampage', 'Price of Progress', 'Mindcrank', 'True Believer', 'Dragonskull Summit', 'Experiment One', 'Canopy Vista', 'Gavony Township', 'Simian Spirit Guide', 'Okina, Temple to the Grandfathers', 'Carnophage', 'Incinerate', 'Council''s Judgment', 'Overrun', 'Astral Drift', 'Distortion Strike', 'Ajani, Adversary of Tyrants', 'Pyroclasm', 'Sweltering Suns', 'Snow-Covered Mountain', 'Undercity Informer', 'Shalai, Voice of Plenty', 'Phantasmagorian', 'Sudden Edict', 'Kaya, Ghost Assassin', 'Pelakka Predation', 'Gideon''s Lawkeeper', 'Smuggler''s Copter', 'Shizo, Death''s Storehouse', 'Slagwoods Bridge', 'Settle the Wreckage', 'Sunpetal Grove', 'Rift Bolt', 'Kaito, Dancing Shadow', 'Wayward Guide-Beast', 'Azami, Lady of Scrolls', 'Pilfer', 'Terminate', 'Memory Lapse', 'General Ferrous Rokiric', 'Nissa, Worldwaker', 'Fade from Memory', 'Battlefield Forge', 'Canyon Slough', 'Barbarian Ring', 'Phyrexian Dreadnought', 'Viashino Pyromancer', 'Jokulhaups', 'Archangel Avacyn', 'Snow-Covered Plains', 'Delver of Secrets', 'Faerie Conclave', 'Mana Leak', 'Rishkar, Peema Renegade', 'Lose Focus', 'Burst Lightning', 'Grand Abolisher', 'Recruitment Officer', 'Haunted Dead', 'Mizzium Skin', 'Ancient Grudge', 'Brave the Elements', 'Arcum''s Astrolabe', 'Bloodchief''s Thirst', 'Hieroglyphic Illumination', 'Impulse', 'Bloodsoaked Champion', 'Disrupting Shoal', 'Kira, Great Glass-Spinner', 'Audacity', 'Dark Ritual', 'Remorseful Cleric', 'Zof Consumption', 'Repeal', 'Goblin Charbelcher', 'Blackbloom Rogue', 'Easy Prey', 'Lonely Sandbar', 'Precinct Captain', 'Stirring Wildwood', 'Isamaru, Hound of Konda', 'Nimble Obstructionist', 'Dryad Militant', 'Witch''s Vengeance', 'Duress', 'Wasteland Strangler', 'Beacon of Creation', 'Honor of the Pure', 'Secluded Steppe', 'Drossforge Bridge'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 34.8, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (15.6 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Founding the Third Path', 'Remorseful Cleric', 'Wasteland Strangler', 'Ghost Quarter', 'Blackbloom Rogue', 'Archangel Avacyn', 'Emmara, Soul of the Accord', 'Angel of Glory''s Rise', 'Ajani, Adversary of Tyrants', 'Stubborn Denial', 'Arcum''s Astrolabe', 'Wild Cantor', 'Idyllic Beachfront', 'Rishkar, Peema Renegade', 'Thirsting Roots', 'Combat Thresher', 'The Birth of Meletis', 'Dream Trawler', 'Jace, Architect of Thought', 'Razortide Bridge', 'Vindicate', 'Slagwoods Bridge', 'Tanglepool Bridge', 'Squadron Hawk', 'Glistener Elf', 'Dryad Militant', 'Restore Balance', 'Mistveil Plains', 'Council''s Judgment', 'Izzet Charm', 'Laboratory Maniac', 'Viashino Pyromancer', 'Game Trail', 'Astral Drift', 'Fade from Memory', 'Spikefield Hazard', 'Burst Lightning', 'Phantasmagorian', 'Gitaxian Probe', 'Tyvar''s Stand', 'Tangled Florahedron', 'Azami, Lady of Scrolls', 'Fetid Heath', 'Rabbit Battery', 'Yasharn, Implacable Earth', 'Darksteel Colossus', 'Timeless Dragon', 'Dimir Aqueduct', 'Wildborn Preserver', 'Lotleth Giant', 'Malakir Rebirth', 'Rise and Shine', 'Zof Consumption', 'Kitchen Finks', 'Nylea, God of the Hunt', 'Gideon Jura', 'Bloodbraid Elf', 'Ranger of Eos', 'Negan, the Cold-Blooded', 'Fyndhorn Elves', 'Gavony Township', 'The Mending of Dominaria', 'Life of Toshiro Umezawa', 'Scarab Feast', 'Wayward Guide-Beast', 'Dark Ritual', 'Nylea''s Disciple', 'Scrabbling Claws', 'It That Betrays', 'Cabal Ritual', 'Luminarch Ascension', 'The Antiquities War', 'Flourishing Fox', 'Haunted Dead', 'Dark Petition', 'Demonic Dread', 'Orim''s Chant', 'Mistvault Bridge', 'Mishra''s Factory', 'Experimental Synthesizer', 'Prismatic Omen', 'Volt Charge', 'Viscera Seer', 'Kjeldoran Outpost', 'Glacial Fortress', 'Abiding Grace', 'Spider Umbra', 'Disciple of the Vault', 'Undercity Informer', 'Snow-Covered Plains', 'Murderous Redcap', 'Wooded Bastion', 'Bring to Light', 'Aspect of Hydra', 'Drossforge Bridge', 'Experiment One', 'Auramancer', 'Soul Snare', 'Astral Slide', 'Domri Rade', 'Runed Halo', 'Vines of Vastwood', 'Rift Bolt', 'Firewild Borderpost', 'Treasure Cruise', 'Incinerate', 'Abundant Harvest', 'Oust', 'Tidehollow Sculler', 'Last Stand', 'Lost Legacy', 'Caustic Caterpillar', 'Woodland Cemetery', 'Steel Leaf Champion', 'Myth Realized', 'Ancient Grudge', 'Anafenza, Kin-Tree Spirit', 'Shigeki, Jukai Visionary', 'Garruk Wildspeaker', 'Chain Lightning', 'Recurring Nightmare', 'Rootbound Crag', 'Ground Seal', 'Tribal Flames', 'Port Town', 'Silverbluff Bridge', 'Settle the Wreckage', 'Choked Estuary', 'Ghitu Lavarunner', 'Wrath of God', 'Serra Ascendant', 'Lose Focus', 'Dawn of Hope', 'Gideon''s Triumph', 'Birds of Paradise', 'Throes of Chaos', 'Wildfield Borderpost', 'Tangled Islet', 'Narcomoeba', 'Sylvan Anthem', 'Easy Prey', 'Tendrils of Agony', 'Goblin Charbelcher', 'Snow-Covered Swamp', 'Thragtusk', 'Shardless Agent', 'Smiting Helix', 'Duress', 'Strategic Planning', 'Jokulhaups', 'Mana Leak', 'Sweltering Suns', 'Forsake the Worldly', 'Mistvein Borderpost', 'Thassa''s Intervention', 'Cankerbloom', 'Price of Progress', 'Grove of the Guardian', 'Faerie Vandal', 'Rustvale Bridge', 'Blossoming Calm', 'Shard Volley', 'Aegis of the Gods', 'Thraben Inspector', 'Valiant Rescuer', 'Pelt Collector', 'Sunlit Marsh', 'Graven Cairns', 'Memory Lapse', 'Ashen Rider', 'Martyr of Sands', 'Nissa, Worldwaker', 'Lurrus of the Dream-Den', 'Azorius Chancery', 'Demolition Field', 'Ichorclaw Myr', 'Oni-Cult Anvil', 'Pollenbright Druid', 'Sunken Hollow', 'Ancient Ziggurat', 'Forbid', 'Day of Judgment', 'Mnemonic Sphere', 'Frantic Search', 'Dread Return', 'Mishra''s Research Desk', 'Mesmeric Fiend', 'Arlinn Kord', 'Smoldering Marsh', 'Pilfer', 'Barbarian Ring', 'Vapor Snag', 'Halo Scarab', 'Fieldmist Borderpost', 'Veinfire Borderpost', 'Faerie Conclave', 'Ponder', 'Ray of Revelation', 'Might of Old Krosa', 'Repeal', 'Tempest Djinn', 'Secluded Steppe', 'Bloodchief''s Thirst', 'Ravenous Squirrel', 'Sunpetal Grove', 'Yavimaya Coast', 'Condemn', 'Entomber Exarch', 'Bloodthrone Vampire', 'Ghalta, Primal Hunger', 'Audacity', 'Vivid Crag', 'Wall of Omens', 'Darkmoss Bridge', 'Sleight of Hand', 'Drowned Catacomb', 'Doomskar', 'Hieroglyphic Illumination', 'Shatter the Sky', 'Scattered Groves', 'Shalai, Voice of Plenty', 'Goblin Blast-Runner', 'Winds of Abandon', 'Isolated Chapel', 'Metalwork Colossus', 'Exploding Borders', 'Stirring Wildwood', 'Murmuring Bosk', 'Sheltered Thicket', 'Simian Spirit Guide', 'Ajani, Mentor of Heroes', 'Seal of Removal', 'Leonin Arbiter', 'Lightning Strike', 'Snow-Covered Mountain', 'Executioner''s Capsule', 'Spell Pierce', 'Farseek', 'Avatar of the Resolute', 'Akoum Warrior', 'Invigorate', 'Fatestitcher', 'Jeskai Ascendancy', 'Xenagos, the Reveler', 'Kami of False Hope', 'Balustrade Spy', 'Blighted Agent', 'Barren Moor', 'Tolarian Terror', 'Commune with Nature', 'Cleansing Wildfire', 'Greater Gargadon', 'Codie, Vociferous Codex', 'Melira, Sylvok Outcast', 'Pelakka Predation', 'Mind''s Desire', 'Shriekmaw', 'Hinterland Harbor', 'Sandsteppe Citadel', 'Shrapnel Blast', 'Celestial Colonnade', 'Canopy Vista', 'Curiosity', 'Negate'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 15.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (7.6 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Circuit Mender', 'Tendrils of Agony', 'Valiant Rescuer', 'Celestial Colonnade', 'Vivid Crag', 'Tezzeret the Schemer', 'Life of Toshiro Umezawa', 'Bring to Light', 'Dryad Militant', 'Flourishing Fox', 'Luminarch Ascension', 'Invigorate', 'Mesmeric Fiend', 'Ghost Quarter', 'Boon-Bringer Valkyrie', 'Dawn of Hope', 'Dark Ritual', 'Control Magic', 'Mistvault Bridge', 'Colossal Skyturtle', 'Repeal', 'Choked Estuary', 'Winds of Abandon', 'Last Stand', 'Lurrus of the Dream-Den', 'Wrath of God', 'Idyllic Beachfront', 'Bloodbraid Elf', 'Sweltering Suns', 'Lose Focus', 'Tangled Islet', 'Memory Lapse', 'Sunken Hollow', 'Fact or Fiction', 'Vines of Vastwood', 'Mistveil Plains', 'Avacyn''s Pilgrim', 'Kessig Wolf Run', 'Kitesail Freebooter', 'Avatar of the Resolute', 'Defabricate', 'Drannith Healer', 'Seismic Assault', 'Negan, the Cold-Blooded', 'Snow-Covered Swamp', 'Delver of Secrets', 'Reliquary Tower', 'Glacial Fortress', 'Jokulhaups', 'Silverbluff Bridge', 'Abiding Grace', 'Burst Lightning', 'Agonizing Remorse', 'Curiosity', 'Yorvo, Lord of Garenbrig', 'Disrupting Shoal', 'Timeless Dragon', 'Fetid Heath', 'Felidar Retreat', 'Spell Pierce', 'Jace, Architect of Thought', 'Enter the God-Eternals', 'Codie, Vociferous Codex', 'Dark Petition', 'Pelt Collector', 'Auramancer', 'Knight of the Reliquary', 'Treasure Cruise', 'Gitaxian Probe', 'Farseek', 'Tidehollow Sculler', 'Rootbound Crag', 'Temple of Silence', 'Thraben Inspector', 'Cabal Ritual', 'Deny Reality', 'Ancestor''s Chosen', 'Secluded Steppe', 'Erebos''s Intervention', 'Boggart Ram-Gang', 'Titania, Protector of Argoth', 'Glistener Elf', 'Midnight Clock', 'Syr Faren, the Hengehammer', 'Hinterland Harbor', 'Squadron Hawk', 'Brineborn Cutthroat', 'Dauntless Bodyguard', 'Nissa, Worldwaker', 'Snow-Covered Plains', 'Cleansing Wildfire', 'Llanowar Elves', 'Temple of Epiphany', 'Wasteland Strangler', 'Faerie Vandal', 'Blighted Agent', 'Slip Out the Back', 'Mind''s Desire', 'Phyrexian Dreadnought', 'Slagwoods Bridge', 'Shambling Vent', 'Fade from Memory', 'Scarab Feast', 'Serra Ascendant', 'Steel Sabotage', 'Hieroglyphic Illumination', 'Port Town', 'Doomskar', 'Kunoros, Hound of Athreos', 'Ashen Rider', 'Pyroclasm', 'Ossification', 'Sheoldred''s Edict', 'Recurring Nightmare', 'Sylvan Library', 'Slogurk, the Overslime', 'Recommission', 'Yavimaya Coast', 'Kaya, Ghost Assassin', 'Bituminous Blast', 'Dismal Backwater', 'Gideon''s Triumph', 'Astral Slide', 'Founding the Third Path', 'Smiting Helix', 'Vivid Marsh', 'Barren Moor', 'Demolition Field', 'Mana Leak', 'Wall of Omens', 'Frantic Search', 'Audacity', 'Runed Halo', 'Dire-Strain Rampage', 'Dimir Aqueduct', 'Throes of Chaos', 'Caves of Koilos', 'Distortion Strike', 'Recruitment Officer', 'Smoldering Marsh', 'Terramorphic Expanse', 'Drowned Catacomb', 'Arcum''s Astrolabe', 'Tempest Djinn', 'Vindicate', 'Thassa''s Intervention', 'Birds of Paradise', 'Restoration Angel', 'Satyr Wayfinder', 'Tanglepool Bridge', 'Dream Trawler', 'Izzet Boilerworks', 'Condemn', 'Kavu Predator', 'Ichorclaw Myr', 'Sleight of Hand', 'Kjeldoran Outpost', 'Cut Down', 'Astral Drift', 'The Birth of Meletis', 'Steel Leaf Champion', 'Isolated Chapel', 'Ponder', 'Martyr of Sands', 'Grave Titan', 'Sunpetal Grove', 'Entomber Exarch', 'Crumbling Necropolis', 'Kami of False Hope', 'Ziatora''s Envoy', 'Night Clubber', 'Experiment One', 'Swiftwater Cliffs', 'Vapor Snag', 'Ranger of Eos', 'Swans of Bryn Argoll', 'Memory Leak', 'Tolarian Terror', 'Aspect of Hydra', 'Temple of Malice', 'Commune with the Gods', 'Easy Prey', 'Gideon Jura', 'Drossforge Bridge', 'Kaito, Dancing Shadow', 'Might of Old Krosa', 'Decree of Justice', 'Evolving Wilds', 'Combat Thresher', 'Prismatic Omen', 'Ground Seal', 'Sunlit Marsh', 'Shardless Agent', 'Strategic Planning', 'Retreat to Coralhelm'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 7.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (11.9 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Akiri, Fearless Voyager', 'Founding the Third Path', 'Rally the Ancestors', 'Thraben Inspector', 'Fireblade Charger', 'Explore', 'Demon of Death''s Gate', 'Llanowar Elves', 'Gitaxian Probe', 'Recruitment Officer', 'Burst Lightning', 'Fact or Fiction', 'Ezuri, Renegade Leader', 'Duty-Bound Dead', 'Isolated Chapel', 'Elvish Archdruid', 'Bloodchief''s Thirst', 'Mana Leak', 'Viscera Seer', 'Repeal', 'Oni-Cult Anvil', 'Midnight Reaper', 'Arcbound Ravager', 'Tidehollow Sculler', 'Curse of Exhaustion', 'Cut Down', 'Gilt-Leaf Archdruid', 'Chain Lightning', 'Arcum''s Astrolabe', 'Duress', 'Lightning Spear', 'Tempest Djinn', 'Fyndhorn Elves', 'Dark Ritual', 'Curse of Death''s Hold', 'Soul of the Harvest', 'Nature''s Lore', 'Shambling Vent', 'Dread Wanderer', 'Night Clubber', 'Serrated Scorpion', 'Snow-Covered Mountain', 'Jor Kadeen, First Goldwarden', 'Sylvan Scrying', 'Leather Armor', 'Torment of Scarabs', 'Cruel Reality', 'Rabbit Battery', 'Kalonian Behemoth', 'Sudden Edict', 'Graven Cairns', 'Shrapnel Blast', 'Whisperwood Elemental', 'Loxodon Warhammer', 'Mishra''s Research Desk', 'Abiding Grace', 'Experimental Synthesizer', 'Gutterbones', 'Curse of Thirst', 'Blood Artist', 'Simian Sling', 'Scryb Ranger', 'Curiosity', 'Cabal Therapist', 'Sheoldred''s Edict', 'Faerie Vandal', 'Ranger of Eos', 'Archetype of Endurance', 'Joraga Warcaller', 'Rampant Growth', 'Benevolent Bodyguard', 'Drana, the Last Bloodchief', 'Devoted Druid', 'Umbral Mantle', 'Council''s Judgment', 'Kitesail Freebooter', 'Treasure Cruise', 'Dauntless Bodyguard', 'Tolarian Terror', 'Thragtusk', 'Tooth and Nail', 'Slitherhead', 'Bone Shards', 'Hieroglyphic Illumination', 'Elvish Mystic', 'Battlefield Forge', 'Stone Haven Outfitter', 'Clifftop Retreat', 'Elas il-Kor, Sadistic Pilgrim', 'Wasteland Strangler', 'Lose Focus', 'Heliod''s Pilgrim', 'Vindicate', 'Bloodsoaked Champion', 'Caves of Koilos', 'Kaervek, the Spiteful', 'Kami of False Hope', 'Executioner''s Capsule', 'Grim Haruspex', 'Demon of Dark Schemes', 'Blighted Woodland', 'Vapor Snag', 'Fetid Heath', 'Needle Spires', 'Ponder', 'Dryad Militant', 'Regrowth', 'Dungrove Elder', 'Lizard Blades', 'Night of Souls'' Betrayal', 'Weapons Trainer', 'Curse of Misfortunes', 'Disciple of the Vault', 'Kaya, Ghost Assassin', 'Kemba, Kha Enduring', 'Restoration Angel', 'Lead the Stampede', 'Snow-Covered Swamp', 'Smuggler''s Copter', 'Llanowar Tribe', 'Ravenous Squirrel', 'Scrabbling Claws', 'Khalni Ambush'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 11.9, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (6.0 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Bloodbraid Elf', 'Khalni Ambush', 'Repeal', 'Invigorate', 'Halo Scarab', 'Cleansing Wildfire', 'Judge''s Familiar', 'Gilt-Leaf Archdruid', 'Wild Cantor', 'Phalanx Leader', 'Ezuri, Renegade Leader', 'Favored Hoplite', 'Pelakka Predation', 'Fyndhorn Elves', 'Silverbluff Bridge', 'Simian Spirit Guide', 'Vapor Snag', 'Hyena Umbra', 'Ghost Quarter', 'Narcomoeba', 'Ichorclaw Myr', 'Glaring Aegis', 'Shardless Agent', 'Llanowar Elves', 'Duskmantle Guildmage', 'Idyllic Beachfront', 'Ponder', 'Angel of Glory''s Rise', 'Negan, the Cold-Blooded', 'Last Stand', 'Vindicate', 'Farseek', 'Sylvan Library', 'Umbral Mantle', 'Hieroglyphic Illumination', 'Tolarian Terror', 'Chain Lightning', 'Disrupting Shoal', 'Smiting Helix', 'Bloodchief''s Thirst', 'Azami, Lady of Scrolls', 'Memory Lapse', 'Spell Pierce', 'Loran''s Escape', 'Might of Old Krosa', 'Bontu''s Last Reckoning', 'Sudden Edict', 'Darksteel Colossus', 'Blackbloom Rogue', 'Easy Prey', 'Fetid Pools', 'Hinterland Harbor', 'Haunted Dead', 'Ethereal Armor', 'Devoted Druid', 'Condemn', 'Undercity Informer', 'Cabal Ritual', 'Vivid Marsh', 'River of Tears', 'Sweltering Suns', 'Defabricate', 'Drowned Catacomb', 'Illuminator Virtuoso', 'Erebos''s Intervention', 'Distortion Strike', 'Fact or Fiction', 'Nissa, Worldwaker', 'Elvish Archdruid', 'Tanglepool Bridge', 'Laboratory Maniac', 'Slip Out the Back', 'Choked Estuary', 'Audacity', 'Faerie Vandal', 'Ground Seal', 'Languish', 'Slagwoods Bridge', 'Become Immense', 'Sulfur Falls', 'Phyrexian Dreadnought', 'Sunken Hollow', 'Mistvault Bridge', 'Mindcrank', 'Zof Consumption', 'Dimir Aqueduct', 'Duress', 'Treasure Cruise', 'Curiosity', 'Lose Focus', 'Founding the Third Path', 'Bring to Light', 'Tempest Djinn', 'Cathedral of War', 'Gitaxian Probe', 'Mana Leak', 'Balustrade Spy', 'Tangled Islet', 'Divest', 'Dryad Militant', 'Joraga Warcaller', 'Codie, Vociferous Codex', 'Mnemonic Sphere', 'Legacy Weapon', 'Thassa''s Intervention', 'Ray of Revelation', 'Gryff''s Boon', 'Dread Return', 'Oust', 'Doomskar', 'Vivid Crag', 'Elvish Mystic', 'Blighted Agent', 'Celestial Colonnade', 'Whisperwood Elemental', 'Lotleth Giant', 'Ancient Grudge', 'Soul Snare', 'Pilfer', 'Llanowar Tribe', 'Lead the Stampede', 'Ziatora''s Envoy', 'Vines of Vastwood', 'Malakir Rebirth', 'Akoum Warrior', 'Delver of Secrets', 'Forbid', 'Glistener Elf', 'Phantasmagorian', 'Shivan Reef', 'Third Path Iconoclast', 'Dark Ritual', 'Darkmoss Bridge', 'Spikefield Hazard', 'Bala Ged Recovery', 'Azorius Chancery', 'Forsake the Worldly', 'Goblin Charbelcher', 'Birds of Paradise', 'Cleansing Nova', 'Tangled Florahedron', 'Jokulhaups', 'Enter the God-Eternals', 'Glacial Fortress', 'Myth Realized', 'Drossforge Bridge', 'Smoldering Marsh', 'Scryb Ranger', 'Runed Halo', 'Wrath of God', 'Sunlit Marsh', 'Yavimaya Coast', 'Prismatic Omen'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 6.0, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (5.4 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Tempest Djinn', 'Shivan Reef', 'Ground Seal', 'Balustrade Spy', 'Malakir Rebirth', 'Forbid', 'Nissa, Worldwaker', 'Haunted Dead', 'Condemn', 'Founding the Third Path', 'Repeal', 'Fiery Impulse', 'Slagwoods Bridge', 'Vapor Snag', 'Choked Estuary', 'Celestial Colonnade', 'Yavimaya Coast', 'Dark Ritual', 'Lose Focus', 'Phyrexian Dreadnought', 'Audacity', 'Ponder', 'Oust', 'Azami, Lady of Scrolls', 'Angel of Glory''s Rise', 'Razortide Bridge', 'Sudden Edict', 'Fetid Pools', 'Mana Leak', 'Doomskar', 'Forsake the Worldly', 'Myth Realized', 'Blackbloom Rogue', 'Spell Pierce', 'Third Path Iconoclast', 'Glistener Elf', 'Cabal Ritual', 'Shardless Agent', 'Tangled Islet', 'Ghost Quarter', 'Chain Lightning', 'Ichorclaw Myr', 'Duress', 'Flame Slash', 'Dryad Militant', 'Thassa''s Intervention', 'Easy Prey', 'Judge''s Familiar', 'Wild Cantor', 'Halo Scarab', 'Defabricate', 'Ossification', 'Distortion Strike', 'River of Tears', 'Gryff''s Boon', 'Wrath of God', 'Goblin Charbelcher', 'Mnemonic Sphere', 'Lotleth Giant', 'Sleight of Hand', 'Laboratory Maniac', 'Cleansing Nova', 'Soul Snare', 'Glaring Aegis', 'Rustvale Bridge', 'Zof Consumption', 'Narcomoeba', 'Hieroglyphic Illumination', 'Glacial Fortress', 'Might of Old Krosa', 'Faerie Vandal', 'Dimir Aqueduct', 'Sweltering Suns', 'Sprite Dragon', 'Drossforge Bridge', 'Tanglepool Bridge', 'Treasure Cruise', 'Ensoul Artifact', 'Simian Spirit Guide', 'Bloodchief''s Thirst', 'Invigorate', 'Ancient Grudge', 'Jokulhaups', 'Hinterland Harbor', 'Ethereal Armor', 'Vines of Vastwood', 'Gitaxian Probe', 'Duskmantle Guildmage', 'Darkmoss Bridge', 'Dive Down', 'Trickbind', 'Phalanx Leader', 'Disrupting Shoal', 'Curiosity', 'Dread Return', 'Languish', 'Tolarian Terror', 'Silverbluff Bridge', 'Cleansing Wildfire', 'Spikefield Hazard', 'Delver of Secrets', 'Gods Willing', 'Sulfur Falls', 'Pelakka Predation', 'Slip Out the Back', 'Pyroclasm', 'Drowned Catacomb', 'Hopeful Eidolon', 'Tangled Florahedron', 'Hyena Umbra', 'Erebos''s Intervention', 'Undercity Informer', 'Runed Halo', 'Stubborn Denial', 'Ray of Revelation', 'Favored Hoplite', 'Mindcrank', 'Pilfer', 'Phantasmagorian', 'Bloodbraid Elf', 'Memory Lapse', 'Rise and Shine', 'Blighted Agent', 'Mistvault Bridge', 'Peek', 'Impulse', 'Azorius Chancery'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 5.4, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (26.1 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Oust', 'Port Town', 'Loran''s Escape', 'Wayward Guide-Beast', 'Faerie Vandal', 'Shardless Agent', 'Reality Heist', 'Price of Progress', 'Delver of Secrets', 'Gitaxian Probe', 'Drown in Ichor', 'Rootbound Crag', 'Sleight of Hand', 'Runed Halo', 'Simian Spirit Guide', 'Darksteel Citadel', 'Silverbluff Bridge', 'Undercity Informer', 'Snow-Covered Plains', 'Frantic Search', 'Laboratory Maniac', 'Wild Cantor', 'Shambling Vent', 'Vindicate', 'Isolated Chapel', 'Pelakka Predation', 'Myr Enforcer', 'Lightning Strike', 'Favored Hoplite', 'Commune with Spirits', 'Prologue to Phyresis', 'Balustrade Spy', 'Bilious Skulldweller', 'Rift Bolt', 'Ray of Revelation', 'Fyndhorn Elves', 'Defabricate', 'Secluded Steppe', 'Phyrexian Dreadnought', 'Dismal Backwater', 'Mesmeric Fiend', 'Mind''s Desire', 'Lose Focus', 'Reject Imperfection', 'Valiant Rescuer', 'Peek', 'Shivan Wurm', 'Springleaf Drum', 'Thassa''s Intervention', 'Treasure Cruise', 'Incinerate', 'Shard Volley', 'Kaya, Ghost Assassin', 'Illuminator Virtuoso', 'Slagwoods Bridge', 'Choked Estuary', 'Barkhide Troll', 'Ossification', 'Dizzy Spell', 'Ghost Quarter', 'Arcbound Ravager', 'Briarbridge Tracker', 'Mishra''s Factory', 'Cleansing Wildfire', 'Infectious Inquiry', 'Doomskar', 'Vapor Snag', 'Goblin Charbelcher', 'Jace, Architect of Thought', 'Dark Ritual', 'Haunted Dead', 'Sojourner''s Companion', 'Glacial Fortress', 'Academy Loremaster', 'Ponder', 'Steel Overseer', 'Herald of the Pantheon', 'Sigil of the Empty Throne', 'Game Trail', 'Dryad Militant', 'Arcbound Worker', 'Mesa Enchantress', 'Forging the Anchor', 'Dark Petition', 'Fetid Heath', 'Scarab Feast', 'Astral Slide', 'Halana and Alena, Partners', 'Phalanx Leader', 'Destiny Spinner', 'Drossforge Bridge', 'Dimir Aqueduct', 'Timeless Dragon', 'Stern Lesson', 'Astral Drift', 'Bloodbraid Elf', 'Nissa, Worldwaker', 'Hieroglyphic Illumination', 'Night of Souls'' Betrayal', 'Canopy Vista', 'Spell Pierce', 'Vault Skirge', 'Bring the Ending', 'Kruphix''s Insight', 'Repeal', 'Zof Consumption', 'Mazemind Tome', 'Ghitu Lavarunner', 'Condemn', 'Cabal Ritual', 'Drowned Catacomb', 'Wasteland Strangler', 'Chain Lightning', 'Tendrils of Agony', 'Ground Seal', 'Dawn of Hope', 'Memory''s Journey', 'Bloodchief''s Thirst', 'Phantasmagorian', 'Azami, Lady of Scrolls', 'Combat Thresher', 'Barren Moor', 'Tangled Florahedron', 'Celestial Colonnade', 'Birds of Paradise', 'Dream Trawler', 'Venser, Corpse Puppet', 'Ornithopter', 'Tree of Tales', 'Master of Etherium', 'Darkmoss Bridge', 'Spirited Companion', 'Voidwing Hybrid', 'Anoint with Affliction', 'Lotleth Giant', 'Enchantress''s Presence', 'Hyena Umbra', 'Ancient Grudge', 'Tidehollow Sculler', 'Barbarian Ring', 'Fade from Memory', 'Sylvan Library', 'Jokulhaups', 'Caves of Koilos', 'Slip Out the Back', 'Memory Lapse', 'Burst Lightning', 'Flametongue Kavu', 'Sweltering Suns', 'Experimental Augury', 'Forbid', 'Ethereal Armor', 'Grave Titan', 'Impulse', 'Abundant Growth', 'Blackbloom Rogue', 'Midnight Clock', 'Mana Leak', 'Gruul Spellbreaker', 'Dive Down', 'Halo Scarab', 'Malakir Rebirth', 'Wrath of God', 'Boon-Bringer Valkyrie', 'Flourishing Fox', 'Strategic Planning', 'Arcum''s Astrolabe', 'Duress', 'Narcomoeba', 'Ash Zealot', 'Brineborn Cutthroat', 'Easy Prey', 'Glaring Aegis', 'Trickbind', 'Disrupting Shoal', 'Archon of Sun''s Grace', 'Scattered Groves', 'Kunoros, Hound of Athreos', 'Domri Rade', 'Sunpetal Grove', 'Baffling End', 'Azorius Charm', 'Distorted Curiosity', 'Gryff''s Boon', 'Snow-Covered Swamp', 'Jukai Naturalist', 'Waterfront District', 'Kessig Wolf Run', 'Thaumatic Compass', 'Dread Return', 'Pilfer', 'Judge''s Familiar', 'Tanglepool Bridge', 'Mistvault Bridge', 'Angel of Glory''s Rise'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 26.1, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (12.2 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Dire-Strain Rampage', 'Secluded Steppe', 'Kaito, Dancing Shadow', 'Balustrade Spy', 'Hinterland Harbor', 'Mishra''s Factory', 'Choked Estuary', 'Shambling Vent', 'Lotleth Giant', 'Disrupting Shoal', 'Night of Souls'' Betrayal', 'Flourishing Fox', 'Mistvault Bridge', 'Fade from Memory', 'Sulfur Falls', 'Third Path Iconoclast', 'Isolated Chapel', 'Thassa''s Intervention', 'Rift Sower', 'Dark Ritual', 'Wrath of God', 'Silverbluff Bridge', 'Zof Consumption', 'Fetid Heath', 'Ash Zealot', 'Meeting of Minds', 'Goblin Charbelcher', 'Ghitu Lavarunner', 'Wasteland Strangler', 'Yavimaya Coast', 'Arcum''s Astrolabe', 'Lurrus of the Dream-Den', 'Frantic Search', 'Tendrils of Agony', 'Frontier Bivouac', 'Barbarian Ring', 'Defabricate', 'Burst Lightning', 'Ghost Quarter', 'Wayward Guide-Beast', 'Kaya, Ghost Assassin', 'Squadron Hawk', 'Ray of Revelation', 'Yawgmoth''s Bargain', 'Vivid Grove', 'Crimson Wisps', 'Thraben Inspector', 'Valiant Rescuer', 'Laboratory Maniac', 'Winds of Abandon', 'Myth Realized', 'End-Raze Forerunners', 'Vindicate', 'Spell Pierce', 'Malakir Rebirth', 'Angel of Glory''s Rise', 'Blackbloom Rogue', 'Mistveil Plains', 'Slagwoods Bridge', 'Dive Down', 'Fatestitcher', 'Shardless Agent', 'Bloodbraid Elf', 'Baral''s Expertise', 'Memory''s Journey', 'Ancient Grudge', 'Phoenix Chick', 'Colossal Skyturtle', 'Spikefield Hazard', 'Wild Cantor', 'Delver of Secrets', 'Riftwing Cloudskate', 'Kogla, the Titan Ape', 'Dark Petition', 'Mnemonic Sphere', 'Condemn', 'Drossforge Bridge', 'Vapor Snag', 'Cerulean Wisps', 'Mesmeric Fiend', 'Narcomoeba', 'Simian Spirit Guide', 'Cabal Ritual', 'Astral Slide', 'Snow-Covered Swamp', 'Sprite Dragon', 'Glittering Wish', 'Glacial Fortress', 'Seaside Citadel', 'Trickbind', 'Timeless Dragon', 'Founding the Third Path', 'Stubborn Denial', 'Impulse', 'Doomskar', 'Pyroclasm', 'Forsake the Worldly', 'Force of Rage', 'Peek', 'Undercity Informer', 'Sleight of Hand', 'Gitaxian Probe', 'Jokulhaups', 'Azorius Chancery', 'Shivan Reef', 'Frost Titan', 'Tangled Florahedron', 'Birds of Paradise', 'Haunted Dead', 'Grim Lavamancer', 'Astral Drift', 'Demolition Field', 'Seal of Cleansing', 'Caves of Koilos', 'Incinerate', 'Reinforced Ronin', 'Brain Freeze', 'Memory Lapse', 'Hypergenesis', 'Azami, Lady of Scrolls', 'Nissa, Worldwaker', 'Spark Elemental', 'Martyr of Sands', 'Mind''s Desire', 'Ashen Rider', 'Ranger of Eos', 'Shard Volley', 'Serra Ascendant', 'Faerie Vandal', 'Lose Focus', 'Halo Scarab', 'Scroll of Griselbrand', 'Abiding Grace', 'Scarab Feast', 'Price of Progress', 'Lightning Strike', 'Ponder', 'Grave Titan', 'Hope of Ghirapur', 'Celestial Colonnade', 'Drowned Catacomb', 'Tezzeret the Schemer', 'Tanglepool Bridge', 'Dread Return', 'Combat Thresher', 'Slip Out the Back', 'Pelakka Predation', 'Tolarian Terror', 'Unsubstantiate', 'Mana Leak', 'Chain Lightning', 'Sweltering Suns', 'Dryad Militant', 'Kjeldoran Outpost', 'Utopia Tree', 'Boon-Bringer Valkyrie', 'Snow-Covered Plains', 'Cleansing Nova', 'Ground Seal', 'Sylvan Caryatid', 'Collateral Damage', 'Angel of Serenity', 'Stern Dismissal', 'Jeskai Ascendancy', 'Dimir Aqueduct', 'Reason // Believe', 'Oust', 'Barren Moor', 'Izzet Charm', 'Search for Tomorrow', 'Flame Rift', 'Abundant Harvest', 'Tidehollow Sculler', 'Void Snare', 'Kunoros, Hound of Athreos', 'Cleansing Wildfire', 'Treasure Cruise', 'Phyrexian Dreadnought', 'Easy Prey', 'Wandering Fumarole', 'Mirrorshell Crab', 'Threats Undetected', 'Soul Snare', 'Phantasmagorian', 'Rift Bolt', 'Kami of False Hope', 'Runed Halo'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 12.2, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (16.3 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Disrupting Shoal', 'Codie, Vociferous Codex', 'Gyruda, Doom of Depths', 'Undercity Informer', 'Faerie Vandal', 'Halo Scarab', 'Stromkirk Noble', 'Trickbind', 'Memory''s Journey', 'Lotleth Giant', 'Restoration Angel', 'Prismatic Omen', 'Phantasmal Image', 'Jokulhaups', 'Jeskai Ascendancy', 'Defabricate', 'Tangled Islet', 'Ancient Grudge', 'Sunken Hollow', 'Chandra, Flamecaller', 'Incinerate', 'Crimson Wisps', 'Qasali Pridemage', 'Shard Volley', 'Drowned Catacomb', 'Altered Ego', 'Colossification', 'Scarab Feast', 'Treasure Cruise', 'Oust', 'Dive Down', 'Utopia Tree', 'Coiling Oracle', 'Arbor Elf', 'Colossal Skyturtle', 'Vision Skeins', 'Favored Hoplite', 'Gideon Jura', 'Frontier Bivouac', 'Unsubstantiate', 'Bloodsoaked Champion', 'Mana Leak', 'Hyena Umbra', 'Vizier of Many Faces', 'Thornglint Bridge', 'Runed Halo', 'Sprite Dragon', 'Barbarian Ring', 'Hinterland Harbor', 'Smiting Helix', 'Fatestitcher', 'Narcomoeba', 'Simian Spirit Guide', 'Zof Consumption', 'Shizo, Death''s Storehouse', 'General Ferrous Rokiric', 'Mishra''s Factory', 'Thragtusk', 'Phyrexian Dreadnought', 'Malakir Rebirth', 'Rift Bolt', 'Cleansing Wildfire', 'Sovereigns of Lost Alara', 'Glaring Aegis', 'Slagwoods Bridge', 'Farseek', 'Delver of Secrets', 'Dream Trawler', 'Glittering Wish', 'Fact or Fiction', 'Cerulean Wisps', 'Cabal Ritual', 'Phantasmagorian', 'Mind''s Desire', 'Smoldering Marsh', 'Reckless Waif', 'Laboratory Maniac', 'Wrath of God', 'Caves of Koilos', 'Ponder', 'Vivid Grove', 'Phalanx Leader', 'Timeless Dragon', 'Frantic Search', 'Night Market Lookout', 'Isolated Chapel', 'Canopy Vista', 'Loxodon Smiter', 'Shinka, the Bloodsoaked Keep', 'Burst Lightning', 'Ancient Ziggurat', 'Scrapheap Scrounger', 'Zurgo Bellstriker', 'Kappa Tech-Wrecker', 'Bloodbraid Elf', 'Skyclave Shade', 'Angel of Glory''s Rise', 'Vindicate', 'Anger of the Gods', 'Cyclops of Eternal Fury', 'Shivan Reef', 'Ghost Quarter', 'Natural State', 'Blackbloom Rogue', 'Condemn', 'Yahenni''s Expertise', 'Ghitu Lavarunner', 'Birds of Paradise', 'Fertile Ground', 'Last Stand', 'Boon-Bringer Valkyrie', 'Abbot of Keral Keep', 'Night of Souls'' Betrayal', 'Eldrazi Conscription', 'Garruk Wildspeaker', 'Thassa''s Intervention', 'Sunlit Marsh', 'Slip Out the Back', 'Price of Progress', 'Explore', 'Negan, the Cold-Blooded', 'Chain Lightning', 'Kumano Faces Kakkazan', 'Sire of Insanity', 'Vivid Crag', 'Pelakka Predation', 'Ray of Revelation', 'River of Tears', 'Vapor Snag', 'Dread Wanderer', 'Bring to Light', 'Abundant Harvest', 'Peek', 'Vivid Marsh', 'Cleansing Nova', 'Vampire Lacerator', 'Illuminator Virtuoso', 'Wild Cantor', 'Guildmages'' Forum', 'Silverbluff Bridge', 'Dark Petition', 'Dread Return', 'Shambling Vent', 'Spell Pierce', 'Azami, Lady of Scrolls', 'Worship', 'Kitchen Finks', 'Sleight of Hand', 'Razortide Bridge', 'Idyllic Beachfront', 'Sulfur Falls', 'Primal Command', 'Jace, Architect of Thought', 'Dryad Militant', 'Judge''s Familiar', 'Yavimaya Coast', 'Dark Ritual', 'Goblin Charbelcher', 'Cut Down', 'Smuggler''s Copter', 'Sunpetal Grove', 'Perilous Research', 'Balustrade Spy', 'Sylvan Library', 'Fetid Heath', 'Tendrils of Agony', 'Founding the Third Path', 'Kunoros, Hound of Athreos', 'Kaya, Ghost Assassin', 'Gitaxian Probe', 'Howlpack Piper', 'Ethereal Armor', 'Tidehollow Sculler', 'Troll Ascetic', 'Shalai, Voice of Plenty', 'Loran''s Escape', 'Advent of the Wurm', 'Wayward Guide-Beast', 'Rustvale Bridge', 'Spikefield Hazard', 'Third Path Iconoclast', 'Flame Rift', 'Tangled Florahedron', 'Armored Scrapgorger', 'Tanglepool Bridge', 'Grand Arbiter Augustin IV', 'Seaside Citadel', 'Enter the God-Eternals', 'Pain Seer', 'Undercover Operative', 'Lose Focus', 'Ash Zealot', 'Fiery Impulse', 'Haunted Dead', 'Joint Exploration', 'Void Snare', 'Burning of Xinye', 'Impulse', 'Fleecemane Lion', 'Battlefield Forge', 'Sylvan Caryatid', 'Kitesail Freebooter', 'Lightning Strike', 'Gryff''s Boon', 'Wargate', 'Grave Titan'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 16.3, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (10.8 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Trickbind', 'Shimmer Dragon', 'Defiler of Instinct', 'Rix Maadi Reveler', 'Night Market Lookout', 'Augur of Skulls', 'Tocatli Honor Guard', 'Balustrade Spy', 'Astral Drift', 'Goblin Dark-Dwellers', 'Aether Spellbomb', 'Vindicate', 'Asylum Visitor', 'Dread Wanderer', 'Flourishing Fox', 'Sweltering Suns', 'Price of Progress', 'Bloodsoaked Champion', 'Scrapheap Scrounger', 'Cabal Ritual', 'Phyrexian Dreadnought', 'Rakdos Headliner', 'Smuggler''s Copter', 'Barren Moor', 'Tectonic Giant', 'Sulfur Falls', 'Easy Prey', 'Phantasmagorian', 'Grave Titan', 'Tolarian Terror', 'Basking Rootwalla', 'Runed Halo', 'Goblin Charbelcher', 'Abiding Grace', 'Valiant Rescuer', 'Lose Focus', 'Darksteel Colossus', 'Dark Ritual', 'Scrabbling Claws', 'Undercity Informer', 'Repeal', 'Martyr of Sands', 'Nezumi Shortfang', 'Vapor Snag', 'Kumano Faces Kakkazan', 'Astral Slide', 'Dragonskull Summit', 'Gadrak, the Crown-Scourge', 'Silumgar''s Scorn', 'Gitaxian Probe', 'Shard Volley', 'Sejiri Shelter', 'Scrying Sheets', 'Tectonic Edge', 'Kaya, Ghost Assassin', 'Hushwing Gryff', 'Benevolent Bodyguard', 'Chain Lightning', 'Peek', 'Defabricate', 'Impulse', 'Founding the Third Path', 'Treasure Cruise', 'Kunoros, Hound of Athreos', 'Lightning Strike', 'Wasteland Strangler', 'Mesmeric Fiend', 'Incinerate', 'Giant Killer', 'The Blackstaff of Waterdeep', 'Spikefield Hazard', 'Wrench Mind', 'Dragon''s Hoard', 'Caves of Koilos', 'Sleight of Hand', 'Zof Consumption', 'Etali, Primal Storm', 'Graven Cairns', 'Mishra''s Factory', 'Kairi, the Swirling Sky', 'Fiery Temper', 'Invasion of Azgol', 'Vampire Lacerator', 'Burst Lightning', 'Lotleth Giant', 'Drossforge Bridge', 'Boon-Bringer Valkyrie', 'Ash Zealot', 'Curiosity', 'Fade from Memory', 'Anger of the Gods', 'Disrupting Shoal', 'Shrieking Affliction', 'Cut Down', 'Haunted Dead', 'Cleansing Wildfire', 'Ghitu Lavarunner', 'Mana Leak', 'Glorybringer', 'Simian Spirit Guide', 'Akoum Warrior', 'Timeless Dragon', 'Cry of Contrition', 'Dive Down', 'Cult Conscript', 'Falkenrath Pit Fighter', 'Combat Thresher', 'Dead of Winter', 'Tempest Djinn', 'Arcum''s Astrolabe', 'Wayward Guide-Beast', 'Snow-Covered Plains', 'Scarab Feast', 'Barbarian Ring', 'Night of Souls'' Betrayal', 'Blazing Rootwalla', 'Slip Out the Back', 'Mizzium Mortars', 'Rift Bolt', 'Okiba Reckoner Raid', 'Darksteel Citadel', 'Stoic Rebuttal', 'Kami of False Hope', 'Mishra''s Research Desk', 'Sarkhan, the Dragonspeaker', 'Spell Pierce', 'Isolated Chapel', 'Silverbluff Bridge', 'Deadeye Tracker', 'Secluded Steppe', 'Blackbloom Rogue', 'Fetid Heath', 'Delver of Secrets', 'Tidehollow Sculler', 'Sin Prodder', 'Chandra, Flamecaller', 'Fact or Fiction', 'Faerie Vandal', 'Ponder', 'Koth, Fire of Resistance', 'Ossification', 'Recruitment Officer', 'Raven''s Crime', 'Big Score', 'Witching Well', 'Pelakka Predation', 'Duress', 'Pain Seer', 'Shambling Vent', 'Seething Song', 'Malakir Rebirth', 'Snow-Covered Swamp', 'Sudden Edict', 'Narcomoeba', 'Hieroglyphic Illumination', 'Dread Return', 'Geomancer''s Gambit'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 10.8, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (24.8 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Vault Skirge', 'Michiko''s Reign of Truth', 'Icehide Golem', 'Ichorclaw Myr', 'Yavimaya Coast', 'Boon-Bringer Valkyrie', 'Tempered Steel', 'Dread Return', 'Laboratory Maniac', 'Dark Petition', 'Sulfur Falls', 'Thirst for Knowledge', 'Kaya, Ghost Assassin', 'Swooping Lookout', 'Bontu''s Last Reckoning', 'Dark Ritual', 'Distortion Strike', 'Treasure Cruise', 'Pelakka Predation', 'Vines of Vastwood', 'Might of Old Krosa', 'Sprite Dragon', 'Jokulhaups', 'Simian Spirit Guide', 'Haunted Dead', 'Kunoros, Hound of Athreos', 'Ensoul Artifact', 'Zof Consumption', 'Disrupting Shoal', 'Narcomoeba', 'Blackbloom Rogue', 'Ghost Quarter', 'Runed Halo', 'Blacksmith''s Skill', 'Phantasmagorian', 'Yahenni''s Expertise', 'Mana Leak', 'Mishra''s Factory', 'Glistener Elf', 'Eater of Virtue', 'Graven Cairns', 'Frostwalk Bastion', 'Caves of Koilos', 'The Blackstaff of Waterdeep', 'Seething Song', 'Empty the Warrens', 'Drossforge Bridge', 'Strike It Rich', 'Isolated Chapel', 'Arcbound Mouser', 'Always Watching', 'Snow-Covered Plains', 'Spell Pierce', 'Scarab Feast', 'Delver of Secrets', 'Darksteel Citadel', 'Duress', 'Balustrade Spy', 'Kaya, Intangible Slayer', 'Invigorate', 'Tangled Islet', 'Tidehollow Sculler', 'Yawgmoth''s Bargain', 'Dispatch', 'Geomancer''s Gambit', 'Night of Souls'' Betrayal', 'Cleansing Wildfire', 'Third Path Iconoclast', 'Court Homunculus', 'Rustvale Bridge', 'Shambling Vent', 'Fiery Impulse', 'Volcanic Spite', 'Audacity', 'Lose Focus', 'Chain Lightning', 'Grave Titan', 'Timeless Dragon', 'Glacial Fortress', 'Gitaxian Probe', 'Nimbus Maze', 'Malakir Rebirth', 'Invoke Calamity', 'Angel of Glory''s Rise', 'Monoskelion', 'Ornithopter', 'Tendrils of Agony', 'Blighted Agent', 'Fetid Heath', 'Smuggler''s Copter', 'Ghostfire Blade', 'Undercity Informer', 'Steel Overseer', 'Hope of Ghirapur', 'Hinterland Harbor', 'Springleaf Drum', 'Azami, Lady of Scrolls', 'Goblin Charbelcher', 'Ponder', 'Arcbound Ravager', 'Vindicate', 'Impulse', 'Cabal Ritual', 'Shivan Reef'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 24.8, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (8.3 > 0.5) 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

    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
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Goblin Charbelcher', 'Orim''s Chant', 'Phyrexian Revoker', 'Oust', 'Laboratory Maniac', 'Angel of Glory''s Rise', 'Faerie Vandal', 'Chandra, Flamecaller', 'Thornglint Bridge', 'Easy Prey', 'Flourishing Fox', 'Ponder', 'Night of Souls'' Betrayal', 'Runed Halo', 'Vapor Snag', 'Simian Spirit Guide', 'Spell Pierce', 'Kaito, Dancing Shadow', 'Mishra''s Factory', 'Memory''s Journey', 'Pelakka Predation', 'Roadside Reliquary', 'Blackbloom Rogue', 'Price of Progress', 'Shard Volley', 'General Ferrous Rokiric', 'Martyr of Sands', 'Tezzeret the Schemer', 'Ghitu Lavarunner', 'Tanglepool Bridge', 'Mana Leak', 'Wrath of God', 'Forsake the Worldly', 'Archangel of Wrath', 'Secluded Steppe', 'Soul Snare', 'Treasure Cruise', 'Goldmire Bridge', 'Astral Drift', 'Barbarian Ring', 'Flame Rift', 'Delver of Secrets', 'Deprive', 'Peek', 'Memory Lapse', 'Dire-Strain Rampage', 'Ghost Quarter', 'Kunoros, Hound of Athreos', 'Astral Slide', 'Ash Zealot', 'Gitaxian Probe', 'Valiant Rescuer', 'Bloodbraid Elf', 'Ground Seal', 'Zof Consumption', 'Barren Moor', 'Blossoming Calm', 'Kumano Faces Kakkazan', 'Erebos''s Intervention', 'Lotleth Giant', 'Lose Focus', 'Mnemonic Sphere', 'Seal of Cleansing', 'Slagwoods Bridge', 'Phyrexian Dreadnought', 'Annex Sentry', 'Demolition Field', 'Temple of Enlightenment', 'Celestial Colonnade', 'Shardless Agent', 'Cabal Ritual', 'Wasteland Strangler', 'Mesmeric Fiend', 'Snow-Covered Swamp', 'Cleansing Wildfire', 'Dispatch', 'Snow-Covered Mountain', 'Dive Down', 'Negan, the Cold-Blooded', 'Snow-Covered Plains', 'Phoenix Chick', 'Grave Titan', 'Bala Ged Recovery', 'Pilfering Imp', 'Goblin Dark-Dwellers', 'Lurrus of the Dream-Den', 'Hope of Ghirapur', 'Darksteel Colossus', 'Dawn of Hope', 'Scroll of Griselbrand', 'Arcum''s Astrolabe', 'Vindicate', 'Wayward Guide-Beast', 'Isolated Chapel', 'Recruitment Officer', 'Terminate', 'Jokulhaups', 'Shambling Vent', 'Azami, Lady of Scrolls', 'Incinerate', 'Destroy the Evidence', 'Combat Thresher', 'Kazandu Mammoth', 'Coiling Oracle', 'Rift Bolt', 'Burst Lightning', 'Phyrexian Censor', 'Malakir Rebirth', 'Ancient Grudge', 'Tangled Florahedron', 'Silverbluff Bridge', 'Michiko''s Reign of Truth', 'Timeless Dragon', 'Trickbind', 'Disrupting Shoal', 'Chain Lightning', 'Touch the Spirit Realm', 'Narcomoeba', 'Tidehollow Sculler', 'Defabricate', 'Duress', 'Phantasmagorian', 'Boon-Bringer Valkyrie', 'Balustrade Spy', 'Founding the Third Path', 'Undercity Informer', 'Abiding Grace', 'Dread Return', 'Drossforge Bridge', 'Lightning Strike', 'Pyroclasm', 'Glacial Fortress', 'Dryad Militant', 'Judge''s Familiar', 'Haunted Dead', 'Negate', 'Impulse', 'Fetid Heath', 'Nissa, Worldwaker', 'Fade from Memory', 'Viashino Pyromancer', 'Slip Out the Back', 'Kami of False Hope', 'Dark Ritual', 'Scarab Feast', 'Seal of Removal', 'Wild Cantor', 'Sweltering Suns', 'Myth Realized', 'Caves of Koilos', 'Azorius Chancery', 'Forbid', 'Lodestone Golem', 'Mistvault Bridge', 'Invasion of Azgol', 'Necrogen Spellbomb', 'Kaya, Ghost Assassin', 'Ray of Revelation', 'Garruk Wildspeaker', 'Halo Scarab', 'Rustvale Bridge', 'Tocatli Honor Guard', 'Radiant Scrollwielder', 'Sleight of Hand', 'Alabaster Host Intercessor'))) 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
        active_date DESC, d.finish IS NULL, d.finish

```

[] (slow_query, 8.3, mysql)

Reported on decksite by mysql-perf

Location Hash: 4dbce9248778bac49eac85ba20d34a2316a2426e

Labels: decksite