Open vorpal-buildbot opened 2 years ago
Exceeded slow_query limit (72.0 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Darigaaz Reincarnated', 'Heartless Act', 'Aetherspouts', 'Temple of Deceit', 'Knight Exemplar', 'Sylvan Scrying', 'Power Conduit', 'Asylum Visitor', 'Icebreaker Kraken', 'Flame Slash', 'Satyr Wayfinder', 'Chief of the Foundry', 'Thalia, Heretic Cathar', 'Vivid Grove', 'Jace, Memory Adept', 'Dragonsguard Elite', 'Cruel Reality', 'Bloodchief Ascension', 'Pariah', 'Molten Rain', 'Set Adrift', 'Blessed Respite', 'Dread Fugue', 'Rise and Shine', 'Llanowar Tribe', 'Barrin, Tolarian Archmage', 'Life of Toshiro Umezawa', 'Patchwork Automaton', 'Kitchen Finks', 'Syr Faren, the Hengehammer', 'Eiganjo Castle', 'Sire of Insanity', 'Renegade Tactics', 'Ral, Storm Conduit', 'Accorder Paladin', 'Cloudpost', 'Guardian Idol', 'Abiding Grace', 'Tormented Hero', 'Aethersphere Harvester', 'Rhys the Redeemed', 'Goblin Ringleader', 'Faerie Vandal', 'Dragon Turtle', 'Port Town', 'Coat of Arms', 'Gyruda, Doom of Depths', 'Canyon Slough', 'Ondu Cleric', 'Colossal Skyturtle', 'Kogla, the Titan Ape', 'Ancient Stirrings', 'Gaea''s Will', 'Goblin Bushwhacker', 'Tangled Florahedron', 'Condemn', 'Pyromancer Ascension', 'Mana Leak', 'Fading Hope', 'Dryad Militant', 'Astral Cornucopia', 'Ancient Amphitheater', 'Wolfwillow Haven', 'Temple of Malady', 'Entomber Exarch', 'Eldrazi Displacer', 'Goblin Dark-Dwellers', 'Plow Under', 'Verdurous Gearhulk', 'See the Truth', 'Spikefield Hazard', 'Recruit the Worthy', 'Melira, Sylvok Outcast', 'Chandra, Pyromaster', 'Scuttletide', 'Pelakka Predation', 'Yidaro, Wandering Monster', 'Guardian Seraph', 'Banehound', 'Thought Scour', 'Duskmantle Guildmage', 'Skyclave Cleric', 'Lavaball Trap', 'Pillage', 'Archaeomancer', 'Beckon Apparition', 'Dermotaxi', 'Madcap Experiment', 'Utopia Tree', 'Jace, the Living Guildpact', 'Kitchen Imp', 'Vampires'' Vengeance', 'Sarcomancy', 'Ondu Inversion', 'Razortide Bridge', 'Goblin Warchief', 'Master of Etherium', 'Blighted Agent', 'Sage of Epityr', 'Energy Chamber', 'Presence of Gond', 'Thornwood Falls', 'Groundswell', 'Experimental Synthesizer', 'Tyrant''s Choice', 'Go for Blood', 'Blackbloom Rogue', 'Ancestral Anger', 'Runed Halo', 'Flourishing Fox', 'Elemental Mastery', 'Chandra''s Regulator', 'Neheb, Dreadhorde Champion', 'Bloodchief''s Thirst', 'Mindcrank', 'Upheaval', 'Sephara, Sky''s Blade', 'Dark Petition', 'Jor Kadeen, the Prevailer', 'Kambal, Consul of Allocation', 'Judge''s Familiar', 'Relic Robber', 'Valakut Predator', 'Lurking Roper', 'Sanctum of Stone Fangs', 'Oust', 'Barrier of Bones', 'Sulfur Falls', 'Flood Plain', 'Temple of the Dragon Queen', 'Siege-Gang Commander', 'Azor, the Lawbringer', 'Forbid', 'Soul Warden', 'Terminus', 'Sunpetal Grove', 'Mistvault Bridge', 'Magus of the Moat', 'Lochmere Serpent', 'Teferi, Mage of Zhalfir', 'Thraben Inspector', 'Chitterspitter', 'Umara Wizard', 'Battle at the Bridge', 'Vedalken Aethermage', 'Eternal Scourge', 'Okiba Reckoner Raid', 'Sorin Markov', 'Shatter the Sky', 'Treasure Mage', 'Harsh Mentor', 'Venerable Knight', 'Merfolk Secretkeeper', 'Reality Ripple', 'Divination', 'Mizzium Mortars', 'Lodestone Golem', 'Putrid Imp', 'Psychic Spiral', 'Tectonic Giant', 'Kazandu Blademaster', 'Glint Hawk', 'Delver of Secrets', 'Mantis Rider', 'Song of Creation', 'Expedition Map', 'Bedlam Reveler', 'Surge Node', 'Galvanic Relay', 'Raise the Alarm', 'Invigorate', 'Blade Splicer', 'Rootwater Depths', 'Ramunap Excavator', 'Necropede', 'Thirst for Discovery', 'Legion Angel', 'Mishra''s Factory', 'Nissa, Steward of Elements', 'Dark Ritual', 'Howling Mine', 'Commune with the Gods', 'Cleansing Wildfire', 'Piranha Marsh', 'Heir of Falkenrath', 'Lantern-Lit Graveyard', 'Ornithopter', 'Ultimate Price', 'Eldrazi Mimic', 'Ichorclaw Myr', 'Bazaar Trademage', 'Garruk Wildspeaker', 'Tendrils of Agony', 'Azorius Charm', 'Heartless Summoning', 'Experimental Frenzy', 'Read the Bones', 'Boros Reckoner', 'Omen of the Dead', 'Falkenrath Gorger', 'Secluded Courtyard', 'Secluded Steppe', 'Cabal Therapist', 'Deploy the Gatewatch', 'Clockspinning', 'Veinfire Borderpost', 'Zealous Persecution', 'Experiment One', 'Squadron Hawk', 'Isamaru, Hound of Konda', 'Empty the Warrens', 'Kari Zev, Skyship Raider', 'Burning of Xinye', 'Viashino Pyromancer', 'Joraga Treespeaker', 'Kiln Fiend', 'Mystical Teachings', 'Scryb Ranger', 'Izzet Boilerworks', 'Imperious Perfect', 'Vindicate', 'Sejiri Shelter', 'Seraph Sanctuary', 'Exclude', 'Mistvein Borderpost', 'Arbor Elf', 'Deep Forest Hermit', 'Court Homunculus', 'Imposing Vantasaur', 'Memory Lapse', 'Moonsnare Prototype', 'Thaumatic Compass', 'Cackling Counterpart', 'Halimar Excavator', 'Primal Command', 'Silence', 'Lightning Strike', 'Destroy the Evidence', 'Aetherling', 'Kitesail Freebooter', 'Emerald Charm', 'Dimir Aqueduct', 'Angel of Sanctions', 'Shambling Vent', 'Drey Keeper', 'Baneslayer Angel', 'Vault of the Archangel', 'Prophetic Prism', 'Supreme Will', 'Slagwoods Bridge', 'Alms of the Vein', 'Blood Fountain', 'Kalonian Tusker', 'Expansion // Explosion', 'Bloodvial Purveyor', 'Increasing Vengeance', 'Starstorm', 'Midnight Clock', 'Grapple with the Past', 'Astral Drift', 'Nomad Outpost', 'Mystic Retrieval', 'Prophet of Kruphix', 'Chandra, Fire Artisan', 'Dash Hopes', 'Chandra, Fire of Kaladesh', 'Restore Balance', 'Strangleroot Geist', 'Sea Gate Oracle', 'Mindslaver', 'You See a Guard Approach', 'Wall of Omens', 'Paralyze', 'Hanweir Garrison', 'Reckless Impulse', 'Temple of Abandon', 'Trickbind', 'Fiery Temper', 'Aria of Flame', 'Regal Force', 'Pathrazer of Ulamog', 'The Raven''s Warning', 'Wolfbriar Elemental', 'Quest for Ula''s Temple', 'Ghost Quarter', 'Pyroclasm', 'Quest for the Goblin Lord', 'Arlinn Kord', 'Ensoul Artifact', 'Dragonskull Summit', 'Loxodon Warhammer', 'Shrapnel Blast', 'Turnabout', 'Shrine of the Forsaken Gods', 'Godhead of Awe', 'Reinforced Ronin', 'Lathliss, Dragon Queen', 'Bile Blight', 'Deathgorge Scavenger', 'Season of Growth', 'Wayfarer''s Bauble', 'Lead the Stampede', 'Blessed Alliance', 'Search for Azcanta', 'Rampaging Ferocidon', 'Raging Ravine', 'Fact or Fiction', 'Kefnet the Mindful', 'Soul of New Phyrexia', 'Cascading Cataracts', 'Tanglepool Bridge', 'Prosperous Innkeeper', 'Somber Hoverguard', 'Light Up the Night', 'Drossforge Bridge', 'Inscription of Ruin', 'Dead // Gone', 'Sanguine Statuette', 'Day of Judgment', 'Buried Ruin', 'Spark Spray', 'Yahenni''s Expertise', 'Myr Battlesphere', 'Lumbering Falls', 'Angelic Destiny', 'Hypergenesis', 'Negate', 'Merchant of the Vale', 'Hard Evidence', 'Terrarion', 'Tibalt, the Fiend-Blooded', 'Steppe Lynx', 'Blasphemous Act', 'Abbot of Keral Keep', 'Shredded Sails', 'Acidic Slime', 'Lorehold Command', 'Voltaic Key', 'Goblin Lookout', 'Expedition Envoy', 'Intangible Virtue', 'Polukranos, World Eater', 'Harmonize', 'Spectral Procession', 'Kumano Faces Kakkazan', 'Chancellor of the Dross', 'Harmonic Prodigy', 'Dread', 'Sandsteppe Citadel', 'Krenko, Tin Street Kingpin', 'Dread Return', 'Barren Moor', 'Spirited Companion', 'Augur of Bolas', 'Leyline of the Meek', 'Vendetta', 'Think Twice', 'Tempest Djinn', 'Frogmite', 'Myr Superion', 'Timeless Witness', 'Benthic Biomancer', 'Dream Trawler', 'Lightning Angel', 'Midnight Guard', 'Jeskai Charm', 'Languish', 'Temple of Enlightenment', 'Cloudshift', 'Sign in Blood', 'Balefire Liege', 'Wheel of Fate', 'Stormtide Leviathan', 'Naban, Dean of Iteration', 'Mogis''s Marauder', 'Dennick, Pious Apprentice', 'Ally Encampment', 'Deprive', 'Safehold Elite', 'Battle Cry Goblin', 'Nullpriest of Oblivion', 'Shrine of Burning Rage', 'Elixir of Immortality', 'Consider', 'Kiora, Master of the Depths', 'Tournament Grounds', 'Martyr of Frost', 'Gitaxian Probe', 'Bloodtithe Harvester', 'World Shaper', 'Tranquil Thicket', 'Blightning', 'Whip of Erebos', 'Empyrial Plate', 'Sol Talisman', 'Glorybringer', 'Tempered Steel', 'Isolated Chapel', 'Step Through', 'Nevinyrral''s Disk', 'Everflowing Chalice', 'Tilling Treefolk', 'Field of Ruin', 'Smiting Helix', 'Stern Proctor', 'Riftwing Cloudskate', 'Harrow', 'Sylvan Library', 'Basilica Bell-Haunt', 'Opulent Palace', 'Honor of the Pure', 'Contagion Engine', 'Postmortem Lunge', 'Seething Song', 'Complicate', 'Talisman of Conviction', 'Agonizing Remorse', 'Mirrorshell Crab', 'Explore', 'Colossus of Akros', 'Mogg War Marshal', 'Angel of Vitality', 'Chandra''s Triumph', 'Zektar Shrine Expedition', 'Scroll of Avacyn', 'Glint-Sleeve Siphoner', 'Lose Focus', 'Darkmoss Bridge', 'Phyrexian Dreadnought', 'Sacred Fire', 'Festival Crasher', 'Sunscorched Desert', 'Plated Geopede', 'Voldaren Epicure', 'Haunted Dead', 'Wild Cantor', 'Reverse Engineer', 'Squirrel Sanctuary', 'Battle Screech', 'Essence Flux', 'Angel of Jubilation', 'Signal Pest', 'Arcane Infusion', 'Kunoros, Hound of Athreos', 'Mesmeric Fiend', 'Primal Amulet', 'Candletrap', 'Urza''s Factory', 'Rally the Ancestors', 'Kazuul''s Fury', 'Dragon Fodder', 'Firewild Borderpost', 'Panic', 'Incinerate', 'Acclaimed Contender', 'Nightmare Void', 'Sarkhan the Masterless', 'Phage the Untouchable', 'Liliana Vess', 'Skirk Prospector', 'Chandra, the Firebrand', 'Rally for the Throne', 'Quicksilver Gargantuan', 'Darksteel Brute', 'Lavaclaw Reaches', 'Obzedat, Ghost Council', 'Temple of Triumph', 'Assemble the Legion', 'Groundbreaker', 'Hellkite Overlord', 'Wildfire', 'Brave the Elements', 'Mobilized District', 'Jungle Shrine', 'Tidehollow Sculler', 'Sarkhan, the Dragonspeaker', 'Decree of Justice', 'Crumbling Vestige', 'Pain Seer', 'Soul of Innistrad', 'Resurgent Belief', 'Huatli, Warrior Poet', 'Tamiyo''s Safekeeping', 'Cliffside Lookout', 'Cliffhaven Kitesail', 'Mastermind''s Acquisition', 'Temple of Mystery', 'Touch the Spirit Realm', 'Valiant Rescuer', 'Yosei, the Morning Star', 'Gideon Jura', 'Akoum Warrior', 'Rush of Adrenaline', 'Reckless Rage', 'Simian Spirit Guide', 'Chandra''s Embercat', 'Soul Spike', 'Rift Sower', 'Moorland Haunt', 'Famished Paladin', 'Undercity Informer', 'Anchor to Reality', 'Izzet Staticaster', 'Out of Time', 'Return to the Ranks', 'Champion of Wits', 'Sovereign''s Bite', 'Labyrinth of Skophos', 'Jolrael, Mwonvuli Recluse', 'Treasure Cruise', 'Earthshaker Khenra', 'Trading Post', 'Genju of the Realm', 'Unbreakable Formation', 'Price of Progress', 'Sprite Dragon', 'Prismari Campus', 'Drannith Stinger', 'Reckless Imp', 'Evolving Wilds', 'Faithful Mending', 'Fabricate', 'Magister Sphinx', 'Stubborn Denial', 'Dawn of Hope', 'Mirrorhall Mimic', 'Easy Prey', 'Jwari Shapeshifter', 'Diregraf Ghoul', 'Wasteland Strangler', 'Metallic Rebuke', 'Squirrel Sovereign', 'Keruga, the Macrosage', 'Talisman of Impulse', 'Arch of Orazca', 'Oblivion Ring', 'Ghalta, Primal Hunger', 'Glimmerpost', 'Sudden Edict', 'Goblin Chieftain', 'Hanweir Militia Captain', 'Strike It Rich', 'Fetid Pools', 'Open the Armory', 'Honden of Infinite Rage', 'Spell Burst', 'Blackmail', 'Chandra Nalaar', 'Thoughts of Ruin', 'Zurgo Bellstriker', 'Shardless Agent', 'Stromkirk Noble', 'Slitherwisp', 'Isshin, Two Heavens as One', 'Lightning Rift', 'Underworld Connections', 'Rustvale Bridge', 'Toolcraft Exemplar', 'Thryx, the Sudden Storm', 'Grozoth', 'Fertile Ground', 'Condescend', 'Sheltered Thicket', 'Cathartic Pyre', 'Izzet Charm', 'Pack Rat', 'Collected Conjuring', 'Shriekmaw', 'Bolas''s Citadel', 'Conflagrate', 'Future Sight', 'Worthy Knight', 'Demonic Dread', 'Jace Beleren', 'Darksteel Colossus', 'Wizard''s Retort', 'Sidisi, Undead Vizier', 'Hada Freeblade', 'Dack''s Duplicate', 'Winds of Abandon', 'Chandra, Flame''s Catalyst', 'Throes of Chaos', 'Triskelion', 'Disfigure', 'Infernal Grasp', 'Runechanter''s Pike', 'Riptide Laboratory', 'Spikeshot Elder', 'Goblin Cohort', 'Shalai, Voice of Plenty', 'In Search of Greatness', 'Trinket Mage', 'Magus of the Bazaar', 'Timbermare', 'Dire Fleet Daredevil', 'Hobgoblin Captain', 'Adventuring Gear', 'Vapor Snag', 'Wandering Fumarole', 'Kabira Takedown', 'Vizier of Many Faces', 'Disallow', 'Malakir Rebirth', 'Glen Elendra Archmage', 'Ash Zealot', 'Lyra Dawnbringer', 'Coretapper', 'Goblin Matron', 'Evil Twin', 'Sleeper Agent', 'Rofellos, Llanowar Emissary', 'Burst Lightning', 'Ixalan''s Binding', 'Serpentine Ambush', 'Carnophage', 'Stinkweed Imp', 'Lava Dart', 'Rakdos Headliner', 'Tectonic Reformation', 'Scattered Groves', 'Ad Nauseam', 'Sea-Dasher Octopus', 'Muddle the Mixture', 'Dimir Signet', 'Nissa, Worldwaker', 'Reflector Mage', 'Zof Consumption', 'Argentum Armor', 'Aether Spellbomb', 'Jokulhaups', 'Footfall Crater', 'Fiend Hunter', 'Hanweir Battlements', 'Hieroglyphic Illumination', 'Bogardan Hellkite', 'Makindi Sliderunner', 'Braid of Fire', 'Silverbluff Bridge', 'Notion Thief', 'Duress', 'Unexpected Windfall', 'Borrowed Time', 'Brutal Hordechief', 'The Antiquities War', 'Sensation Gorger', 'Run Amok', 'Play with Fire', 'Metalwork Colossus', 'Hushwing Gryff', 'Wildfield Borderpost', 'Captain''s Claws', 'Darksteel Reactor', 'Frantic Search', 'Balustrade Spy', 'Zenith Flare', 'Temple of Silence', 'Cunning Nightbonder', 'Mistcutter Hydra', 'Phantasmagorian', 'Lingering Souls', 'Carth the Lion', 'Tamiyo, Collector of Tales', 'Birds of Paradise', 'Feed the Swarm', 'Elvish Mystic', 'Llanowar Elves', 'Spell Pierce', 'Prophetic Titan', 'Repeal', 'Sunstrike Legionnaire', 'Sidisi, Brood Tyrant', 'Knight of the White Orchid', 'Grand Arbiter Augustin IV', 'Vampire''s Kiss', 'Bump in the Night', 'Pashalik Mons', 'Flickerwisp', 'Bring to Light', 'Bone Shards', 'Arcane Sanctum', 'Spear of Heliod', 'Drowned Catacomb', 'Bloodbraid Marauder', 'Foulmire Knight', 'Spiketail Hatchling', 'Soul of Theros', 'Blacklance Paragon', 'Frontier Bivouac', 'Forgotten Cave', 'Rootbound Crag', 'Aether Adept', 'Ponder', 'Mountain Valley', 'Sweltering Suns', 'Aspect of Hydra', 'Elvish Piper', 'Goblin Bombardment', 'Inspiring Veteran', 'Magistrate''s Scepter', 'Miasmic Mummy', 'Blood Scrivener', 'Benalish Marshal', 'Traverse the Ulvenwald', 'Greater Gargadon', 'Explorer''s Scope', 'Swarmyard', 'Mage-Ring Bully', 'Lotleth Giant', 'Dire-Strain Rampage', 'Gideon''s Intervention', 'Astral Slide', 'Titanoth Rex', 'Thopter Spy Network', 'Lantern of the Lost', 'Rosethorn Acolyte', 'Blisterpod', 'Venser, Shaper Savant', 'Hordeling Outburst', 'Spitemare', 'Tooth and Nail', 'Verdant Command', 'Westvale Abbey', 'Drannith Healer', 'Temple of Malice', 'Chasm Skulker', 'Sphinx of Foresight', 'Quest for the Holy Relic', 'Inkwell Leviathan', 'Irencrag Pyromancer', 'Fieldmist Borderpost', 'Stone Rain', 'Murderous Cut', 'Mwonvuli Acid-Moss', 'Tormented Soul', 'Swell of Growth', 'Yorvo, Lord of Garenbrig', 'Champion of Lambholt', 'Tasigur, the Golden Fang', 'Dauntless Bodyguard', 'Game Trail', 'Sleight of Hand', 'Assault Strobe', 'Brainstone', 'Talisman of Curiosity', 'Goblin Arsonist', 'Padeem, Consul of Innovation', 'Karn''s Bastion', 'Tezzeret the Schemer', 'Search for Tomorrow', 'Commence the Endgame', 'Rakdos Cackler', 'Ajani Unyielding', 'Narcomoeba', 'Channel the Suns', 'Overwhelmed Apprentice', 'Ravenous Squirrel', 'Prairie Stream', 'Unholy Heat', 'Warstorm Surge', 'Vivid Creek', 'Watcher for Tomorrow', 'Pyretic Ritual', 'Barbarian Ring', 'Pentad Prism', 'Tranquil Cove'))) 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, 72.0, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (63.1 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Skyclave Shade', 'Kaya, Ghost Assassin', 'Make Disappear', 'Dragonskull Summit', 'Kazandu Mammoth', 'Vindicate', 'Blood Fountain', 'Approach of the Second Sun', 'Double Vision', 'White Sun''s Zenith', 'Blacklance Paragon', 'Vryn Wingmare', 'Solitary Confinement', 'Midnight Clock', 'Board the Weatherlight', 'Ravenous Squirrel', 'Goldmire Bridge', 'Battlefield Forge', 'Memorial to Folly', 'Treasure Cruise', 'Commune with Spirits', 'Woodland Cemetery', 'Hornet Queen', 'Oni-Cult Anvil', 'Demonic Dread', 'Nissa, Worldwaker', 'Sylvan Primordial', 'Reveillark', 'Cosmos Elixir', 'A Little Chat', 'Flood Plain', 'Lodestone Golem', 'Riveteers Overlook', 'Phyrexian Dreadnought', 'Delver of Secrets', 'Dictate of Kruphix', 'Garruk Wildspeaker', 'Cloudshift', 'Lose Focus', 'Poet''s Quill', 'Repeal', 'Staggershock', 'Barrin, Tolarian Archmage', 'Hour of Revelation', 'Wood Elves', 'Arcum Dagsson', 'Nezahal, Primal Tide', 'Fatestitcher', 'Jeskai Ascendancy', 'Cleansing Wildfire', 'Gatekeeper of Malakir', 'Generous Visitor', 'Sandsteppe Citadel', 'Cabal Therapist', 'Acidic Slime', 'Illuminator Virtuoso', 'Pieces of the Puzzle', 'Boomerang', 'Ugin''s Conjurant', 'Blazing Rootwalla', 'Skyclave Cleric', 'Prism Ring', 'Conflagrate', 'Westvale Abbey', 'Reinforced Ronin', 'Mirrorshell Crab', 'Quicken', 'Glorious End', 'Weathered Wayfarer', 'Hinterland Harbor', 'Hymn to Tourach', 'Darksteel Forge', 'Fact or Fiction', 'Rustvale Bridge', 'Golgari Rot Farm', 'Ob Nixilis, the Fallen', 'Ghitu Lavarunner', 'Champion of Wits', 'Jokulhaups', 'Undead Butler', 'Black Sun''s Zenith', 'Lashwrithe', 'Kessig Wolf Run', 'Voldaren Epicure', 'Akroma''s Memorial', 'Discovery // Dispersal', 'Deep Analysis', 'Goblin Dark-Dwellers', 'Restore Balance', 'Brain Maggot', 'Bone Shards', 'Lonis, Cryptozoologist', 'Ritual of Soot', 'Plunge into Darkness', 'Geomancer''s Gambit', 'Field of Ruin', 'Howling Mine', 'Skyshroud Ranger', 'Wrath of God', 'Mistvein Borderpost', 'Falkenrath Pit Fighter', 'Boros Reckoner', 'Zurgo Bellstriker', 'Power Conduit', 'Mizzium Mortars', 'Slagwoods Bridge', 'Glimmerpost', 'Angel''s Grace', 'Lizard Blades', 'Cleansing Nova', 'Commit // Memory', 'Magister Sphinx', 'Wilt', 'Vapor Snag', 'Shrapnel Blast', 'Dead Weight', 'Birds of Paradise', 'Dimir Charm', 'Grasslands', 'Weaver of Harmony', 'Forbid', 'Vampire Nighthawk', 'Teachings of the Kirin', 'Growth-Chamber Guardian', 'Hissing Quagmire', 'Thoughtpicker Witch', 'Lightning Strike', 'Fire Covenant', 'Abrade', 'Eternal Dragon', 'Tatsunari, Toad Rider', 'The Scorpion God', 'Temple of Deceit', 'The Birth of Meletis', 'Ghost Quarter', 'Oust', 'Lavaclaw Reaches', 'Thassa''s Intervention', 'Thraben Inspector', 'Amulet of Safekeeping', 'Shuko', 'Shigeki, Jukai Visionary', 'Demigod of Revenge', 'Phylactery Lich', 'Animate Dead', 'Wall of Omens', 'Aetherspouts', 'Mobilized District', 'Woodfall Primus', 'Trading Post', 'Flametongue Yearling', 'Spell Pierce', 'Nezumi Graverobber', 'Whelming Wave', 'Mesmeric Fiend', 'Prophetic Prism', 'Satyr Wayfinder', 'Glacial Fortress', 'Roadside Reliquary', 'Gruul Turf', 'Simian Sling', 'Gray Merchant of Asphodel', 'Secluded Glen', 'Keldon Marauders', 'Thrull Parasite', 'Stirring Wildwood', 'Walk the Aeons', 'Jaya Ballard', 'Centaur Garden', 'Shrine of Burning Rage', 'Caves of Koilos', 'Touch the Spirit Realm', 'Drake Haven', 'Sacred Fire', 'General Ferrous Rokiric', 'Temple of Plenty', 'Wooded Bastion', 'Claws of Gix', 'Dennick, Pious Apprentice', 'Go for the Throat', 'Rise and Shine', 'Fiend Hunter', 'Endless Horizons', 'Tymaret Calls the Dead', 'Dryad Militant', 'Barbarian Ring', 'Spikefield Hazard', 'Mistvault Bridge', 'Wonder', 'Monastery Siege', 'Ethersworn Canonist', 'Burst Lightning', 'Charge Through', 'Kunoros, Hound of Athreos', 'Gigadrowse', 'Platinum Angel', 'Ravenous Chupacabra', 'Dark Ritual', 'Radiant Flames', 'Dimir Signet', 'Goblin Electromancer', 'Lumbering Falls', 'Flame Javelin', 'Abiding Grace', 'Explore', 'Shard Volley', 'Steel Overseer', 'Dread Return', 'Honored Hydra', 'Evolving Wilds', 'Fauna Shaman', 'Mishra''s Factory', 'Jace Beleren', 'Kabira Takedown', 'Maul of the Skyclaves', 'Frontier Bivouac', 'Thousand-Faced Shadow', 'Chandra, Pyromaster', 'Prosperous Thief', 'Akiri, Fearless Voyager', 'Clifftop Retreat', 'Yahenni, Undying Partisan', 'Hard Evidence', 'God-Pharaoh''s Gift', 'Snowfield Sinkhole', 'Quest for Pure Flame', 'Cathar Commando', 'Fireblade Charger', 'Destiny Spinner', 'Laboratory Maniac', 'Salvage Titan', 'Declaration in Stone', 'Dauntless Escort', 'Mana Bloom', 'Favored Hoplite', 'Vedalken Shackles', 'Cabaretti Courtyard', 'Ensoul Artifact', 'Ramunap Excavator', 'Whip of Erebos', 'Stromkirk Noble', 'Arcane Sanctum', 'Defiant Strike', 'Fabled Hero', 'Edge of Autumn', 'Summer Bloom', 'Dying to Serve', 'Grim Lavamancer', 'Drossforge Bridge', 'Falkenrath Aristocrat', 'Dread Fugue', 'Fieldmist Borderpost', 'Timeless Witness', 'Castigate', 'Condemn', 'Silverbluff Bridge', 'Kumano Faces Kakkazan', 'Heartless Act', 'Basilica Bell-Haunt', 'Ponder', 'Orim''s Chant', 'Lone Missionary', 'Hero of Precinct One', 'Chief of the Foundry', 'Cathartic Pyre', 'Risk Factor', 'Pull from Tomorrow', 'Champion of the Parish', 'Silundi Vision', 'Bloodchief''s Thirst', 'Faerie Miscreant', 'Thirst for Discovery', 'Doomed Traveler', 'Insolent Neonate', 'Llanowar Wastes', 'Sejiri Steppe', 'Thornglint Bridge', 'Moon-Circuit Hacker', 'Cloudpost', 'Strike It Rich', 'Life of Toshiro Umezawa', 'Kami of False Hope', 'Throne of Geth', 'Eerie Ultimatum', 'Abundant Harvest', 'Raging Ravine', 'Tithe Taker', 'Sharuum the Hegemon', 'Cataclysmic Gearhulk', 'Faerie Vandal', 'Sylvan Library', 'Grimdancer', 'Mina and Denn, Wildborn', 'Lightning Spear', 'Agonizing Remorse', 'Sultai Scavenger', 'Timely Reinforcements', 'Figure of Destiny', 'Future Sight', 'Glint Hawk Idol', 'Commune with the Gods', 'Experimental Overload', 'Tempered Steel', 'Guild Globe', 'Sky Hussar', 'Aphemia, the Cacophony', 'Fading Hope', 'Rootbound Crag', 'Spatial Contortion', 'Counterflux', 'Yahenni''s Expertise', 'Unburial Rites', 'Sylvan Advocate', 'Arcbound Ravager', 'Okiba Reckoner Raid', 'Ad Nauseam', 'Sphinx of the Steel Wind', 'Might of Old Krosa', 'Incinerate', 'Metalwork Colossus', 'Spine of Ish Sah', 'Arrogant Wurm', 'Darkmoss Bridge', 'Flame Rift', 'Firewild Borderpost', 'Ash Zealot', 'Madcap Experiment', 'Plaguecrafter', 'Ingenious Infiltrator', 'Game Trail', 'Myr Battlesphere', 'Okina, Temple to the Grandfathers', 'Bile Blight', 'Tanglepool Bridge', 'Elspeth''s Nightmare', 'Firebolt', 'Negate', 'Seething Song', 'Student of Warfare', 'Elixir of Immortality', 'Shardless Agent', 'Izzet Boilerworks', 'Canyon Slough', 'Stone Haven Outfitter', 'Alchemist''s Gambit', 'Eiganjo Castle', 'Pyroclasm', 'Tomb of Urami', 'Noose Constrictor', 'Inkwell Leviathan', 'Dream Trawler', 'Bloodbraid Elf', 'Mana Leak', 'Grisly Salvage', 'Riveteers Charm', 'Doomwake Giant', 'Mouth of Ronom', 'Putrid Imp', 'Sundial of the Infinite', 'Judge''s Familiar', 'Nomad Outpost', 'Wild Mongrel', 'Mission Briefing', 'Silence', 'Evolutionary Leap', 'Cartel Aristocrat', 'Razortide Bridge', 'Hateful Eidolon', 'Mistveil Plains', 'Nephalia Academy', 'Ral Zarek', 'Temple of Triumph', 'Reality Ripple', 'Obstinate Baloth', 'Deprive', 'Wildfield Borderpost', 'Hypnotic Specter', 'Acolyte of Affliction', 'Shriekmaw', 'Abbot of Keral Keep', 'Chamber of Manipulation', 'Snow-Covered Mountain', 'Rune of Speed', 'Bloodvial Purveyor', 'Thought Scour', 'Mindslaver', 'Hour of Devastation', 'Azusa''s Many Journeys', 'Nephalia Drownyard', 'Drowned Catacomb', 'Blessed Alliance', 'Bag of Holding', 'Flame Slash', 'Scrapheap Scrounger', 'Rite of Oblivion', 'Dire-Strain Rampage', 'Etherium Sculptor', 'Phyrexia''s Core', 'Liliana Vess', 'Temple of Epiphany', 'Restoration Angel', 'Buried Ruin', 'Changeling Outcast', 'Scour All Possibilities', 'Living Twister', 'Cut // Ribbons', 'Angel of Despair', 'Behold the Multiverse', 'Dread Presence', 'Magister of Worth', 'Falkenrath Gorger', 'Windbrisk Heights', 'Gitaxian Probe', 'Hagra Mauling', 'Tymaret, Chosen from Death', 'Animation Module', 'Jadelight Ranger', 'Knight of the Reliquary', 'Big Score', 'Basking Rootwalla', 'Tireless Provisioner', 'Urza''s Factory', 'Dire Tactics', 'Tendo Ice Bridge', 'Proclamation of Rebirth', 'Demonic Embrace', 'Lochmere Serpent', 'Arch of Orazca', 'Frantic Inventory', 'Weapons Trainer', 'Whipflare', 'Lazotep Chancellor', 'Vivien''s Arkbow', 'Eternity Vessel', 'Elspeth Conquers Death', 'Adorned Pouncer', 'Bond of Insight', 'Sleight of Hand', 'Snow-Covered Forest', 'Eater of Virtue', 'Selesnya Sanctuary', 'Maestros Charm', 'Experimental Synthesizer', 'Greater Gargadon', 'Kefnet the Mindful', 'Bala Ged Recovery', 'Kird Ape', 'Martyr of Sands', 'Invigorate', 'Kitesail Freebooter', 'Battle of Frost and Fire', 'Snow-Covered Plains', 'Tyrant''s Scorn', 'Slip Out the Back', 'Song of Creation', 'Fabricate', 'Zabaz, the Glimmerwasp', 'Arcbound Worker', 'Temple of Enlightenment', 'Arcbound Javelineer', 'Ral, Storm Conduit', 'Cloudthresher', 'Sol Talisman', 'Skemfar Elderhall', 'Wasteland Strangler', 'Gloomshrieker', 'Circular Logic', 'Orzhov Basilica', 'Shatter the Sky', 'Oracle of Mul Daya', 'Just the Wind', 'Spawning Pool', 'Wingcrafter', 'Edric, Spymaster of Trest', 'Sign in Blood', 'Rabbit Battery', 'Erebos''s Intervention', 'Gonti, Lord of Luxury', 'Shalai, Voice of Plenty', 'Power Depot', 'Veinfire Borderpost', 'Ranger of Eos', 'Radiant Scrollwielder', 'Memory Lapse', 'Neutralize', 'Temple of Malady', 'Fleshtaker', 'Brokers Hideout', 'Old Man of the Sea', 'Ajani, Caller of the Pride', 'Disciple of the Vault', 'Elves of Deep Shadow', 'Carom', 'Tempest Djinn', 'Arcbound Mouser', 'Celestial Kirin', 'Chain Lightning', 'Malakir Rebirth', 'Thaumatic Compass', 'Terrarion', 'Second Sunrise', 'Foreboding Ruins', 'Frantic Search', 'Viashino Pyromancer', 'Infernal Grasp', 'Commence the Endgame', 'Squadron Hawk', 'Opt', 'Exhaustion', 'Vault of the Archangel', 'Cryptic Caves', 'Mire''s Grasp', 'Mind''s Desire', 'Night of Souls'' Betrayal', 'Azorius Signet', 'Black Knight', 'Chandra, Fire Artisan', 'Izzet Charm', 'Desecration Demon', 'Temple of Silence'))) 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, 63.1, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (68.7 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Ash Zealot', 'Mirrodin''s Core', 'Terrarion', 'Reassembling Skeleton', 'Glacial Fortress', 'Sylvan Library', 'Vedalken Shackles', 'Secluded Courtyard', 'Kazandu Tuskcaller', 'Signal Pest', 'Charge Through', 'Cathartic Pyre', 'Murmuring Mystic', 'Lotleth Giant', 'Temple of Epiphany', 'Goblin Dark-Dwellers', 'Illuminator Virtuoso', 'Pillage', 'Drownyard Temple', 'Throne of Geth', 'Buried Ruin', 'Bogardan Hellkite', 'Radha, Heart of Keld', 'A Little Chat', 'Scoured Barrens', 'Birds of Paradise', 'Kumano Faces Kakkazan', 'Slip Out the Back', 'Acquisitions Expert', 'Glint Hawk', 'Join the Dance', 'Stubborn Denial', 'Bolt Hound', 'Rotten Reunion', 'Oviya Pashiri, Sage Lifecrafter', 'Ram Through', 'Llanowar Wastes', 'Battlefield Forge', 'Glimpse of Tomorrow', 'Grasslands', 'Foreboding Ruins', 'Game Trail', 'Shrapnel Blast', 'Reckoner''s Bargain', 'Mishra''s Factory', 'Tarfire', 'Vampire Socialite', 'Bloodchief''s Thirst', 'Grim Lavamancer', 'Mystic Snake', 'Arc Trail', 'Captivating Vampire', 'Hellrider', 'Piranha Marsh', 'Sanguine Statuette', 'Assault // Battery', 'Oni-Cult Anvil', 'Silverbluff Bridge', 'Falkenrath Gorger', 'Shinka, the Bloodsoaked Keep', 'Scryb Ranger', 'Dragonstorm', 'White Sun''s Zenith', 'Vindicate', 'Grand Architect', 'Temple of Silence', 'Spell Pierce', 'Glorybringer', 'Tendrils of Agony', 'Repeal', 'Oust', 'Coiling Oracle', 'Student of Warfare', 'Wavesifter', 'Sleight of Hand', 'Hissing Quagmire', 'Dennick, Pious Apprentice', 'Indulgent Aristocrat', 'Commune with the Gods', 'Quest for the Holy Relic', 'Jungle Shrine', 'Verdant Command', 'Aetherspouts', 'Ponder', 'Costly Plunder', 'Patchwork Automaton', 'Sylvan Advocate', 'Brokers Hideout', 'Stirring Wildwood', 'Buried Alive', 'Wayward Swordtooth', 'Searing Spear', 'Temple of Plenty', 'Rishkar, Peema Renegade', 'Vivid Grove', 'Dream Trawler', 'Scorch Spitter', 'Blacksmith''s Skill', 'Treasure Cruise', 'Midnight Clock', 'Snow-Covered Forest', 'Figure of Destiny', 'Gitaxian Probe', 'Incandescent Aria', 'Shardless Agent', 'Icehide Golem', 'Chief Engineer', 'Worldgorger Dragon', 'Arcbound Ravager', 'Biomancer''s Familiar', 'Goldmire Bridge', 'Westvale Abbey', 'Champion of Wits', 'Fire-Lit Thicket', 'Ghost Quarter', 'Memory Lapse', 'Everflowing Chalice', 'Opulent Palace', 'Chain Lightning', 'Lightning Strike', 'Burst Lightning', 'Mistvault Bridge', 'Wild Cantor', 'Sejiri Refuge', 'Cleansing Wildfire', 'Duress', 'Chamber Sentry', 'Timely Reinforcements', 'Brain Freeze', 'Voltaic Visionary', 'Future Sight', 'Forked Bolt', 'Arcbound Mouser', 'Abrade', 'Thirst for Discovery', 'Maestros Charm', 'Vampire of the Dire Moon', 'Oracle of Mul Daya', 'Scab-Clan Berserker', 'Yisan, the Wanderer Bard', 'Fading Hope', 'Frostwalk Bastion', 'Jackal Pup', 'Earthshaker Khenra', 'Snow-Covered Swamp', 'Snow-Covered Plains', 'Gatekeeper of Malakir', 'Arcbound Worker', 'Jokulhaups', 'Phyrexian Dreadnought', 'Tendo Ice Bridge', 'Outland Liberator', 'Scurry Oak', 'Braids, Cabal Minion', 'Iceberg Cancrix', 'Rootbound Crag', 'Snow-Covered Mountain', 'Tangled Florahedron', 'Faerie Impostor', 'Animate Dead', 'Thaumatic Compass', 'Michiko''s Reign of Truth', 'Erayo, Soratami Ascendant', 'Frontier Bivouac', 'Dread Return', 'Favored Hoplite', 'Rotting Rats', 'Bloodbraid Elf', 'Field of Ruin', 'Rhys the Redeemed', 'Temple of Enlightenment', 'Salvage Titan', 'Retreat to Coralhelm', 'Jwari Disruption', 'Defiant Strike', 'Rabbit Battery', 'Zabaz, the Glimmerwasp', 'Voltage Surge', 'Khalni Heart Expedition', 'Zurgo Bellstriker', 'Moonsnare Prototype', 'Temple of Mystery', 'Wooded Bastion', 'Etherium Sculptor', 'Argentum Armor', 'Delver of Secrets', 'Vigor', 'Witching Well', 'Abbot of Keral Keep', 'Cabaretti Courtyard', 'Double Vision', 'Big Score', 'Stromkirk Captain', 'Nezahal, Primal Tide', 'Hinterland Harbor', 'Incubation Druid', 'Barbarian Ring', 'Opt', 'Banishing Knack', 'Llanowar Elves', 'Smokestack', 'Firedrinker Satyr', 'Mind''s Desire', 'Wrath of God', 'Raging Ravine', 'Vampire''s Kiss', 'Blood Fountain', 'Adorned Pouncer', 'Falkenrath Pit Fighter', 'Irencrag Feat', 'Animation Module', 'Steel Overseer', 'Urza''s Factory', 'Fact or Fiction', 'Cosima, God of the Voyage', 'Elixir of Immortality', 'Traxos, Scourge of Kroog', 'Riddlesmith', 'Tectonic Giant', 'Garruk Wildspeaker', 'Harald Unites the Elves', 'Colossal Skyturtle', 'Thraben Inspector', 'Moritte of the Frost', 'Desperate Ritual', 'Viashino Pyromancer', 'Seething Song', 'Prophetic Titan', 'Tireless Provisioner', 'Arcbound Javelineer', 'Undergrowth Champion', 'Izzet Boilerworks', 'Experimental Synthesizer', 'Vampire Lacerator', 'Invoke Calamity', 'Kazandu Mammoth', 'Reality Ripple', 'Anax, Hardened in the Forge', 'Vapor Snag', 'Hard Evidence', 'Mwonvuli Acid-Moss', 'Dragonskull Summit', 'Hymn to Tourach', 'Wolfir Silverheart', 'Thought Scour', 'Sakashima the Impostor', 'Knight of the Reliquary', 'Invigorate', 'Cleansing Nova', 'Hour of Revelation', 'Behold the Multiverse', 'Vicious Conquistador', 'Drossforge Bridge', 'Tempest Djinn', 'Frantic Search', 'Mirran Spy', 'Bloodtithe Harvester', 'Seal of Fire', 'Ornithopter', 'Village Messenger', 'Endless One', 'Incinerate', 'Lumbering Falls', 'Disciple of the Vault', 'Judge''s Familiar', 'Discovery // Dispersal', 'Stromkirk Noble', 'Retraction Helix', 'Rustvale Bridge', 'Stormblood Berserker', 'Fire Covenant', 'Firebolt', 'Spawning Pool', 'Cruel Ultimatum', 'Hanweir Garrison', 'Jolrael, Mwonvuli Recluse', 'Carom', 'Demonic Dread', 'Voldaren Epicure', 'Fabled Hero', 'Vivid Crag', 'Rakdos Cackler', 'Dark Ritual', 'Spikefield Hazard', 'Cordial Vampire', 'Pia and Kiran Nalaar', 'Experimental Overload', 'Stone Rain', 'Abundant Harvest', 'Training Grounds', 'Caves of Koilos', 'Lose Focus', 'Vivid Creek', 'Negate', 'Intruder Alarm', 'Teardrop Kami', 'Shock', 'Tuktuk Rubblefort', 'Pyretic Ritual', 'Hooting Mandrills', 'Seaside Citadel', 'Asylum Visitor', 'Pillar of Flame', 'Imperious Perfect', 'Ivy Lane Denizen', 'Dreadhorde Invasion', 'Make Disappear', 'Bone Saw', 'Florian, Voldaren Scion', 'Smallpox', 'Canyon Slough', 'Might of Old Krosa', 'Myr Retriever', 'Okina, Temple to the Grandfathers'))) 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, 68.7, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (62.9 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Wild Cantor', 'Oracle of Mul Daya', 'Conqueror''s Galleon', 'Discovery // Dispersal', 'Power Depot', 'Llanowar Elves', 'Merrow Reejerey', 'Negate', 'Hinterland Harbor', 'Spikefield Hazard', 'Tempest Djinn', 'Wayward Guide-Beast', 'Temple of Enlightenment', 'Westvale Abbey', 'Burst Lightning', 'Experimental Overload', 'Midnight Clock', 'Ghost Quarter', 'Wild Mongrel', 'Game Trail', 'Reckless Impulse', 'Kird Ape', 'Chain Lightning', 'Falkenrath Aristocrat', 'Battlefield Forge', 'Spell Pierce', 'Vicious Conquistador', 'Voltage Surge', 'Dread Fugue', 'Witching Well', 'Florian, Voldaren Scion', 'Snow-Covered Forest', 'Oni-Cult Anvil', 'Bloodgift Demon', 'Servo Exhibition', 'Hissing Quagmire', 'Wooded Bastion', 'Stirring Wildwood', 'Vampire Lacerator', 'Safewright Quest', 'Ornithopter', 'Sejiri Refuge', 'Boros Reckoner', 'Moonsnare Prototype', 'Mishra''s Factory', 'Outland Liberator', 'Goblin Bombardment', 'Ral Zarek', 'Improbable Alliance', 'Figure of Destiny', 'Vapor Snag', 'Wrath of God', 'Barrin, Tolarian Archmage', 'Tempered Steel', 'Grand Architect', 'Shardless Agent', 'Moritte of the Frost', 'Dryad Militant', 'Sacred Fire', 'Jungle Shrine', 'Firewild Borderpost', 'Fire Covenant', 'Kunoros, Hound of Athreos', 'Lhurgoyf', 'Opulent Palace', 'Woodland Cemetery', 'Garruk Wildspeaker', 'Safehold Elite', 'Treasure Map', 'Snow-Covered Swamp', 'Circular Logic', 'Colossal Skyturtle', 'Nevinyrral''s Disk', 'Mirran Spy', 'Vault Skirge', 'Myr Battlesphere', 'Stormfist Crusader', 'Everdream', 'Detention Sphere', 'Incandescent Aria', 'Snowfield Sinkhole', 'Linvala, Shield of Sea Gate', 'Slagwoods Bridge', 'Stone Rain', 'Altered Ego', 'Necrotic Ooze', 'Fact or Fiction', 'Vilis, Broker of Blood', 'White Sun''s Zenith', 'Phyrexian Dreadnought', 'Lightning Rift', 'Force of Nature', 'Goblin Dark-Dwellers', 'Temple of Plenty', 'Cathar Commando', 'Temple of Deceit', 'Jwari Disruption', 'Justice Strike', 'Riveteers Charm', 'Day of Judgment', 'Murderous Redcap', 'Ajani, Caller of the Pride', 'Soul Snare', 'Temple of Abandon', 'Fabled Hero', 'Crumbling Vestige', 'Reinforced Ronin', 'Viashino Pyromancer', 'Hypergenesis', 'Etherium Sculptor', 'Snow-Covered Plains', 'Student of Warfare', 'Vindicate', 'Mana Leak', 'Frontier Bivouac', 'Glacial Fortress', 'Search for Tomorrow', 'Reckoner''s Bargain', 'Kopala, Warden of Waves', 'Blazing Rootwalla', 'Mesmeric Fiend', 'Dream Trawler', 'Prism Ring', 'Tymaret, Chosen from Death', 'Yahenni''s Expertise', 'Maestros Charm', 'Liesa, Forgotten Archangel', 'Cruel Ultimatum', 'Touch the Spirit Realm', 'Brain Maggot', 'Cleansing Nova', 'Signal Pest', 'Everflowing Chalice', 'Noose Constrictor', 'Silvergill Adept', 'Song of Creation', 'Reality Ripple', 'Defiant Strike', 'Pillage', 'Bloodbraid Elf', 'Heartless Act', 'Arcbound Worker', 'Captivating Vampire', 'Retraction Helix', 'Hard Evidence', 'Cartel Aristocrat', 'Valiant Rescuer', 'Myr Retriever', 'Death Cloud', 'Sram''s Expertise', 'Cabaretti Courtyard', 'Forgotten Cave', 'Kaya, Ghost Assassin', 'Arch of Orazca', 'Growth-Chamber Guardian', 'Izzet Charm', 'Costly Plunder', 'Canyon Slough', 'Expansion // Explosion', 'Vampire of the Dire Moon', 'Mission Briefing', 'Drossforge Bridge', 'Wasteland Strangler', 'Disciple of the Vault', 'Incinerate', 'Master of the Pearl Trident', 'Steel Overseer', 'Patchwork Automaton', 'Seaside Citadel', 'Ponder', 'Icy Manipulator', 'Birds of Paradise', 'Firespout', 'Conflagrate', 'Undergrowth Champion', 'Vault of the Archangel', 'Fire-Lit Thicket', 'Fleecemane Lion', 'Hero of Precinct One', 'Goldmire Bridge', 'Indulgent Aristocrat', 'Abrade', 'Orim''s Chant', 'Hurricane', 'Bronzehide Lion', 'Restoration Angel', 'Drannith Healer', 'Elvish Mystic', 'Riddlesmith', 'Mirrodin''s Core', 'Asylum Visitor', 'Iceberg Cancrix', 'Vedalken Shackles', 'Future Sight', 'Explore', 'Thaumatic Compass', 'Just the Wind', 'Blessed Alliance', 'Izzet Boilerworks', 'Voldaren Epicure', 'Harald Unites the Elves', 'Dark Ritual', 'Animate Dead', 'Victim of Night', 'Arcbound Javelineer', 'Eternal Dragon', 'Drannith Stinger', 'Icehide Golem', 'Qasali Pridemage', 'Tangled Florahedron', 'Invigorate', 'Acidic Slime', 'Opt', 'Ethersworn Canonist', 'Castigate', 'Flametongue Yearling', 'Thraben Inspector', 'Terrarion', 'Behold the Multiverse', 'Commune with Spirits', 'Repeal', 'Trostani''s Summoner', 'Hour of Promise', 'Banishing Knack', 'Ripjaw Raptor', 'Thirst for Discovery', 'Nature''s Lore', 'Vengeful Pharaoh', 'Brokers Hideout', 'Join the Dance', 'Arcbound Ravager', 'Glorybringer', 'Basking Rootwalla', 'Grasslands', 'Snow-Covered Mountain', 'Rishadan Dockhand', 'Silverbluff Bridge', 'Clifftop Retreat', 'Tidal Warrior', 'Gideon Jura', 'Go for the Throat', 'Wrench Mind', 'Wildfield Borderpost', 'Ritual of Soot', 'Blade Splicer', 'Double Vision', 'Zabaz, the Glimmerwasp', 'Temple of Silence', 'Adorned Pouncer', 'The Underworld Cookbook', 'Rites of Initiation', 'Judge''s Familiar', 'Tide Shaper', 'Timely Reinforcements', 'Borborygmos Enraged', 'Treasure Cruise', 'Illuminator Virtuoso', 'Commune with the Gods', 'Temple of Epiphany', 'Cleansing Wildfire', 'Declaration in Stone', 'Go for Blood', 'Skyclave Shade', 'Crooked Custodian', 'Dennick, Pious Apprentice', 'Fading Hope', 'Throne of Geth', 'Abundant Harvest', 'Cursecatcher', 'World Shaper', 'Verdant Command', 'Geomancer''s Gambit', 'Merfolk Mistbinder', 'Temple of Mystery', 'Skirge Familiar', 'Michiko''s Reign of Truth', 'Mistvault Bridge', 'Char', 'Bogardan Hellkite', 'Carnophage', 'Thought Scour', 'Wolfir Silverheart', 'Edric, Spymaster of Trest', 'Abbot of Keral Keep', 'Lose Focus', 'Wight', 'Shrapnel Blast', 'Delver of Secrets', 'Bloodtithe Harvester', 'Animation Module', 'Electrolyze', 'Magister Sphinx', 'Carom', 'Barbarian Ring', 'Court Homunculus', 'Jokulhaups', 'Rootbound Crag', 'Field of Ruin', 'Good-Fortune Unicorn', 'Ghitu Lavarunner', 'Greater Gargadon', 'Darkmoss Bridge', 'Aetherspouts', 'Zenith Flare', 'Cosima, God of the Voyage', 'Nether Spirit', 'Knight of the Reliquary', 'Triskelion', 'Elixir of Immortality', 'Logic Knot', 'Stromkirk Captain', 'Prohibit', 'Rune-Scarred Demon', 'Traxos, Scourge of Kroog', 'Dread Return', 'Khalni Heart Expedition', 'Hymn to Tourach', 'Oust', 'Hour of Revelation', 'Grim Lavamancer', 'Quicken', 'Monoskelion', 'Forbid', 'Memory Lapse', 'Foreboding Ruins', 'Secluded Steppe', 'Casualties of War', 'Tendrils of Agony', 'Sorin Markov', 'Duress', 'Tectonic Reformation', 'Mana Bloom', 'Dire Tactics', 'Buried Ruin', 'Wayward Swordtooth', 'Cordial Vampire', 'Nephalia Drownyard', 'Experimental Synthesizer', 'Irencrag Pyromancer', 'Warstorm Surge', 'Lumbering Falls', 'Bloodchief''s Thirst', 'Myth Realized', 'Champion of Wits', 'Chief Engineer', 'Diregraf Ghoul', 'Lonis, Cryptozoologist', 'Nezahal, Primal Tide', 'Brain Freeze', 'Might of Old Krosa', 'Gatekeeper of Malakir', 'Harmonize', 'Vigor', 'Dragonskull Summit', 'Buried Alive', 'Hotshot Mechanic', 'Flourishing Fox', 'Lotleth Giant', 'Craw Giant', 'Lonely Sandbar', 'Ember Swallower', 'Phylactery Lich', 'Favored Hoplite', 'Rotten Reunion', 'Kazandu Mammoth', 'General Ferrous Rokiric', 'Sylvan Library', 'Tanglepool Bridge', 'Evolving Wilds', 'Crackling Drake', 'Juggernaut', 'Flame Slash', 'Coiling Oracle', 'Grumgully, the Generous', 'Vampire Socialite', 'Llanowar Wastes', 'Drowned Catacomb', 'Karn, Silver Golem', 'Desperate Ravings', 'Scrapheap Scrounger', 'Retreat to Coralhelm', 'Brokers Charm', 'Phyrexian Revoker', 'Slip Out the Back', 'Caves of Koilos', 'Loxodon Smiter', 'Gitaxian Probe', 'Asmodeus the Archfiend', 'Frantic Search', 'Spark Spray', 'Urza''s Factory', 'Fireblade Artist', 'Coralhelm Commander', 'Secluded Courtyard', 'Arcbound Mouser', 'Ojutai''s Command', 'Labyrinth of Skophos', 'Charge Through', 'Dawn of Hope', 'Liliana Vess'))) 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, 62.9, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (64.5 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Oran-Rief, the Vastwood', 'Burglar Rat', 'Fog', 'Thought Erasure', 'Crackling Drake', 'Westvale Abbey', 'Everflowing Chalice', 'Sphinx of Uthuun', 'Reckoner''s Bargain', 'Hapatra, Vizier of Poisons', 'Hanweir Garrison', 'Disciple of the Vault', 'Fleecemane Lion', 'Llanowar Wastes', 'Wolfir Silverheart', 'Anointer Priest', 'Consuming Vapors', 'Black Sun''s Zenith', 'Rite of Oblivion', 'Sejiri Refuge', 'Voldaren Epicure', 'Ghost Quarter', 'Ghitu Encampment', 'Oath of Teferi', 'Noose Constrictor', 'Ral, Storm Conduit', 'Beacon of Tomorrows', 'Drannith Healer', 'Moonring Island', 'Ethersworn Canonist', 'Creeping Corrosion', 'Heartless Act', 'Ranger of Eos', 'Asmodeus the Archfiend', 'Solitary Confinement', 'Makeshift Mannequin', 'Barrenton Medic', 'Yisan, the Wanderer Bard', 'Midnight Clock', 'Kessig Flamebreather', 'Gatekeeper of Malakir', 'Fact or Fiction', 'Robe of Mirrors', 'Cabal Stronghold', 'Chain Lightning', 'Shigeki, Jukai Visionary', 'Desperate Ritual', 'Carnophage', 'Jace''s Phantasm', 'Krosan Wayfarer', 'Firespout', 'Mistcutter Hydra', 'Intruder Alarm', 'Cabaretti Courtyard', 'Magister Sphinx', 'Blood Fountain', 'Throne of Geth', 'Lotleth Giant', 'Spell Pierce', 'Bad River', 'Karn, Silver Golem', 'Falkenrath Forebear', 'Retreat to Coralhelm', 'Folio of Fancies', 'Dream Twist', 'Wrath of God', 'Flourishing Fox', 'Goro-Goro, Disciple of Ryusei', 'Gray Merchant of Asphodel', 'Ancient Stirrings', 'Hornet Queen', 'Merrow Reejerey', 'Dread Return', 'Quicksilver Gargantuan', 'Illuminator Virtuoso', 'Necrotic Ooze', 'Coiling Oracle', 'Zenith Flare', 'Oust', 'Crumbling Vestige', 'Sticky Fingers', 'Watcher for Tomorrow', 'View from Above', 'Sign in Blood', 'Darkmoss Bridge', 'Wormfang Drake', 'Maestros Charm', 'Ritual of Soot', 'Borborygmos Enraged', 'Incubation Druid', 'Alms of the Vein', 'Mouth // Feed', 'Arcbound Worker', 'Kami of False Hope', 'Dread Fugue', 'Magister of Worth', 'Ripjaw Raptor', 'Undergrowth Champion', 'Izzet Boilerworks', 'Jungle Hollow', 'Woodland Cemetery', 'Perplex', 'Flood Plain', 'Authority of the Consuls', 'Tide Shaper', 'Vigor', 'Kird Ape', 'Phyrexian Revoker', 'Forgotten Cave', 'Cloudshift', 'Safehold Elite', 'Blazing Shoal', 'Sultai Charm', 'Temple of Abandon', 'Into the Roil', 'Drossforge Bridge', 'Thoughtpicker Witch', 'Retraction Helix', 'Vengeful Pharaoh', 'Essence Scatter', 'Blighted Agent', 'Radiant Scrollwielder', 'Lava Dart', 'Frantic Search', 'Vexing Shusher', 'Obstinate Baloth', 'Foul Play', 'Negate', 'Doom Foretold', 'Terramorphic Expanse', 'Kefnet the Mindful', 'Treasure Cruise', 'Oni-Cult Anvil', 'Champion of Wits', 'Lorescale Coatl', 'Shatter the Sky', 'Prophetic Prism', 'Scrapyard Recombiner', 'Hard Evidence', 'Mobilized District', 'General Ferrous Rokiric', 'Grim Lavamancer', 'Sacred Fire', 'Prohibit', 'Lead the Stampede', 'Knight of the Reliquary', 'Mwonvuli Acid-Moss', 'Teferi''s Moat', 'Cosima, God of the Voyage', 'Nether Spirit', 'Birds of Paradise', 'Pieces of the Puzzle', 'Rakdos Headliner', 'Rootbound Crag', 'Viashino Pyromancer', 'Lost Legacy', 'Terastodon', 'Jungle Shrine', 'Teardrop Kami', 'Wrench Mind', 'Loxodon Smiter', 'Mystic Snake', 'Darksteel Colossus', 'Verdant Command', 'Phyrexian Dreadnought', 'Dark Ritual', 'Mirage Mirror', 'Morselhoarder', 'Trostani''s Summoner', 'Flametongue Yearling', 'Fatestitcher', 'Death Cloud', 'Buried Ruin', 'Vault Skirge', 'Kopala, Warden of Waves', 'Daxos of Meletis', 'Secluded Courtyard', 'Figure of Destiny', 'Orim''s Chant', 'Char', 'Trickbind', 'Delver of Secrets', 'Vampire Nighthawk', 'Master of the Pearl Trident', 'Woodfall Primus', 'Goblin Dark-Dwellers', 'Nephalia Academy', 'Rise of the Hobgoblins', 'Soldier of the Pantheon', 'Skirge Familiar', 'Animation Module', 'Consuming Aberration', 'Indulgent Aristocrat', 'Cruel Ultimatum', 'Hall of the Bandit Lord', 'Dragonskull Summit', 'Treasure Map', 'Contested War Zone', 'Banishing Knack', 'Just the Wind', 'Glimmerpost', 'Kazandu Mammoth', 'Temple of Plenty', 'Oracle of Mul Daya', 'Steel Overseer', 'Oketra the True', 'Voltage Surge', 'Shisato, Whispering Hunter', 'Wasteland Strangler', 'Diabolic Edict', 'Glory-Bound Initiate', 'Behold the Multiverse', 'Exhaustion', 'Shrapnel Blast', 'Aetherspouts', 'Traxos, Scourge of Kroog', 'Endbringer', 'Fblthp, the Lost', 'Consult the Necrosages', 'Patchwork Automaton', 'Piranha Marsh', 'Bedevil', 'Hypnotic Specter', 'Rites of Initiation', 'Putrefy', 'Silvergill Adept', 'Moritte of the Frost', 'Era of Enlightenment', 'Shardless Agent', 'Riptide Laboratory', 'Eternal Dragon', 'Victim of Night', 'Pillage', 'Fabled Hero', 'Gideon Jura', 'Snow-Covered Swamp', 'Glorybringer', 'Consume the Meek', 'Cultivate', 'Frontier Bivouac', 'Essence Flux', 'Champion of the Parish', 'Jwari Disruption', 'Canyon Slough', 'Tidal Warrior', 'Mind Funeral', 'Decree of Justice', 'Tymaret, Chosen from Death', 'Rise and Shine', 'Condemn', 'Conflagrate', 'Snow-Covered Forest', 'Bloodchief''s Thirst', 'Dennick, Pious Apprentice', 'Consul''s Lieutenant', 'Pull from Tomorrow', 'Bloodbraid Elf', 'Vicious Conquistador', 'Lavinia of the Tenth', 'Electrolyze', 'Parallel Lives', 'Dragonstorm', 'Augur of Bolas', 'Burst Lightning', 'It That Betrays', 'Evolving Wilds', 'Unsubstantiate', 'Fire-Lit Thicket', 'Vindicate', 'Game Trail', 'Stirring Wildwood', 'Brain Maggot', 'Dryad Militant', 'Temple of Mystery', 'Captivating Vampire', 'Icehide Golem', 'Qasali Pridemage', 'Wall of Omens', 'Loxodon Warhammer', 'Mana Bloom', 'Detention Sphere', 'Kunoros, Hound of Athreos', 'Stone Rain', 'Thaumatic Compass', 'Tuktuk Rubblefort', 'Faithful Mending', 'Nyxathid', 'Patagia Viper', 'Ruin Crab', 'Dream Salvage', 'Blind Obedience', 'Abundant Harvest', 'Kaya, Ghost Assassin', 'Urza''s Factory', 'Pyroclasm', 'Hymn to Tourach', 'Ravenous Rats', 'Azorius Charm', 'Chief Engineer', 'Desecration Demon', 'Geomancer''s Gambit', 'Benthic Biomancer', 'Martyr of Sands', 'Harbinger of the Tides', 'Myth Realized', 'Olivia Voldaren', 'Deep Analysis', 'Wilt', 'Arrogant Wurm', 'Sigil of the Empty Throne', 'Thawing Glaciers', 'Esper Panorama', 'Dead Weight', 'Big Score', 'Hellrider', 'Expansion // Explosion', 'Jace, the Living Guildpact', 'Infernal Grasp', 'Memoricide', 'Temple of Malady', 'Commence the Endgame', 'Mana Leak', 'Song of Creation', 'Brain Freeze', 'Arch of Orazca', 'Liesa, Forgotten Archangel', 'Reveillark', 'Saw It Coming', 'Ponder', 'Anafenza, Kin-Tree Spirit', 'Dauntless Bodyguard', 'Mistveil Plains', 'Training Grounds', 'Oviya Pashiri, Sage Lifecrafter', 'Seaside Citadel', 'Hour of Promise', 'Duskwatch Recruiter', 'Skyclave Shade', 'Underworld Connections', 'Slip Out the Back', 'Asylum Visitor', 'Arcane Sanctum', 'Nightveil Specter', 'Grasslands', 'Riveteers Charm', 'Sylvan Scrying', 'Magus of the Candelabra', 'Glacial Fortress', 'Hinterland Harbor', 'Fauna Shaman', 'Bone Shards', 'Blazing Rootwalla', 'Zabaz, the Glimmerwasp', 'Kazandu Tuskcaller', 'Raven''s Crime', 'Kumano Faces Kakkazan', 'Mizzium Skin', 'Blacklance Paragon', 'Dire Tactics', 'Erebos''s Intervention', 'Rishadan Dockhand', 'Memory Lapse', 'Codex Shredder', 'Mishra''s Factory', 'Walk the Aeons', 'Magma Spray', 'Arguel''s Blood Fast', 'Control Magic', 'Fireblade Artist', 'Etherium Sculptor', 'Day of Judgment', 'Experimental Overload', 'Raging Ravine', 'Tempest Djinn', 'Flash of Insight', 'Ravenous Squirrel', 'Moonsnare Prototype', 'Elixir of Immortality', 'Sorin Markov', 'Skybridge Towers', 'Casualties of War', 'Adorned Pouncer', 'Sky Hussar', 'Karn''s Temporal Sundering', 'Duress', 'Stormfist Crusader', 'Wily Goblin', 'Overrun', 'Garruk Wildspeaker', 'Student of Warfare', 'Runed Halo', 'Feed the Swarm', 'Weathered Wayfarer', 'Quicken', 'Iceberg Cancrix', 'Fraying Sanity', 'Mission Briefing', 'Orzhov Basilica', 'Declaration in Stone', 'Ojutai''s Command', 'Think Twice', 'Tangle', 'Night of Souls'' Betrayal', 'Thirst for Discovery', 'Search for Tomorrow', 'Treacherous Blessing', 'Satyr Wayfinder', 'Might of Old Krosa', 'Labyrinth of Skophos', 'Terrarion', 'Ensoul Artifact', 'Harald Unites the Elves', 'Blessed Alliance', 'Bile Blight', 'Sandsteppe Citadel', 'Esper Charm', 'Gitaxian Probe', 'Pianna, Nomad Captain', 'Mimic Vat', 'Frantic Inventory', 'Honored Hydra', 'Lumbering Falls', 'Lavaclaw Reaches', 'Rishkar, Peema Renegade', 'Cleansing Nova', 'Stromkirk Noble', 'Voltaic Servant', 'Falkenrath Pit Fighter', 'Jace, Memory Adept', 'Demigod of Revenge', 'Edric, Spymaster of Trest', 'Timeless Witness', 'Judith, the Scourge Diva', 'Centaur Garden', 'Wayward Guide-Beast', 'Bane of Bala Ged', 'Autumn''s Veil', 'Grimdancer', 'Carven Caryatid', 'Mesmeric Fiend', 'Tanglepool Bridge', 'The Underworld Cookbook', 'Azorius Signet', 'Fiery Temper', 'Riftwing Cloudskate', 'Court Homunculus', 'Izzet Signet', 'Caves of Koilos', 'Flame Rift', 'Mind Grind', 'Spikefield Hazard', 'Plunge into Darkness', 'Salvage Titan', 'Zurgo Bellstriker', 'Jokulhaups', 'Shard Volley', 'Soul Snare', 'Ajani, Caller of the Pride', 'Evacuation', 'Elspeth''s Nightmare', 'Bloodline Keeper', 'Lightning Rift', 'Selesnya Sanctuary', 'Sylvan Advocate', 'Rocco, Cabaretti Caterer', 'Crux of Fate', 'Wayward Swordtooth', 'Vivid Grove', 'Future Sight', 'Temple of Epiphany', 'Lose Focus', 'Upheaval', 'Irencrag Feat', 'Vampire''s Kiss', 'Timely Reinforcements', 'Dizzy Spell', 'Jeskai Ascendancy', 'Quiet Speculation', 'Destiny Spinner', 'Razortide Bridge', 'Touch the Spirit Realm', 'Arcbound Mouser', 'Commit // Memory', 'Incinerate', 'Golgari Rot Farm', 'Teferi, Mage of Zhalfir', 'Forbid', 'Ember Swallower', 'Drowned Catacomb', 'Invigorate', 'Malakir Rebirth', 'Tangled Florahedron', 'Cerulean Wisps', 'Chandra, Pyromaster', 'Strategic Planning', 'Lashwrithe', 'Snow-Covered Plains', 'Nephalia Drownyard', 'Yahenni''s Expertise', 'Elite Guardmage', 'Fire Covenant', 'Firebolt', 'Angel''s Herald', 'Rune-Scarred Demon', 'Hypergenesis', 'Gavony Township', 'Harmonize', 'Into the Story', 'Blowfly Infestation', 'Charge Through', 'Angel of Despair', 'Wight', 'Hero''s Downfall', 'Blade Splicer', 'Ash Zealot', 'Murderous Redcap', 'Warstorm Surge', 'Sylvan Library', 'Reaper King', 'Calciform Pools', 'Gather the Townsfolk', 'Secluded Steppe', 'Conclave Mentor', 'Hagra Mauling', 'Commune with Spirits', 'Index', 'Far // Away', 'Shinka, the Bloodsoaked Keep', 'Time Wipe', 'Khalni Heart Expedition', 'Vampire Lacerator', 'Empyrial Archangel', 'Cathartic Pyre', 'Overwhelming Splendor', 'Gilded Pinions', 'Thornglint Bridge', 'Hamlet Captain', 'Verdurous Gearhulk', 'Lens of Clarity', 'Valiant Rescuer', 'Abiding Grace', 'Gigadrowse', 'Battlefield Forge', 'Barrin, Tolarian Archmage', 'Ghitu Lavarunner', 'Gonti, Lord of Luxury', 'Myr Battlesphere', 'Reality Ripple', 'Viscera Seer', 'Vampire Socialite', 'Vampire Opportunist', 'Sanguine Statuette', 'Blightning', 'Vault of the Archangel', 'Elvish Mystic', 'Battle of Wits', 'Goblin Bombardment', 'Cathar Commando', 'Shredded Sails', 'Blasphemous Act', 'World Shaper', 'Outland Liberator', 'Boros Elite', 'Falkenrath Aristocrat', 'Kambal, Consul of Allocation', 'Riddlesmith', 'Boros Reckoner', 'Coralhelm Commander', 'Nevermore', 'Zombify', 'Squadron Hawk', 'Reckless Impulse', 'Barter in Blood', 'Scab-Clan Berserker', 'Hour of Revelation', 'Spawning Pool', 'Lonely Sandbar', 'Fiend Hunter', 'Seshiro the Anointed', 'Seething Song', 'Bogardan Hellkite', 'Liliana Vess', 'Ulvenwald Mysteries', 'Memorial to War', 'Worldgorger Dragon', 'Nezumi Shortfang', 'Benalish Marshal', 'Go for the Throat', 'Acolyte of Affliction', 'Ohran Viper', 'Mirran Spy', 'Wandering Mind', 'Kyodai, Soul of Kamigawa', 'Render Silent', 'Thassa''s Intervention', 'Animate Dead', 'Phylactery Lich', 'Anax, Hardened in the Forge', 'Incandescent Aria', 'Wooded Bastion', 'Irencrag Pyromancer', 'Grand Arbiter Augustin IV', 'Teysa, Orzhov Scion', 'Sosuke''s Summons', 'Crumbling Necropolis', 'Luminarch Ascension', 'Commune with the Gods', 'Mayor of Avabruck', 'Sylvan Primordial', 'Doom Blade', 'Buried Alive', 'Tendo Ice Bridge', 'Tempered Steel', 'Scryb Ranger', 'Slagwoods Bridge', 'Bronzehide Lion', 'Lightmine Field', 'Kitchen Imp', 'Hypnotic Grifter', 'Arcbound Ravager', 'Favored Hoplite', 'Grand Architect', 'Nezahal, Primal Tide', 'Scrap Trawler', 'Invoke Calamity', 'Diregraf Ghoul', 'Winged Coatl', 'Temple of Enlightenment', 'Vivid Marsh', 'Join the Dance', 'Drannith Stinger', 'Dovin Baan', 'Opulent Palace', 'Soulherder', 'Smiting Helix', 'Putrid Imp', 'Ornithopter', 'Olivia''s Dragoon', 'Mistvault Bridge', 'Catch // Release', 'Silverbluff Bridge', 'Basking Rootwalla', 'Improbable Alliance', 'Conqueror''s Galleon', 'Sarcomancy', 'Michiko''s Reign of Truth', 'Fading Hope', 'Experimental Synthesizer', 'Sleight of Hand', 'Reinforced Ronin', 'Cloudpost', 'Borrowed Time', 'Dismal Backwater', 'Foreboding Ruins', 'Always Watching', 'Unburial Rites', 'Lonis, Cryptozoologist', 'Thornwood Falls', 'Breaking // Entering', 'Whip of Erebos', 'Bloodgift Demon', 'Overwhelmed Apprentice', 'Discovery // Dispersal', 'Growth-Chamber Guardian', 'Myr Retriever', 'Stromkirk Captain', 'Stubborn Denial', 'Opt', 'Melira, Sylvok Outcast', 'Oath of Jace', 'Acidic Slime', 'Yosei, the Morning Star', 'Rampant Growth', 'Linvala, Shield of Sea Gate', 'Undead Butler', 'Muddle the Mixture', 'Earthshaker Khenra', 'Forbidden Alchemy', 'Snowfield Sinkhole', 'White Sun''s Zenith', 'Hotshot Mechanic', 'Tome Scour', 'Falkenrath Gorger', 'Grisly Salvage', 'Prizefight', 'Barbarian Ring', 'Orochi Sustainer', 'Triskelion', 'Florian, Voldaren Scion', 'Desperate Ravings', 'The Birth of Meletis', 'Skyclave Cleric', 'Enduring Ideal', 'Cordial Vampire', 'Pestilent Haze', 'Go for Blood', 'Grumgully, the Generous', 'Postmortem Lunge', 'Dawn of Hope', 'Lathliss, Dragon Queen', 'Masticore', 'Mystical Teachings', 'Vampire of the Dire Moon', 'Temple of Deceit', 'Rustvale Bridge', 'Ransack the Lab', 'Lightning Strike', 'Field of Ruin', 'Dream Trawler', 'Servo Exhibition', 'Scrapheap Scrounger', 'Brokers Hideout', 'Dragonkin Berserker', 'Dread Presence', 'Double Vision', 'Knight of the White Orchid', 'Abbot of Keral Keep', 'Vilis, Broker of Blood', 'Vapor Snag', 'Basri''s Lieutenant', 'Thought Scour', 'Ral Zarek', 'Anointed Procession', 'Wonder', 'Bloodtithe Harvester', 'Brokers Charm', 'Explore', 'Temple of Silence', 'Rally the Ranks', 'Jace Beleren', 'Emeria Angel', 'Obscura Charm', 'Plague Stinger', 'Graf Reaver', 'Cartel Aristocrat', 'Costly Plunder', 'Increasing Ambition', 'Wild Mongrel', 'Radha, Heart of Keld', 'Logic Knot', 'Thraben Inspector', 'Rotten Reunion', 'Snow-Covered Mountain', 'Goldmire Bridge', 'The Scorpion God', 'Clifftop Retreat', 'Witching Well', 'Hero of Precinct One', 'Izzet Charm', 'Cleansing Wildfire', 'Carom', 'Judge''s Familiar', 'Hissing Quagmire', 'Restoration Angel', 'Vedalken Shackles', 'Flame Slash', 'Diabolic Tutor', 'Primal Command', 'Fallen Shinobi', 'Defiant Strike', 'Tendrils of Agony', 'Signal Pest', 'Repeal', 'Sphere of Safety', 'Abrade', 'Spark Spray', 'Exclude', 'Platinum Angel', 'Voidslime', 'Biomancer''s Familiar', 'Circular Logic', 'Shred Memory', 'Castigate'))) 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, 64.5, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (74.4 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Burst Lightning', 'Commence the Endgame', 'Sosuke''s Summons', 'Pyroclasm', 'Vilis, Broker of Blood', 'Overwhelmed Apprentice', 'Destiny Spinner', 'Overwhelming Splendor', 'Kitchen Imp', 'Elite Guardmage', 'Authority of the Consuls', 'Bloodbraid Elf', 'Ravenous Rats', 'Carven Caryatid', 'Bogardan Hellkite', 'Grimdancer', 'Expansion // Explosion', 'Dream Salvage', 'Infernal Grasp', 'Casualties of War', 'Phylactery Lich', 'Cleansing Wildfire', 'Skyclave Shade', 'Vampire Nighthawk', 'Jeskai Ascendancy', 'Zurgo Bellstriker', 'Electrolyze', 'Oketra the True', 'Vault of the Archangel', 'Out of Time', 'Caves of Koilos', 'Temple of Enlightenment', 'Jungle Hollow', 'Vicious Conquistador', 'Tymaret, Chosen from Death', 'Seshiro the Anointed', 'Judith, the Scourge Diva', 'Orzhov Basilica', 'Thassa''s Intervention', 'Incinerate', 'Wandering Mind', 'Declaration in Stone', 'Stone Rain', 'Frantic Inventory', 'Lead the Stampede', 'Figure of Destiny', 'Perplex', 'Glacial Fortress', 'Rakdos Headliner', 'Jokulhaups', 'Canyon Slough', 'Maul of the Skyclaves', 'Discovery // Dispersal', 'Desecration Demon', 'Flourishing Fox', 'Rogue''s Passage', 'Shardless Agent', 'Vampire''s Kiss', 'Rustvale Bridge', 'Experimental Overload', 'Rotten Reunion', 'Boros Elite', 'Thaumatic Compass', 'Outlaws'' Merriment', 'Knight of the Reliquary', 'Hotshot Mechanic', 'Vengeful Pharaoh', 'Wooded Bastion', 'Llanowar Wastes', 'Anafenza, Kin-Tree Spirit', 'Ritual of Soot', 'Smiting Helix', 'Solitary Confinement', 'Vivid Grove', 'Rootbound Crag', 'Obscura Charm', 'Blazing Shoal', 'Master of the Pearl Trident', 'Creeping Corrosion', 'Bala Ged Recovery', 'Song of Creation', 'Evolving Wilds', 'Vigor', 'Game Trail', 'Diabolic Tutor', 'Conflagrate', 'Unsubstantiate', 'Lose Focus', 'Dream Twist', 'Azorius Charm', 'Riveteers Charm', 'Trickbind', 'Nyxathid', 'Soul Snare', 'Deep Analysis', 'Pianna, Nomad Captain', 'Dismal Backwater', 'Centaur Garden', 'Diregraf Colossus', 'Fiend Hunter', 'Labyrinth of Skophos', 'Obstinate Baloth', 'Sylvan Library', 'Delver of Secrets', 'Brain Freeze', 'Temple of Epiphany', 'Oracle of Mul Daya', 'Gatekeeper of Malakir', 'Snow-Covered Mountain', 'Trostani''s Summoner', 'Champion of the Parish', 'Faithful Mending', 'Izzet Boilerworks', 'Touch the Spirit Realm', 'Jace''s Phantasm', 'Vivid Marsh', 'Flametongue Yearling', 'Captivating Vampire', 'Nephalia Academy', 'Woodland Cemetery', 'Prophetic Prism', 'Charge Through', 'Maestros Charm', 'Fog', 'Ornithopter', 'Flash of Insight', 'Repeal', 'Firespout', 'Lonis, Cryptozoologist', 'Mystic Snake', 'Safehold Elite', 'Shisato, Whispering Hunter', 'Strategic Planning', 'Blasphemous Act', 'Slagwoods Bridge', 'Clifftop Retreat', 'Angel of Despair', 'Hero of Precinct One', 'Reaper King', 'Snow-Covered Forest', 'Illuminator Virtuoso', 'Falkenrath Pit Fighter', 'Weathered Wayfarer', 'View from Above', 'Hapatra, Vizier of Poisons', 'Crack Open', 'Ancient Stirrings', 'Hellrider', 'Karn''s Temporal Sundering', 'Grasslands', 'Tendrils of Agony', 'Distended Mindbender', 'Icehide Golem', 'Fire Covenant', 'Kumano Faces Kakkazan', 'Blazing Rootwalla', 'Frantic Search', 'Dragonkin Berserker', 'Consul''s Lieutenant', 'Lavaclaw Reaches', 'Tajic, Legion''s Edge', 'Condemn', 'Ponder', 'Blind Obedience', 'Kaya, Ghost Assassin', 'Zombify', 'Kyodai, Soul of Kamigawa', 'Vampire Opportunist', 'Zenith Flare', 'Rite of Oblivion', 'Char', 'Kazandu Mammoth', 'Squadron Hawk', 'Radha, Heart of Keld', 'Cabaretti Courtyard', 'Steel Overseer', 'Ghitu Encampment', 'Catch // Release', 'Fallen Shinobi', 'Gavony Township', 'Consuming Vapors', 'Terrarion', 'Emeria Angel', 'Sylvan Advocate', 'Patagia Viper', 'Plunge into Darkness', 'Thoughtpicker Witch', 'Arch of Orazca', 'Blood Fountain', 'Basri''s Lieutenant', 'Zabaz, the Glimmerwasp', 'Behold the Multiverse', 'Karn, Silver Golem', 'Teardrop Kami', 'Doom Foretold', 'Chandra, Pyromaster', 'Harbinger of the Tides', 'Conclave Mentor', 'Jace, Memory Adept', 'Reckoner''s Bargain', 'Woodfall Primus', 'Mobilized District', 'Arcbound Mouser', 'Khalni Heart Expedition', 'Wasteland Strangler', 'Underworld Connections', 'Lotleth Giant', 'Harmonize', 'Temple of Mystery', 'Mayor of Avabruck', 'Raven''s Crime', 'Darksteel Colossus', 'Cosima, God of the Voyage', 'Rishkar, Peema Renegade', 'Thornwood Falls', 'Ghost Quarter', 'Day of Judgment', 'Thought Scour', 'Hard Evidence', 'Asylum Visitor', 'Ral Zarek', 'Gigadrowse', 'Opt', 'Anointed Procession', 'Lonely Sandbar', 'Raging Ravine', 'Defiant Strike', 'Treasure Map', 'Nevermore', 'Bedevil', 'Render Silent', 'Secluded Courtyard', 'Tempered Steel', 'Earthshaker Khenra', 'Fabled Hero', 'Bastion of Remembrance', 'Drowned Catacomb', 'Kird Ape', 'Bile Blight', 'Sanguine Statuette', 'Izzet Charm', 'Weapons Trainer', 'Reckless Impulse', 'It That Betrays', 'Blighted Agent', 'Prohibit', 'Moonsnare Prototype', 'Sejiri Refuge', 'Skybridge Towers', 'Control Magic', 'Fading Hope', 'Conqueror''s Galleon', 'Masticore', 'Abrade', 'Malakir Rebirth', 'Breaking // Entering', 'Martyr of Sands', 'Far // Away', 'Linvala, Shield of Sea Gate', 'Stubborn Denial', 'Graf Reaver', 'Radiant Scrollwielder', 'Glimmerpost', 'Arcane Sanctum', 'Dread Fugue', 'Flame Slash', 'Reinforced Ronin', 'Hymn to Tourach', 'Jace, the Living Guildpact', 'Ripjaw Raptor', 'Rocco, Cabaretti Caterer', 'Carnophage', 'Ruin Crab', 'Vessel of Nascency', 'Reality Ripple', 'Robe of Mirrors', 'Fire-Lit Thicket', 'Rampant Growth', 'The Underworld Cookbook', 'Fiery Temper', 'Parallel Lives', 'Spark Spray', 'Biomancer''s Familiar', 'Ral, Storm Conduit', 'Forbidden Alchemy', 'Gideon Jura', 'Soulherder', 'Noose Constrictor', 'Blightning', 'Everflowing Chalice', 'Bad River', 'Desperate Ritual', 'Silvergill Adept', 'Exclude', 'Urza''s Factory', 'Go for the Throat', 'Traxos, Scourge of Kroog', 'Grand Architect', 'Esper Panorama', 'Edric, Spymaster of Trest', 'Rally the Ranks', 'Secluded Steppe', 'Oath of Jace', 'Lashwrithe', 'Vampire Socialite', 'Yahenni''s Expertise', 'Vedalken Shackles', 'Falkenrath Gorger', 'Dragonskull Summit', 'Darigaaz Reincarnated', 'Beacon of Tomorrows', 'Scab-Clan Berserker', 'Jwari Disruption', 'Thraben Inspector', 'Double Vision', 'Bronzehide Lion', 'Wayward Swordtooth', 'Fauna Shaman', 'Brokers Hideout', 'Hour of Promise', 'Improbable Alliance', 'Sticky Fingers', 'Forgotten Cave', 'Angel''s Herald', 'Search for Tomorrow', 'Benevolent Bodyguard', 'Experimental Synthesizer', 'Blacklance Paragon', 'Calciform Pools', 'Lightmine Field', 'Dead Weight', 'Grand Arbiter Augustin IV', 'Cathar Commando', 'Chief Engineer', 'Grim Lavamancer', 'Cordial Vampire', 'Nezahal, Primal Tide', 'Morselhoarder', 'Spirited Companion', 'Contested War Zone', 'Consume the Meek', 'Big Score', 'Decree of Justice', 'Erebos''s Intervention', 'Evacuation', 'Temple of Malady', 'Resurgent Belief', 'Iceberg Cancrix', 'Diregraf Ghoul', 'Caldera Hellion', 'Shrapnel Blast', 'Vexing Shusher', 'Growth-Chamber Guardian', 'Borrowed Time', 'Krosan Wayfarer', 'Stormfist Crusader', 'Rise of the Hobgoblins', 'Grumgully, the Generous', 'Autumn''s Veil', 'Lumbering Falls', 'Dennick, Pious Apprentice', 'Wormfang Drake', 'Incandescent Aria', 'Sleight of Hand', 'Wily Goblin', 'Sphere of Safety', 'Quicksilver Gargantuan', 'Postmortem Lunge', 'Hamlet Captain', 'Vampire Lacerator', 'Shred Memory', 'Necrotic Ooze', 'Lightning Strike', 'Hypnotic Specter', 'Esper Charm', 'Arrogant Wurm', 'Mouth // Feed', 'Sky Hussar', 'Goldmire Bridge', 'Worldgorger Dragon', 'Liesa, Forgotten Archangel', 'Duplicant', 'Temple of Silence', 'Student of Warfare', 'Spell Pierce', 'Lens of Clarity', 'Westvale Abbey', 'Pyretic Ritual', 'The Birth of Meletis', 'Garruk Wildspeaker', 'Flame Rift', 'Loxodon Warhammer', 'Ulvenwald Mysteries', 'Slip Out the Back', 'Nezumi Shortfang', 'Oran-Rief, the Vastwood', 'Mind Funeral', 'Dragonstorm', 'Oni-Cult Anvil', 'Index', 'Asmodeus the Archfiend', 'Dark Salvation', 'Pestilent Haze', 'Court Homunculus', 'Grisly Salvage', 'Harald Unites the Elves', 'Castigate', 'Ojutai''s Command', 'Tide Shaper', 'Tectonic Reformation', 'Temple of Abandon', 'Daxos of Meletis', 'Hanweir Garrison', 'Victim of Night', 'Invoke Calamity', 'Viscera Seer', 'Animate Dead', 'Gonti, Lord of Luxury', 'Essence Scatter', 'Lost Legacy', 'Duress', 'Goblin Bombardment', 'Crumbling Vestige', 'Mistvault Bridge', 'Judge''s Familiar', 'Temple of Deceit', 'Falkenrath Aristocrat', 'Colossal Skyturtle', 'Mind''s Desire', 'Irencrag Pyromancer', 'Spikefield Hazard', 'Black Sun''s Zenith', 'Retreat to Coralhelm', 'Ethersworn Canonist', 'Aetherspouts', 'Terastodon', 'Lavinia of the Tenth', 'Orochi Sustainer', 'Muddle the Mixture', 'Melira, Sylvok Outcast', 'Might of Old Krosa', 'Phyrexian Revoker', 'Mwonvuli Acid-Moss', 'Ranger of Eos', 'Mirran Spy', 'Sandsteppe Citadel', 'Olivia''s Dragoon', 'Mishra''s Factory', 'Voidslime', 'Viashino Pyromancer', 'Stromkirk Captain', 'Moonring Island', 'Temple of Plenty', 'Ajani, Caller of the Pride', 'Yisan, the Wanderer Bard', 'Drannith Healer', 'Memory Lapse', 'Coralhelm Commander', 'Makeshift Mannequin', 'Frontier Bivouac', 'Thirst for Discovery', 'Commune with Spirits', 'Kazandu Tuskcaller', 'Sultai Charm', 'Timeless Witness', 'Irencrag Feat', 'Fblthp, the Lost', 'Heartless Act', 'Nether Spirit', 'Skirge Familiar', 'Oust', 'Mystical Teachings', 'Arguel''s Blood Fast', 'Quiet Speculation', 'Talons of Wildwood', 'Mana Leak', 'Mistveil Plains', 'Stromkirk Noble', 'Weaver of Harmony', 'Shigeki, Jukai Visionary', 'Merrow Reejerey', 'Pieces of the Puzzle', 'Consult the Necrosages', 'Gilded Pinions', 'Plague Stinger', 'Tendo Ice Bridge', 'Ohran Viper', 'Fireblade Artist', 'Snow-Covered Plains', 'Invigorate', 'Primal Command', 'Rites of Initiation', 'Oviya Pashiri, Sage Lifecrafter', 'Thornglint Bridge', 'Field of Ruin', 'Luminarch Ascension', 'Hero''s Downfall', 'Wall of Omens', 'Kessig Flamebreather', 'Crux of Fate', 'Rise and Shine', 'Death Cloud', 'Strike It Rich', 'Lightning Rift', 'Memoricide', 'Dire Tactics', 'Diabolic Edict', 'Etherium Sculptor', 'Mirage Mirror', 'Cloudpost', 'Incubation Druid', 'Michiko''s Reign of Truth', 'Scrap Trawler', 'Fume Spitter', 'Gray Merchant of Asphodel', 'Bloodchief''s Thirst', 'Pillage', 'Feed the Swarm', 'Walk the Aeons', 'Champion of Wits', 'Reveillark', 'Watcher for Tomorrow', 'Spawning Pool', 'Razortide Bridge', 'Think Twice', 'Qasali Pridemage', 'Elvish Mystic', 'Shard Volley', 'Magister Sphinx', 'Alms of the Vein', 'Saw It Coming', 'Benthic Biomancer', 'Hour of Revelation', 'Buried Alive', 'Darkmoss Bridge', 'Triskelion', 'Dream Trawler', 'Myth Realized', 'Dread Presence', 'Dread Return', 'Go for Blood', 'Pull from Tomorrow', 'Magma Spray', 'Memorial to War', 'Soldier of the Pantheon', 'Acidic Slime', 'Cleansing Nova', 'Blowfly Infestation', 'Fleecemane Lion', 'Riftwing Cloudskate', 'Rishadan Dockhand', 'Treasure Cruise', 'Folio of Fancies', 'Negate', 'Salvage Titan', 'Barrin, Tolarian Archmage', 'Goblin Dark-Dwellers', 'Enduring Ideal', 'Phyrexian Dreadnought', 'Arcbound Ravager', 'Glory-Bound Initiate', 'Undead Butler', 'Nightveil Specter', 'Teferi''s Moat', 'Throne of Geth', 'Wrench Mind', 'Jungle Shrine', 'Dovin Baan', 'Stirring Wildwood', 'Demigod of Revenge', 'Yosei, the Morning Star', 'Arcbound Worker', 'Teysa, Orzhov Scion', 'Valiant Rescuer', 'Dark Ritual', 'Wayward Guide-Beast', 'Timely Reinforcements', 'Jace Beleren', 'Magus of the Candelabra', 'Blessed Alliance', 'Orim''s Chant', 'Retraction Helix', 'Restoration Angel', 'Graveyard Marshal', 'Detention Sphere', 'Sacred Fire', 'Goro-Goro, Disciple of Ryusei', 'Liliana Vess', 'Voltage Surge', 'Sylvan Scrying', 'Tempest Djinn', 'Duskwatch Recruiter', 'Servo Exhibition', 'Hanweir Militia Captain', 'General Ferrous Rokiric', 'Mesmeric Fiend', 'Join the Dance', 'Nephalia Drownyard', 'Dizzy Spell', 'Increasing Ambition', 'Opulent Palace', 'Shatter the Sky', 'Costly Plunder', 'Midnight Clock', 'Unburial Rites', 'Falkenrath Forebear', 'Flood Plain', 'Foreboding Ruins', 'Indulgent Aristocrat', 'Kambal, Consul of Allocation', 'Lorescale Coatl', 'Exhaustion', 'Upheaval', 'Bane of Bala Ged', 'Tooth and Nail', 'Mephidross Vampire', 'Tyrant of Discord', 'Treacherous Blessing', 'Essence Flux', 'Future Sight', 'Foul Play', 'Sorin Markov', 'Thawing Glaciers', 'Fact or Fiction', 'Overrun', 'Circular Logic', 'Voltaic Servant', 'Thought Erasure', 'Realm Razer', 'Kefnet the Mindful', 'Snowfield Sinkhole', 'Bloodtithe Harvester', 'Tome Scour', 'Sterling Grove', 'Wild Mongrel', 'Time Wipe', 'Blade Splicer', 'Training Grounds', 'Vapor Snag', 'Lathliss, Dragon Queen', 'Acolyte of Affliction', 'Wight', 'Consuming Aberration', 'Verdurous Gearhulk', 'Night of Souls'' Betrayal', 'Abbot of Keral Keep', 'Izzet Signet', 'Satyr Wayfinder', 'Oath of Teferi', 'Eternal Dragon', 'Talisman of Impulse', 'Kunoros, Hound of Athreos', 'Mind Grind', 'Terramorphic Expanse', 'Intruder Alarm', 'Boros Reckoner', 'Crackling Drake', 'Crumbling Necropolis', 'Doom Blade', 'Dawn of Hope', 'Sigil of the Empty Throne', 'Cabal Stronghold', 'Elixir of Immortality', 'Mission Briefing', 'Codex Shredder', 'Rune-Scarred Demon', 'Undergrowth Champion', 'Mistcutter Hydra', 'Brain Maggot', 'Animation Module', 'Favored Hoplite', 'Azorius Signet', 'Sign in Blood', 'Magister of Worth', 'Skyclave Cleric', 'Signal Pest', 'Drossforge Bridge', 'Abiding Grace', 'Buried Ruin', 'Elspeth''s Nightmare', 'Piranha Marsh', 'Riddlesmith', 'Cloudshift', 'Bloodgift Demon', 'Commit // Memory', 'Moritte of the Frost', 'Explore', 'Seaside Citadel', 'Dual Strike', 'Coiling Oracle', 'Forbid', 'Ghitu Lavarunner', 'Empyrial Archangel', 'Cerulean Wisps', 'Anointer Priest', 'Wilt', 'Kami of False Hope', 'Bloodline Keeper', 'Geomancer''s Gambit', 'Putrid Imp', 'Tanglepool Bridge', 'Coalition Relic', 'Olivia Voldaren', 'Teferi, Mage of Zhalfir', 'Gitaxian Probe', 'Barrenton Medic', 'Mystifying Maze', 'Scryb Ranger', 'Putrefy', 'Always Watching', 'Hornet Queen', 'Glorybringer', 'Honored Hydra', 'Lava Dart', 'Shredded Sails', 'Shinka, the Bloodsoaked Keep', 'Mana Bloom', 'Basking Rootwalla', 'Snow-Covered Swamp', 'Golgari Rot Farm', 'Brokers Charm', 'Prizefight', 'Carom', 'White Sun''s Zenith', 'Witching Well', 'Selesnya Sanctuary', 'Barter in Blood', 'Hagra Mauling', 'Scrapyard Recombiner', 'Dryad Militant', 'Battlefield Forge', 'Logic Knot', 'Hypnotic Grifter', 'Mimic Vat', 'Ransack the Lab', 'Banishing Knack', 'Patchwork Automaton', 'Into the Story', 'Cruel Ultimatum', 'Drannith Stinger', 'Verdant Command', 'Vault Skirge', 'Silverbluff Bridge', 'Ash Zealot', 'Platinum Angel', 'Fatestitcher', 'Riptide Laboratory', 'Disciple of the Vault', 'Outland Liberator', 'Hypergenesis', 'Into the Roil', 'Cathartic Pyre', 'Quicken', 'Tangled Florahedron', 'Wolfir Silverheart', 'Desperate Ravings', 'Wonder', 'Gather the Townsfolk', 'Endbringer', 'Battle of Wits', 'Hinterland Harbor', 'Whip of Erebos', 'World Shaper', 'The Scorpion God', 'Myr Battlesphere', 'Wrath of God', 'Sarcomancy', 'Sylvan Primordial', 'Seething Song', 'Knight of the White Orchid', 'Hall of the Bandit Lord', 'Borborygmos Enraged', 'Tuktuk Rubblefort', 'Tangle', 'Fraying Sanity', 'Kopala, Warden of Waves', 'Tidal Warrior', 'Voldaren Epicure', 'Augur of Bolas', 'Burglar Rat', 'Mizzium Skin', 'Commune with the Gods', 'Runed Halo', 'Myr Retriever', 'Vindicate', 'Barbarian Ring', 'Loxodon Smiter', 'Cartel Aristocrat', 'Warstorm Surge', 'Sphinx of Uthuun', 'Benalish Marshal', 'Abundant Harvest', 'Murderous Redcap', 'Hissing Quagmire', 'Bone Shards', 'Ravenous Squirrel', 'Era of Enlightenment', 'Florian, Voldaren Scion', 'Adorned Pouncer', 'Ensoul Artifact', 'Just the Wind', 'Ember Swallower', 'Dauntless Bodyguard', 'Death Baron', 'Cultivate', 'Winged Coatl', 'Vampire of the Dire Moon', 'Chain Lightning', 'Anax, Hardened in the Forge', 'Scrapheap Scrounger', 'Firebolt', 'Birds of Paradise'))) 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, 74.4, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (79.9 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Temple of Mystery', 'Bloodbraid Elf', 'Pieces of the Puzzle', 'Treasure Map', 'Laboratory Maniac', 'Purphoros''s Intervention', 'Mistcaller', 'Tendrils of Agony', 'Mesmeric Fiend', 'Saproling Burst', 'Nested Shambler', 'Rakdos Cackler', 'Silverbluff Bridge', 'Faerie Miscreant', 'Arcane Sanctum', 'Dragonskull Summit', 'Snow-Covered Plains', 'Sarulf, Realm Eater', 'Shrapnel Blast', 'Pyretic Ritual', 'Thirst for Knowledge', 'Goblin Electromancer', 'Cathartic Pyre', 'Glacial Fortress', 'Kalonian Tusker', 'Cleansing Wildfire', 'Mogg War Marshal', 'Crumbling Vestige', 'Fog', 'Stone Rain', 'Grim Haruspex', 'Basal Sliver', 'Azorius Charm', 'Grand Architect', 'Dimir Aqueduct', 'Piracy Charm', 'Doomwake Giant', 'Dragonstorm', 'Wrath of God', 'Woodfall Primus', 'Ground Rift', 'Ojutai''s Command', 'Mukotai Soulripper', 'Shred Memory', 'Blacklance Paragon', 'Cloudblazer', 'Orim''s Chant', 'Broken Wings', 'Hedron Archive', 'Wooded Bastion', 'Verdant Command', 'Joraga Warcaller', 'Barren Moor', 'Spikefield Hazard', 'Increasing Ambition', 'Varragoth, Bloodsky Sire', 'Fire-Lit Thicket', 'Urza''s Factory', 'Blighted Agent', 'Marwyn, the Nurturer', 'Llanowar Elves', 'Negate', 'Jaya Ballard', 'Call the Skybreaker', 'Far // Away', 'Dennick, Pious Apprentice', 'Sky Hussar', 'Deathgorge Scavenger', 'Flametongue Yearling', 'Gitaxian Probe', 'Tireless Provisioner', 'Bone Shards', 'Jarad''s Orders', 'Pia and Kiran Nalaar', 'Hunted Nightmare', 'Vampire Nighthawk', 'Azami, Lady of Scrolls', 'Big Score', 'Desecration Demon', 'Wall of Omens', 'Thousand-Faced Shadow', 'Spring-Leaf Avenger', 'Treacherous Blessing', 'Champion of Lambholt', 'Lose Focus', 'Elves of Deep Shadow', 'Realm Razer', 'Kjeldoran Outpost', 'Dread Return', 'Sigarda''s Splendor', 'Forbidden Alchemy', 'Putrefy', 'Doom Blade', 'Jwar Isle Refuge', 'Glimpse of Tomorrow', 'Phantasmagorian', 'Golgari Charm', 'Black Sun''s Zenith', 'Expedite', 'Cursecatcher', 'Akki Ember-Keeper', 'Dragonsguard Elite', 'Balustrade Spy', 'Vastwood Surge', 'Of One Mind', 'Malakir Rebirth', 'Bonesplitter', 'Mountain Valley', 'Martyr of Sands', 'Banefire', 'Deprive', 'Declaration in Stone', 'Commit // Memory', 'Timbermare', 'Containment Construct', 'Fell Stinger', 'Feast of Sanity', 'Sphinx of Lost Truths', 'Heliod''s Pilgrim', 'Aspect of Hydra', 'Aetherspouts', 'Vile Entomber', 'Abiding Grace', 'Symbiotic Wurm', 'Mystifying Maze', 'Calciform Pools', 'Vampire Opportunist', 'Barbarian Ring', 'Shard Volley', 'Sunset Revelry', 'Undead Butler', 'Zurgo Bellstriker', 'Morselhoarder', 'Mentor of the Meek', 'Lochmere Serpent', 'Kazandu Mammoth', 'Delver of Secrets', 'Mistcutter Hydra', 'Skirk Prospector', 'Ranger of Eos', 'Empyrial Plate', 'Pack Rat', 'Bedeck // Bedazzle', 'Orcus, Prince of Undeath', 'Harmonize', 'Ezuri, Renegade Leader', 'Soulherder', 'Izzet Boilerworks', 'Tyrant''s Scorn', 'Wavesifter', 'Faerie Vandal', 'Darigaaz Reincarnated', 'Murderous Redcap', 'Metalwork Colossus', 'Seething Song', 'Archetype of Endurance', 'Helm of the Host', 'Captain Lannery Storm', 'Earthshaker Khenra', 'Raging Ravine', 'Call the Bloodline', 'Feed the Swarm', 'Ral, Storm Conduit', 'Opt', 'Tanglepool Bridge', 'Mistblade Shinobi', 'Diabolic Tutor', 'Spark Spray', 'Perplex', 'Doomed Traveler', 'Riveteers Charm', 'Runed Halo', 'Temple of Malady', 'Goblin Dark-Dwellers', 'Strike It Rich', 'Temple of Epiphany', 'Necrogoyf', 'Burning Inquiry', 'Doom Foretold', 'Consume the Meek', 'Elvish Harbinger', 'Rise and Shine', 'Reckless Impulse', 'Michiko''s Reign of Truth', 'Seraph Sanctuary', 'Frostwalk Bastion', 'Firewild Borderpost', 'Quest for the Holy Relic', 'Woodland Cemetery', 'Spawning Pool', 'Zombie Infestation', 'Wild Cantor', 'Murasa Sproutling', 'Scryb Ranger', 'Irencrag Pyromancer', 'Grizzled Outrider', 'Hypnotic Specter', 'Bogardan Hellkite', 'Hero''s Downfall', 'Sower of Temptation', 'Taunting Arbormage', 'Apex of Power', 'Grim Lavamancer', 'Bile Blight', 'Brimstone Dragon', 'Greater Gargadon', 'Dwynen''s Elite', 'Gods Willing', 'Nissa, Worldwaker', 'Cosmos Elixir', 'Whip of Erebos', 'Carven Caryatid', 'Irencrag Feat', 'Molten Slagheap', 'Lashwrithe', 'Evacuation', 'Bloodbraid Marauder', 'Vexing Shusher', 'Smallpox', 'Serpentine Ambush', 'Dragon Fodder', 'Gaea''s Revenge', 'Tempered Steel', 'Gonti, Lord of Luxury', 'Worldgorger Dragon', 'Fauna Shaman', 'Riot Control', 'Solitary Confinement', 'Mindlash Sliver', 'Stormblood Berserker', 'Demonic Dread', 'Mage Duel', 'Touch the Spirit Realm', 'Tectonic Giant', 'Goldmire Bridge', 'Exclude', 'Blackmail', 'Silundi Vision', 'Dissenter''s Deliverance', 'Battle of Wits', 'Pandemonium', 'Forked Bolt', 'Shriekmaw', 'Nevermore', 'Secluded Steppe', 'Restore Balance', 'Butcher Ghoul', 'Weathered Wayfarer', 'Dockside Chef', 'Helm of the Gods', 'Servo Exhibition', 'Asmodeus the Archfiend', 'Gnarlid Colony', 'Triskaidekaphile', 'Anafenza, Kin-Tree Spirit', 'Joraga Treespeaker', 'Mana Leak', 'Izzet Signet', 'Festering Mummy', 'Commence the Endgame', 'Falkenrath Pit Fighter', 'Elvish Mystic', 'Ajani Goldmane', 'Thornwood Falls', 'Crux of Fate', 'Shredded Sails', 'Rabbit Battery', 'Groundswell', 'Mistvein Borderpost', 'Plumeveil', 'Seal of Fire', 'Fact or Fiction', 'Ponder', 'Foreboding Ruins', 'Nissa''s Chosen', 'Figure of Destiny', 'Demigod of Revenge', 'Shardless Agent', 'Birds of Paradise', 'Undercity Informer', 'Elvish Visionary', 'Goblin Anarchomancer', 'Tangled Florahedron', 'Jokulhaups', 'Hunted Witness', 'Wing Shards', 'Call of the Death-Dweller', 'Blackbloom Rogue', 'Snowfield Sinkhole', 'Diabolic Edict', 'Blazing Shoal', 'Temple of Abandon', 'Countryside Crusher', 'Throes of Chaos', 'Cloudpost', 'Hateful Eidolon', 'Temple of Plenty', 'Ghitu Encampment', 'Rabid Bite', 'Blight Mamba', 'Favored Hoplite', 'Hornet Queen', 'Day of Judgment', 'Aphemia, the Cacophony', 'Cartel Aristocrat', 'Unburial Rites', 'Wildfield Borderpost', 'Trickbind', 'Explore', 'Ritual of Soot', 'Experimental Synthesizer', 'Jukai Naturalist', 'Foundry Street Denizen', 'Dire-Strain Rampage', 'Tempest Djinn', 'Tatsunari, Toad Rider', 'Skyscribing', 'Blazing Rootwalla', 'Grasslands', 'Shatter the Sky', 'Ethereal Haze', 'Forbid', 'Everflowing Chalice', 'Nightveil Specter', 'Sigil of the Empty Throne', 'Overeager Apprentice', 'Watcher for Tomorrow', 'Forgotten Cave', 'Drowned Catacomb', 'Yorvo, Lord of Garenbrig', 'Sultai Charm', 'Quiet Speculation', 'Haakon, Stromgald Scourge', 'Lonely Sandbar', 'Think Twice', 'Zenith Flare', 'Temple of Deceit', 'Barrin, Tolarian Archmage', 'Spell Pierce', 'Fatestitcher', 'Riptide Laboratory', 'Benevolent Bodyguard', 'Withered Wretch', 'Gideon''s Intervention', 'Phyrexian Dreadnought', 'Sleight of Hand', 'Nightmare Shepherd', 'Garruk Wildspeaker', 'Deep Forest Hermit', 'Nephalia Academy', 'Dominating Vampire', 'Thought Erasure', 'Dual Strike', 'Temporal Fissure', 'Heartless Act', 'Drossforge Bridge', 'Insolent Neonate', 'Flame Slash', 'Zombify', 'Burst Lightning', 'Scab-Clan Berserker', 'Breathless Knight', 'Decree of Justice', 'Bedlam Reveler', 'Shard Phoenix', 'Vedalken Shackles', 'Leyline of the Meek', 'Piranha Marsh', 'Runechanter''s Pike', 'Grapeshot', 'Thassa''s Intervention', 'Lavaclaw Reaches', 'Zulaport Cutthroat', 'Survival Cache', 'Anguished Unmaking', 'Boomerang', 'Arch of Orazca', 'Tymaret, Chosen from Death', 'Castigate', 'Pulse of Murasa', 'Linvala, Shield of Sea Gate', 'Lumbering Falls', 'Aetherling', 'Basking Rootwalla', 'Dire Tactics', 'Omen of the Sun', 'Field of Ruin', 'Vault of the Archangel', 'Fading Hope', 'Become Immense', 'Inscription of Ruin', 'Lotleth Giant', 'Temple of Enlightenment', 'Wingcrafter', 'Séance', 'Ravenous Squirrel', 'Reality Ripple', 'Oath of Jace', 'Jace, Cunning Castaway', 'Dead // Gone', 'Skyclave Shade', 'Sin Prodder', 'Rakdos Headliner', 'Okina, Temple to the Grandfathers', 'Ensoul Artifact', 'Oblivion Ring', 'Curiosity', 'Obsessive Search', 'Judge''s Familiar', 'Hinterland Harbor', 'Prey''s Vengeance', 'Ravenous Chupacabra', 'Pull from Tomorrow', 'Cathartic Reunion', 'Ethersworn Canonist', 'Stone Haven Outfitter', 'Nissa Revane', 'Kambal, Consul of Allocation', 'Fyndhorn Elves', 'Koll, the Forgemaster', 'Bloodthrone Vampire', 'Bloodtithe Harvester', 'Kunoros, Hound of Athreos', 'Tangle', 'Archfiend''s Vessel', 'Kitchen Imp', 'Search for Tomorrow', 'Liliana Vess', 'Commune with the Gods', 'Caves of Koilos', 'Archfiend of Ifnir', 'Hard Evidence', 'Auramancer', 'Reckless Charge', 'Stubborn Denial', 'Dark Ritual', 'Vivid Crag', 'Crackling Drake', 'Flourishing Fox', 'Stirring Wildwood', 'Careful Cultivation', 'Return to Nature', 'Vampiric Fury', 'Blood Vassal', 'Nature''s Lore', 'Sudden Shock', 'Jolrael, Mwonvuli Recluse', 'Mobilized District', 'Curse of the Pierced Heart', 'Mudslide', 'Larger Than Life', 'Cultivate', 'Jack-o''-Lantern', 'Mystic Monastery', 'Azorius Signet', 'Primal Command', 'Bloodchief''s Thirst', 'Thornglint Bridge', 'Westvale Abbey', 'Snow-Covered Mountain', 'Hopeful Eidolon', 'Flood Plain', 'Rustvale Bridge', 'Fieldmist Borderpost', 'Condemn', 'Augur of Bolas', 'Drannith Stinger', 'Nimble Larcenist', 'Alms of the Vein', 'Teysa, Orzhov Scion', 'Arbor Elf', 'Hotshot Mechanic', 'Congregation at Dawn', 'Atris, Oracle of Half-Truths', 'Hammer of Bogardan', 'Furyblade Vampire', 'Merfolk Windrobber', 'Radha, Heart of Keld', 'Thrill of Possibility', 'Ghost Quarter', 'Yahenni''s Expertise', 'Argentum Armor', 'Mizzium Skin', 'Memoricide', 'Sky Tether', 'Eye of Nowhere', 'Goblin Wardriver', 'Jungle Hollow', 'Assault Strobe', 'Growing Rites of Itlimoc', 'Liliana''s Standard Bearer', 'Dawn of Hope', 'Mystic Snake', 'Dread Fugue', 'Battlefield Forge', 'Painful Truths', 'Dismal Backwater', 'Sea Gate Wreckage', 'Destiny Spinner', 'Centaur Garden', 'Reckless Rage', 'Vengeful Pharaoh', 'Arasta of the Endless Web', 'Swerve', 'Cathar Commando', 'Might of Murasa', 'Elspeth Conquers Death', 'Tamiyo''s Safekeeping', 'Spirited Companion', 'Rite of Oblivion', 'Illuminator Virtuoso', 'Goblin Bombardment', 'Falkenrath Gorger', 'Entomber Exarch', 'Lightning Rift', 'Timely Reinforcements', 'Invigorate', 'Eternal Dragon', 'Stromkirk Noble', 'Champion of Wits', 'Teachings of the Kirin', 'Weaver of Harmony', 'Borrowed Time', 'Chain Lightning', 'Desperate Ravings', 'Distortion Strike', 'Quarantine Field', 'Elvish Clancaller', 'Memory Lapse', 'Godo, Bandit Warlord', 'Sylvan Advocate', 'Vapor Snag', 'Evolving Wilds', 'Mistveil Plains', 'Thaumatic Compass', 'Invoke Calamity', 'Skyclave Cleric', 'Hagra Mauling', 'Ancestral Anger', 'Revitalize', 'Lavinia of the Tenth', 'Faithful Mending', 'Magister of Worth', 'Cabal Therapist', 'Mind''s Desire', 'Desperate Ritual', 'Game Trail', 'Satyr Hoplite', 'Thirst for Discovery', 'Drannith Healer', 'Moon-Circuit Hacker', 'Fiery Temper', 'Obscura Charm', 'Crumbling Necropolis', 'Burrog Befuddler', 'Sunscour', 'Thryx, the Sudden Storm', 'Nyxborn Shieldmate', 'Hour of Devastation', 'Infernal Grasp', 'Pili-Pala', 'Slagstorm', 'Regrowth', 'Frontier Bivouac', 'Mirrorshell Crab', 'Midnight Reaper', 'Sol Talisman', 'Jace Beleren', 'Nivmagus Elemental', 'Wheel of Fate', 'Agonizing Remorse', 'Syr Faren, the Hengehammer', 'Wilt', 'Fire Covenant', 'Blessed Breath', 'Elspeth''s Nightmare', 'Logic Knot', 'Experimental Frenzy', 'Vivid Creek', 'Voidslime', 'Ondu Inversion', 'Scrabbling Claws', 'Shock', 'Rampant Growth', 'Llanowar Wastes', 'Ethereal Armor', 'Putrid Imp', 'Elvish Archdruid', 'Hanweir Garrison', 'Essence Scatter', 'Avoid Fate', 'Nephalia Drownyard', 'Court Homunculus', 'Season of Growth', 'Terramorphic Expanse', 'Brain Freeze', 'Flash of Insight', 'Riveteers Overlook', 'Treasure Cruise', 'Curse of Hospitality', 'Phylactery Lich', 'Voldaren Epicure', 'Exhaustion', 'Barter in Blood', 'Go for Blood', 'Hostage Taker', 'Behold the Multiverse', 'Clifftop Retreat', 'Collected Conjuring', 'Grozoth', 'Quicken', 'Glorybringer', 'Heartless Summoning', 'Deep Analysis', 'Into the Roil', 'Firebolt', 'Battle Hymn', 'Vivid Marsh', 'Buried Alive', 'Ichorclaw Myr', 'Dovin Baan', 'Efreet Flamepainter', 'Signal Pest', 'The Scorpion God', 'Lava Dart', 'Wolfbriar Elemental', 'Flame-Kin Zealot', 'Overgrowth', 'Veinfire Borderpost', 'Vine Gecko', 'Angel of Glory''s Rise', 'Duress', 'Generous Visitor', 'Arcanis the Omnipotent', 'Seekers'' Squire', 'Arguel''s Blood Fast', 'Improbable Alliance', 'Renewed Faith', 'Hellspark Elemental', 'Hero of Precinct One', 'Mire''s Grasp', 'Ornithopter', 'Pyroclasm', 'Aether Spellbomb', 'Bala Ged Recovery', 'Lead the Stampede', 'Melira, Sylvok Outcast', 'Witching Well', 'Frantic Inventory', 'Deathless Knight', 'Hissing Quagmire', 'Kuldotha Rebirth', 'Hypnotic Sprite', 'Esper Charm', 'Sign in Blood', 'Arcbound Ravager', 'General Ferrous Rokiric', 'The Raven''s Warning', 'Vindicate', 'Viscera Seer', 'Gloomshrieker', 'Cloudthresher', 'Ramunap Excavator', 'Mishra''s Factory', 'Judith, the Scourge Diva', 'Fabricate', 'Postmortem Lunge', 'Fertile Ground', 'Tendo Ice Bridge', 'Prowling Serpopard', 'Edric, Spymaster of Trest', 'Shadowbeast Sighting', 'Viashino Pyromancer', 'Glimmerpost', 'Thoughtpicker Witch', 'Temple Bell', 'Skirge Familiar', 'Dream Trawler', 'Tectonic Reformation', 'Grimdancer', 'Ravenous Lindwurm', 'Repeal', 'The Birth of Meletis', 'Canyon Slough', 'Beast Whisperer', 'Mask of Memory', 'Kami of False Hope', 'Martyr of Frost', 'Darkmoss Bridge', 'Savage Knuckleblade', 'Hymn to Tourach', 'Memory''s Journey', 'Incinerate', 'Mystical Teachings', 'Pillage', 'Holy Day', 'Moritte of the Frost', 'Rootbound Crag', 'Abrade', 'Gatekeeper of Malakir', 'Sylvan Library', 'Outland Liberator', 'Pestilent Haze', 'Pelakka Predation', 'Alesha, Who Smiles at Death', 'Rally the Ancestors', 'Giant Killer', 'Demonic Embrace', 'Elixir of Immortality', 'Geomancer''s Gambit', 'Dead Weight', 'Dregscape Sliver', 'Slip Out the Back', 'Visara the Dreadful', 'Shuko', 'Elvish Champion', 'Olivia Voldaren', 'Bedevil', 'Consult the Necrosages', 'Empty the Warrens', 'Izzet Charm', 'Control Magic', 'Thief of Sanity', 'Orcish Lumberjack', 'See the Truth', 'Rob the Archives', 'Jeskai Ascendancy', 'Gideon Jura', 'Dimir Signet', 'Detention Sphere', 'Coiling Oracle', 'Bastion of Remembrance', 'Howling Mine', 'Kaya, Ghost Assassin', 'Thraben Inspector', 'Groundbreaker', 'Lost Legacy', 'Witch''s Cottage', 'Thought Scour', 'Midnight Clock', 'Sudden Death', 'Thawing Glaciers', 'Icehide Golem', 'Erebos''s Intervention', 'The Underworld Cookbook', 'Oust', 'Porphyry Nodes', 'Krenko''s Command', 'Oran-Rief, the Vastwood', 'Master of Death', 'Frantic Search', 'Ivory Tower', 'Kumano Faces Kakkazan', 'Aven Mindcensor', 'Temple of Silence', 'Upheaval', 'Infernal Plunge', 'Massacre Girl', 'Animate Dead', 'Barrenton Medic', 'Necrotic Ooze', 'Firespout', 'Open the Armory', 'Razortide Bridge', 'Chronomantic Escape', 'Squadron Hawk', 'Jwari Disruption', 'Chandra, Pyromaster', 'Might of Old Krosa', 'Ash Zealot', 'Asylum Visitor', 'Restoration Angel', 'Knight of the Reliquary', 'Conqueror''s Galleon', 'Swiftwater Cliffs', 'Flame Rift', 'Slagwoods Bridge', 'Orzhov Signet', 'Vault Skirge', 'Into the Story', 'Okiba Reckoner Raid', 'Valiant Rescuer', 'Nomad Outpost', 'Goblin Bushwhacker', 'Vivid Grove', 'Raze the Effigy'))) 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, 79.9, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (65.3 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Loxodon Smiter', 'Think Twice', 'Blackmail', 'Fusion Elemental', 'Behold the Multiverse', 'Hagra Mauling', 'Primal Amulet', 'Bad River', 'Smokestack', 'Living Lore', 'Raze the Effigy', 'Mana Flare', 'Ezuri, Renegade Leader', 'Maelstrom Nexus', 'Intangible Virtue', 'Lumbering Falls', 'Barren Moor', 'Kami of False Hope', 'Stromkirk Noble', 'Obstinate Baloth', 'Liliana Vess', 'Wooded Bastion', 'Dead // Gone', 'Wandering Mind', 'Sire of Insanity', 'Phyrexian Dreadnought', 'Hypnotic Sprite', 'Terrarion', 'Insolent Neonate', 'Overwhelming Denial', 'Woodfall Primus', 'Kumano Faces Kakkazan', 'Llanowar Elves', 'Dimir Signet', 'Asmodeus the Archfiend', 'Myth Realized', 'Terramorphic Expanse', 'Wavesifter', 'Vryn Wingmare', 'Mistvein Borderpost', 'Magister Sphinx', 'Falkenrath Forebear', 'Dryad Militant', 'Ram Through', 'Shardless Agent', 'Mire''s Grasp', 'Guild Globe', 'Lightning Strike', 'Specter''s Shroud', 'Lava Dart', 'Ritual of Soot', 'Angelic Purge', 'Fieldmist Borderpost', 'Eiganjo Uprising', 'Stirring Wildwood', 'Temple of Mystery', 'Faerie Miscreant', 'Mind''s Desire', 'Treasure Cruise', 'Expansion // Explosion', 'Battlefield Forge', 'Rule of Law', 'Counterflux', 'Boomerang', 'Oracle of Mul Daya', 'Suture Priest', 'Crystal Shard', 'Master of the Pearl Trident', 'Crumbling Necropolis', 'Firewild Borderpost', 'Martyr of Sands', 'Regal Force', 'Mizzium Mortars', 'Falkenrath Pit Fighter', 'Grisly Salvage', 'Clifftop Retreat', 'Spellweaver Helix', 'Gather the Townsfolk', 'Figure of Destiny', 'Illuminator Virtuoso', 'Fiend Hunter', 'Unsubstantiate', 'Shaman of the Pack', 'Drowned Catacomb', 'Season of Growth', 'Duress', 'Chandra, Pyromaster', 'Sejiri Refuge', 'Brain Freeze', 'Falkenrath Aristocrat', 'Squadron Hawk', 'Barrin, Tolarian Archmage', 'Blazing Rootwalla', 'General Ferrous Rokiric', 'Malakir Rebirth', 'Horde of Notions', 'Fiery Temper', 'Cleansing Wildfire', 'Pyromancer''s Swath', 'Cordial Vampire', 'Secluded Steppe', 'Ondu Inversion', 'Champion of Wits', 'Generous Visitor', 'Liliana''s Specter', 'Stubborn Denial', 'Mirrodin''s Core', 'Judith, the Scourge Diva', 'Temple of Abandon', 'Lost Legacy', 'Oust', 'Cultivate', 'Demon Bolt', 'Tyrant''s Scorn', 'Sylvan Library', 'Into the Story', 'Dwynen''s Elite', 'Fire-Lit Thicket', 'Possibility Storm', 'Revitalize', 'Satoru Umezawa', 'Arc-Slogger', 'Call of the Herd', 'Ethersworn Canonist', 'Day of Judgment', 'Merrow Reejerey', 'Din of the Fireherd', 'Circle of Confinement', 'Thousand-Faced Shadow', 'Dead Weight', 'Concerted Defense', 'Altered Ego', 'Mystic Monastery', 'Dusk Legion Zealot', 'Moorland Haunt', 'Vindicate', 'Satyr Hoplite', 'Prowling Serpopard', 'Vampire''s Kiss', 'Shivan Dragon', 'Solfatara', 'Opt', 'Eldrazi Mimic', 'Assault Strobe', 'Exhaustion', 'Fallen Shinobi', 'Wildfield Borderpost', 'Cloudblazer', 'Semblance Anvil', 'Vampire Opportunist', 'Dreadhorde Invasion', 'Wilt-Leaf Liege', 'Cathar Commando', 'Ancestral Anger', 'Sleight of Hand', 'Midnight Reaper', 'Stony Strength', 'Trace of Abundance', 'Frantic Search', 'Azor''s Gateway', 'Slagstorm', 'Angel of Glory''s Rise', 'Saproling Migration', 'Cursed Totem', 'Altar of the Brood', 'Tymaret, Chosen from Death', 'Memory''s Journey', 'Esper Charm', 'Restore Balance', 'Molten Slagheap', 'Cloudfin Raptor', 'Metalwork Colossus', 'Cruel Ultimatum', 'Briarbridge Patrol', 'Evangel of Heliod', 'Radiant Flames', 'Blood Fountain', 'Orgg', 'Timeless Witness', 'Benevolent Bodyguard', 'Mentor of the Meek', 'Sarcomancy', 'Vivid Meadow', 'Gaea''s Revenge', 'Dawn of Hope', 'Lochmere Serpent', 'Ghirapur Aether Grid', 'Outland Liberator', 'Moonhold', 'Steel Sabotage', 'Desperate Ritual', 'Nomad Outpost', 'Game Trail', 'Vapor Snag', 'Wrench Mind', 'Deliberate', 'Herbal Poultice', 'Wild Pair', 'Sylvan Awakening', 'Exclude', 'Dire Tactics', 'Shriekmaw', 'Putrid Goblin', 'Slagwoods Bridge', 'Coiling Oracle', 'Coastal Tower', 'Walk the Aeons', 'Murderous Redcap', 'Viscera Seer', 'Izzet Boilerworks', 'Keruga, the Macrosage', 'Thirst for Discovery', 'Hypnotic Specter', 'Ghitu Encampment', 'Powerstone Shard', 'Memory Lapse', 'Wren''s Run Vanquisher', 'Kazandu Mammoth', 'Woodland Cemetery', 'Vigor', 'Vivid Creek', 'Evolving Wilds', 'Grapeshot', 'Darksteel Colossus', 'Phantasmal Bear', 'Goblin Bushwhacker', 'Ground Rift', 'Seaside Citadel', 'Desperate Ravings', 'Mogg War Marshal', 'Reality Ripple', 'Quicken', 'Watcher for Tomorrow', 'Indulgent Aristocrat', 'Jwari Disruption', 'Tangled Florahedron', 'Negate', 'Woodland Champion', 'Hunted Horror', 'Buried Alive', 'Demigod of Revenge', 'Hinterland Harbor', 'Dire-Strain Rampage', 'Goblin Ringleader', 'Cabal Therapist', 'Dragonsguard Elite', 'Drossforge Bridge', 'Voldaren Epicure', 'Worst Fears', 'Aphemia, the Cacophony', 'High-Speed Hoverbike', 'Sanguine Statuette', 'Fabricate', 'Demonic Embrace', 'Cosima, God of the Voyage', 'Skyclave Cleric', 'Tarfire', 'Foundry Street Denizen', 'Commune with the Gods', 'Alchemist''s Vial', 'Runed Halo', 'Revoke Existence', 'Forbid', 'Sign in Blood', 'Stasis Snare', 'Prey''s Vengeance', 'Safewright Quest', 'Dryad''s Revival', 'Bogardan Hellkite', 'Sram''s Expertise', 'Sylvan Messenger', 'Ral Zarek', 'Eye of Nowhere', 'Fireball', 'Dramatic Finale', 'Goblin Instigator', 'Artful Dodge', 'Future Sight', 'Flame Slash', 'Deprive', 'Gruul Signet', 'Zealous Persecution', 'Barbed Sextant', 'Temple of Silence', 'Veinfire Borderpost', 'Tomb of Urami', 'Maestros Charm', 'Eternal Scourge', 'Ravenous Chupacabra', 'Restoration Angel', 'Mistblade Shinobi', 'Hushwing Gryff', 'Filigree Angel', 'Birds of Paradise', 'Chain Lightning', 'Gossamer Chains', 'Kami''s Flare', 'Asylum Visitor', 'Scurry Oak', 'Skirge Familiar', 'Raging Ravine', 'Mirrorshell Crab', 'Rishadan Dockhand', 'Forgotten Cave', 'Porphyry Nodes', 'Dragonspark Reactor', 'Prophetic Prism', 'Discovery // Dispersal', 'Blackbloom Rogue', 'Snowfield Sinkhole', 'Ghost Quarter', 'Genesis', 'Sky Hussar', 'Dark Ritual', 'Acolyte of Affliction', 'Jace, the Living Guildpact', 'The Underworld Cookbook', 'Fire Covenant', 'Unified Will', 'Kjeldoran Outpost', 'Erebos''s Intervention', 'Undead Butler', 'Skyclave Shade', 'Vision Skeins', 'Bygone Bishop', 'Hunted Nightmare', 'Kaleidoscorch', 'Cathartic Pyre', 'Vampire of the Dire Moon', 'Bloodbraid Elf', 'Incubation Druid', 'Rootbound Crag', 'Firespout', 'Sorcerer Class', 'Sorin Markov', 'Storm Herald', 'Death Baron', 'Sejiri Shelter', 'Nivmagus Elemental', 'Mouth // Feed', 'Staggering Insight', 'Pyretic Ritual', 'Sigil Blessing', 'Blue Sun''s Zenith', 'Mist-Syndicate Naga', 'Infinite Obliteration', 'Lonely Sandbar', 'Lord of the Undead', 'Lavaclaw Reaches', 'Expedite', 'Diregraf Colossus', 'Mana Leak', 'Fatestitcher', 'Vault of the Archangel', 'Rebuild', 'Searing Spear', 'Feed the Swarm', 'Dragonskull Summit', 'Azorius Charm', 'Sacred Fire', 'Ethersworn Sphinx', 'Scab-Clan Berserker', 'Fling', 'Wrath of God', 'Yarok''s Fenlurker', 'Bone Shards', 'Mizzium Skin', 'Mogg Fanatic', 'Skirk Prospector', 'Temple of Triumph', 'Burst Lightning', 'Trostani''s Summoner', 'Chromatic Lantern', 'Delver of Secrets', 'Egon, God of Death', 'Arcane Sanctum', 'Greater Gargadon', 'Gavony Township', 'Laboratory Maniac', 'Saw It Coming', 'Champion of Dusk', 'Ulvenwald Mysteries', 'Dual Strike', 'Glacial Fortress', 'See the Truth', 'Faerie Vandal', 'Tanglepool Bridge', 'Phantasmagorian', 'Glen Elendra Archmage', 'Geomancer''s Gambit', 'Jungle Shrine', 'Gideon Jura', 'Furyblade Vampire', 'Spinerock Knoll', 'Shrine of Burning Rage', 'Murmuring Mystic', 'Goblin Bombardment', 'Field of Ruin', 'Slip Out the Back', 'Hero of Precinct One', 'Kuldotha Forgemaster', 'Disenchant', 'Goblin Electromancer', 'Ilysian Caryatid', 'Akroma, Angel of Fury', 'Brokers Hideout', 'Odds // Ends', 'Lonis, Cryptozoologist', 'Cleansing Nova', 'Vedalken Shackles', 'Vampiric Fury', 'Infernal Grasp', 'Earthshaker Khenra', 'Elvish Archdruid', 'Patchwork Automaton', 'Goblin Chieftain', 'Experimental Frenzy', 'Bloodchief''s Thirst', 'Approach of the Second Sun', 'Axgard Armory', 'Kessig Wolf Run', 'Chasm Skulker', 'Orim''s Chant', 'Momentary Blink', 'Seething Song', 'Captivating Vampire', 'Whip of Erebos', 'Ranger''s Guile', 'Thirst for Meaning', 'Sandsteppe Citadel', 'Salvage Titan', 'Gigantomancer', 'Satyr Wayfinder', 'Nested Shambler', 'Palace Siege', 'Canyon Slough', 'Battle of Wits', 'Skylasher', 'Nyxathid', 'Burning of Xinye', 'Jace Beleren', 'Midnight Clock', 'Jace, Memory Adept', 'Invisible Stalker', 'Silverbluff Bridge', 'Bala Ged Recovery', 'Incandescent Aria', 'Mesmeric Fiend', 'Join the Dance', 'Moon-Circuit Hacker', 'Gnarlroot Trapper', 'Rift Sower', 'Spikefield Hazard', 'Elvish Mystic', 'Spell Pierce', 'Wingcrafter', 'Prophet of Kruphix', 'Ponder', 'Gaea''s Will', 'Ornithopter of Paradise', 'Karn''s Temporal Sundering', 'Carnophage', 'Unburial Rites', 'Magister of Worth', 'Heartless Act', 'Cursecatcher', 'Improbable Alliance', 'Mistcutter Hydra', 'Fblthp, the Lost', 'Riftwing Cloudskate', 'Hateful Eidolon', 'Vampire Lacerator', 'Barrenton Medic', 'Gatekeeper of Malakir', 'Grumgully, the Generous', 'Flood Plain', 'Curse of Exhaustion', 'Ral, Storm Conduit', 'Llanowar Wastes', 'Asceticism', 'Galvanic Relay', 'Colossification', 'Mishra''s Factory', 'Morselhoarder', 'Epochrasite', 'Jokulhaups', 'Dovin Baan', 'Failure // Comply', 'Viashino Pyromancer', 'Rustvale Bridge', 'Temple of Epiphany', 'Dread', 'Inevitable Betrayal', 'Glass Casket', 'Lay of the Land', 'Oni-Cult Anvil', 'Caravan Vigil', 'Arrogant Bloodlord', 'Maestros Theater', 'Demonic Dread', 'Crackling Drake', 'Call of the Death-Dweller', 'Castigate', 'Elves of Deep Shadow', 'Sanguine Sacrament', 'Mystic Snake', 'Frontier Bivouac', 'Bloodline Keeper', 'Obscura Storefront', 'Inscription of Ruin', 'Kabira Takedown', 'Sylvan Primordial', 'Search for Tomorrow', 'Hypergenesis', 'Needle Spires', 'Vampire Nighthawk', 'Sylvan Anthem', 'Flame-Blessed Bolt', 'Regrowth', 'Hymn to Tourach', 'Grim Lavamancer', 'Angel of Despair', 'Strike It Rich', 'Wight', 'Blade Splicer', 'Kaya, Ghost Assassin', 'Secluded Courtyard', 'Touch the Spirit Realm', 'Nissa, Worldwaker', 'Goldmire Bridge', 'Silver-Fur Master', 'Reverent Hoplite', 'Temple of Deceit', 'Thawing Glaciers', 'Falkenrath Gorger', 'Timely Reinforcements', 'Talara''s Battalion', 'Gateway Plaza', 'Sidisi''s Faithful', 'Desecration Demon', 'Tombstalker', 'Teachings of the Kirin', 'Etherium Sculptor', 'Tormenting Voice', 'Goblin Dark-Dwellers', 'Invoke Calamity', 'Spear of Heliod', 'Erdwal Illuminator', 'Flame-Kin Zealot', 'Dread Fugue', 'Jhoira, Weatherlight Captain', 'Razortide Bridge', 'Boros Reckoner', 'Rishkar, Peema Renegade', 'Fireblade Charger', 'Raise the Alarm', 'Kira, Great Glass-Spinner', 'Thundering Raiju', 'Warstorm Surge', 'Dream Trawler', 'Retraction Helix', 'Security Bypass', 'Earthquake', 'Quest for Pure Flame', 'Gloomshrieker', 'Abrade', 'Diabolic Edict', 'Jack-o''-Lantern', 'Dragon Mantle', 'Master of Death', 'Harbinger of the Tides', 'Izzet Signet', 'Knight of the White Orchid', 'Nevermaker', 'Hurricane', 'Voltage Surge', 'Thought Scour', 'Blasphemous Act', 'Lantern of the Lost', 'Tempest Djinn', 'Tamiyo''s Safekeeping', 'Jolrael, Mwonvuli Recluse', 'Diregraf Ghoul', 'Undercity Informer', 'Condemn', 'Pirate''s Pillage', 'Blossoming Calm', 'Rabbit Battery', 'Pelakka Predation', 'Sterling Grove', 'Gigadrowse', 'Oversoul of Dusk', 'Consuming Vapors', 'Fauna Shaman', 'Reinforced Ronin', 'Liege of the Tangle', 'Acidic Slime', 'Vivid Crag', 'Lashwrithe', 'Experimental Synthesizer', 'Coralhelm Commander', 'Warkite Marauder', 'Graveyard Marshal', 'Tocatli Honor Guard', 'Disciple of the Vault', 'Ranger of Eos', 'Mistvault Bridge', 'Balustrade Spy', 'Necrotic Ooze', 'Force of Nature', 'Nature''s Lore', 'Caves of Koilos', 'Jhoira''s Familiar', 'Of One Mind', 'Gitaxian Probe', 'Tendrils of Agony', 'Lose Focus', 'Chandra, Fire Artisan', 'Mobilized District', 'Repeal', 'Oblivion Ring', 'Disciple of Bolas', 'Fact or Fiction', 'Pack Rat', 'Weaver of Harmony', 'Barbarian Ring', 'Hornet Queen', 'Temple of Enlightenment', 'Ingenious Infiltrator', 'Ivy Lane Denizen', 'Thraben Inspector', 'Glimmer Bairn', 'Stormchaser Drake', 'Boros Signet', 'Elvish Clancaller', 'Silvergill Adept', 'Colossal Skyturtle', 'Beastcaller Savant', 'Archway Commons', 'Ignite Memories', 'Terminus', 'Verdant Command', 'Soulherder', 'Dread Return', 'Graf Mole', 'Braids, Cabal Minion', 'Incinerate', 'Judge''s Familiar', 'Azami, Lady of Scrolls', 'Rite of Oblivion', 'Dark Salvation', 'Animate Dead', 'Edric, Spymaster of Trest', 'Foreboding Ruins', 'Cartel Aristocrat', 'Temple of Malice', 'Abiding Grace', 'Bile Blight', 'Conflagrate', 'Vivid Marsh', 'Changeling Outcast', 'Lead the Stampede', 'Wall of Omens', 'Proclamation of Rebirth', 'Tide Shaper', 'Jeskai Ascendancy'))) 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, 65.3, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (61.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Experimental Overload', 'Glimmer Bairn', 'Quicken', 'Hunted Nightmare', 'Memorial to War', 'Captivating Vampire', 'Inscription of Ruin', 'Squadron Hawk', 'Muddle the Mixture', 'Goldmire Bridge', 'Mistvein Borderpost', 'Doom Foretold', 'Izzet Signet', 'Power Depot', 'Intangible Virtue', 'Vision Skeins', 'Archfiend''s Vessel', 'Wirewood Herald', 'Salvage Titan', 'Gaea''s Revenge', 'Wildfield Borderpost', 'Kolaghan, the Storm''s Fury', 'Spear of Heliod', 'Fertile Ground', 'Trace of Abundance', 'Ondu Inversion', 'Sram''s Expertise', 'Elves of Deep Shadow', 'Delver of Secrets', 'Bile Blight', 'Thousand-Faced Shadow', 'Woodland Champion', 'Fatal Grudge', 'Sejiri Shelter', 'Temple of Silence', 'Swans of Bryn Argoll', 'Conflagrate', 'Lavaclaw Reaches', 'Dread Fugue', 'Seething Song', 'Thraben Inspector', 'Restoration Angel', 'Flame Slash', 'Mentor of the Meek', 'Mistcutter Hydra', 'Animate Dead', 'Savra, Queen of the Golgari', 'Persistent Specimen', 'Myth Realized', 'Memory Lapse', 'Castigate', 'Brushfire Elemental', 'Champion of Wits', 'Cruel Reality', 'Morselhoarder', 'Izoni, Thousand-Eyed', 'Gitaxian Probe', 'Ravenous Squirrel', 'Eternal Scourge', 'Prognostic Sphinx', 'Talara''s Battalion', 'Grim Lavamancer', 'Proclamation of Rebirth', 'Alchemist''s Vial', 'Obscura Storefront', 'Sylvan Messenger', 'Solfatara', 'Raging Ravine', 'Drift of Phantasms', 'Wingcrafter', 'Faerie Vandal', 'Curse of Thirst', 'Kessig Wolf Run', 'Cathartic Pyre', 'Pyroclasm', 'Graveyard Marshal', 'Memory''s Journey', 'Kuldotha Forgemaster', 'Reassembling Skeleton', 'Lantern of the Lost', 'Sanguine Statuette', 'Yosei, the Morning Star', 'Wooded Bastion', 'Lava Dart', 'Boros Signet', 'Falkenrath Gorger', 'Mire Triton', 'Timely Reinforcements', 'Dripping-Tongue Zubera', 'Temple of Enlightenment', 'Tendrils of Agony', 'Lose Focus', 'Galvanic Relay', 'Elvish Visionary', 'Calciform Pools', 'Security Bypass', 'Nature''s Lore', 'Timeless Witness', 'Exhaustion', 'Vault of the Archangel', 'Artful Dodge', 'Smallpox', 'Living Lore', 'Rabbit Battery', 'Blossoming Calm', 'Slip Out the Back', 'Crumbling Necropolis', 'Day of Judgment', 'Llanowar Wastes', 'Prophetic Prism', 'Double Vision', 'Oracle of Mul Daya', 'Woodfall Primus', 'Viscera Seer', 'Burst Lightning', 'Glen Elendra Archmage', 'Slagwoods Bridge', 'Possibility Storm', 'Forbid', 'Angel of Despair', 'Flourishing Fox', 'Orim''s Chant', 'Dwynen, Gilt-Leaf Daen', 'Chromatic Lantern', 'Ground Rift', 'Flame Rift', 'Exclude', 'Ignite Memories', 'Steel Sabotage', 'Firespout', 'Shivan Dragon', 'Altered Ego', 'Overwhelming Denial', 'Ancestral Anger', 'Karn''s Temporal Sundering', 'The Birth of Meletis', 'Necrotic Ooze', 'Omen of the Sun', 'Skymarcher Aspirant', 'Wild Pair', 'Flame-Kin Zealot', 'Of One Mind', 'Desecration Demon', 'Dreadhorde Invasion', 'Dead Weight', 'Erebos''s Intervention', 'Eldrazi Mimic', 'Sire of Insanity', 'Revitalize', 'Secluded Steppe', 'Holy Day', 'Bedevil', 'Spark Spray', 'Brokers Hideout', 'Beast Whisperer', 'Lonis, Cryptozoologist', 'Moonhold', 'Vampire''s Kiss', 'Pillage', 'Vivid Marsh', 'Incinerate', 'Mana Flare', 'Woodland Cemetery', 'Join the Dance', 'Lay of the Land', 'Goblin Bombardment', 'Gaea''s Will', 'Stony Strength', 'Approach of the Second Sun', 'Insolent Neonate', 'Needle Spires', 'Smokestack', 'Snow-Covered Mountain', 'Skeletal Swarming', 'Thunderbreak Regent', 'Asmodeus the Archfiend', 'Vampiric Fury', 'Bogardan Hellkite', 'Tempest Djinn', 'Elderfang Ritualist', 'Tangled Florahedron', 'Nomad Outpost', 'Oran-Rief, the Vastwood', 'Malakir Rebirth', 'Fyndhorn Elves', 'Curse of Death''s Hold', 'Stromkirk Noble', 'Keruga, the Macrosage', 'Din of the Fireherd', 'Mire''s Grasp', 'Wilt-Leaf Liege', 'Lead the Stampede', 'Gigadrowse', 'Blazing Rootwalla', 'Curse of Exhaustion', 'Arbor Elf', 'Earthshaker Khenra', 'Lord of the Undead', 'Magister Sphinx', 'General Ferrous Rokiric', 'Radiant Flames', 'Primal Amulet', 'Edric, Spymaster of Trest', 'Nivmagus Elemental', 'Arch of Orazca', 'Raze the Effigy', 'Mirrorshell Crab', 'Vivid Creek', 'Sacred Fire', 'Sejiri Refuge', 'Blood Fountain', 'Knight of the White Orchid', 'Sylvan Library', 'Coralhelm Commander', 'Saw It Coming', 'Villainous Wealth', 'Sunscorched Desert', 'Invoke Calamity', 'Wavesifter', 'Tolsimir Wolfblood', 'Changeling Outcast', 'Mizzium Mortars', 'Fblthp, the Lost', 'Dire-Strain Rampage', 'Urza''s Factory', 'Desolate Lighthouse', 'Chandra, Fire Artisan', 'Experimental Frenzy', 'Voltage Surge', 'Permeating Mass', 'Skirge Familiar', 'Hero of Precinct One', 'Tanglepool Bridge', 'Crystal Shard', 'Fire-Lit Thicket', 'Curse of Misfortunes', 'Reckoner''s Bargain', 'Rebuild', 'Dread Return', 'Warstorm Surge', 'Diregraf Colossus', 'Myojin of Life''s Web', 'Mogg Fanatic', 'Battlefield Forge', 'Treacherous Blessing', 'Rift Sower', 'Satoru Umezawa', 'Wrench Mind', 'Filigree Angel', 'Rootbound Crag', 'Wall of Omens', 'Resurgent Belief', 'Disenchant', 'Temple of Malice', 'That Which Was Taken', 'Unified Will', 'Mistblade Shinobi', 'Cloudfin Raptor', 'Fireblade Charger', 'Tarfire', 'Fire Covenant', 'Clifftop Retreat', 'Elvish Piper', 'Hanweir Garrison', 'Gruul Signet', 'Ivy Lane Denizen', 'Solitary Confinement', 'Brain Freeze', 'Ash Zealot', 'Duress', 'Angelic Purge', 'Sylvan Primordial', 'Worst Fears', 'Saproling Migration', 'Force of Rage', 'Spell Pierce', 'Night of Souls'' Betrayal', 'Iname, Death Aspect', 'Ghitu Lavarunner', 'Etherium Sculptor', 'Shard Volley', 'Prismatic Lens', 'Azor''s Gateway', 'Ram Through', 'Cruel Ultimatum', 'Drowned Catacomb', 'Esper Charm', 'Pack Rat', 'Future Sight', 'Jhoira''s Familiar', 'Primal Command', 'Kira, Great Glass-Spinner', 'Nested Shambler', 'Spellweaver Helix', 'Lifespinner', 'Silumgar, the Drifting Death', 'Gatekeeper of Malakir', 'Oust', 'Retraction Helix', 'Safewright Quest', 'Jokulhaups', 'Semblance Anvil', 'Dark Salvation', 'Negate', 'Zetalpa, Primal Dawn', 'Lightning Strike', 'Dramatic Finale', 'Sidisi''s Faithful', 'Swiftwater Cliffs', 'Arc-Slogger', 'Ghost Quarter', 'Demon Bolt', 'Blightning', 'Wrath of God', 'Oblivion Ring', 'Stone Rain', 'Into the Story', 'Elvish Archdruid', 'Demonic Embrace', 'Field of Ruin', 'Thawing Glaciers', 'Liege of the Tangle', 'Ulvenwald Mysteries', 'Hurricane', 'Gonti, Lord of Luxury', 'Lonely Sandbar', 'Big Score', 'Ilysian Caryatid', 'Cosima, God of the Voyage', 'Call of the Death-Dweller', 'Cursed Totem', 'Hypergenesis', 'Regal Force', 'Irencrag Feat', 'Hateful Eidolon', 'Forgotten Cave', 'Tocatli Honor Guard', 'Veinfire Borderpost', 'Mwonvuli Acid-Moss', 'Asylum Visitor', 'Disciple of the Vault', 'Sorin Markov', 'Engulf the Shore', 'Firewild Borderpost', 'Frontier Bivouac', 'Watcher for Tomorrow', 'Kami of False Hope', 'Concerted Defense', 'Silvergill Adept', 'Dread', 'Bygone Bishop', 'Touch the Spirit Realm', 'Wandering Mind', 'Hinterland Harbor', 'Hagra Mauling', 'Hissing Quagmire', 'Scrapheap Scrounger', 'Teferi, Mage of Zhalfir', 'Flood Plain', 'Thryx, the Sudden Storm', 'Ponder', 'Dawn Charm', 'Counterflux', 'Suture Priest', 'Soulflayer', 'Blade Splicer', 'Bloodchief''s Thirst', 'Temple of Abandon', 'Faerie Miscreant', 'Stormchaser Drake', 'Salt Flats', 'Inevitable Betrayal', 'Dual Strike', 'Deliberate', 'Howling Mine', 'Behold the Multiverse', 'Sanguine Sacrament', 'Mystic Monastery', 'Incandescent Aria', 'Thundering Raiju', 'Ghirapur Aether Grid', 'Frantic Search', 'Nyxathid', 'Dictate of Kruphix', 'Llanowar Elves', 'Coiling Oracle', 'Vapor Snag', 'Axgard Armory', 'Battle of Wits', 'Scab-Clan Berserker', 'Gather the Townsfolk', 'Dawn of Hope', 'Foreboding Ruins', 'Gloomshrieker', 'Jack-o''-Lantern', 'Disciple of Bolas', 'Phyrexian Dreadnought', 'Luminarch Ascension', 'Elvish Mystic', 'Arrogant Bloodlord', 'Detention Sphere', 'Oversoul of Dusk', 'Gavony Township', 'Ethersworn Canonist', 'Diregraf Ghoul', 'Cartel Aristocrat', 'Force of Nature', 'Fists of Ironwood', 'Mobilized District', 'Birds of Paradise', 'Sylvan Advocate', 'Shredded Sails', 'Phantasmal Bear', 'Hymn to Tourach', 'Commune with the Gods', 'Soulherder', 'Archway Commons', 'Izzet Boilerworks', 'The Raven''s Warning', 'Sokenzan Smelter', 'Drossforge Bridge', 'Fatestitcher', 'Torment of Scarabs', 'Gideon Jura', 'Momentary Blink', 'Revoke Existence', 'Beastcaller Savant', 'Zenith Flare', 'Llanowar Tribe', 'Grumgully, the Generous', 'Crackling Drake', 'Diabolic Edict', 'Carnophage', 'Go for Blood', 'Falkenrath Pit Fighter', 'Snowfield Sinkhole', 'Fauna Shaman', 'Dragonsguard Elite', 'Radha, Heart of Keld', 'Gossamer Chains', 'Dakmor Salvage', 'Chandra, Pyromaster', 'Expansion // Explosion', 'Jungle Shrine', 'Moorland Haunt', 'Bloodbraid Elf', 'Silundi Vision', 'Tolsimir, Friend to Wolves', 'Kabira Takedown', 'Mist-Syndicate Naga', 'Regrowth', 'Powerstone Shard', 'Temple of Triumph', 'Thaumatic Compass', 'Goblin Ringleader', 'Undead Butler', 'Ethersworn Sphinx', 'Kazandu Mammoth', 'Rule of Law', 'Dragonstorm', 'Figure of Destiny', 'Vindicate', 'Kjeldoran Outpost', 'Coastal Tower', 'Riftwing Cloudskate', 'Stirring Wildwood', 'Runed Halo', 'Harbinger of the Tides', 'Arcane Sanctum', 'Sigil Blessing', 'Costly Plunder', 'Jace Beleren', 'Midnight Clock', 'Prey''s Vengeance', 'Chasm Skulker', 'Repeal', 'Skyclave Cleric', 'Pelakka Predation', 'Teachings of the Kirin', 'Mind''s Desire', 'Acolyte of Affliction', 'Rend Flesh', 'Yarok''s Fenlurker', 'Jace, Memory Adept', 'Magister of Worth', 'Skybridge Towers', 'Temple of Epiphany', 'Mystic Snake', 'Ravenous Chupacabra', 'Silumgar''s Scorn', 'Abundant Harvest', 'He Who Hungers', 'Boomerang', 'Hellspark Elemental', 'Imperious Perfect', 'Molten Slagheap', 'Tymaret, Chosen from Death', 'Warleader''s Helix', 'Trostani''s Summoner', 'Ingenious Infiltrator', 'Sphinx''s Tutelage', 'Demonic Dread', 'Pyretic Ritual', 'Experimental Synthesizer', 'Izzet Charm', 'Abrade', 'Boros Reckoner', 'Invisible Stalker', 'Barrin, Tolarian Archmage', 'Dire Tactics', 'Ranger of Eos', 'Nullpriest of Oblivion', 'Indulgent Aristocrat', 'Skylasher', 'Blue Sun''s Zenith', 'Metalwork Colossus', 'Desperate Ritual', 'Tyrant''s Scorn', 'Rune-Scarred Demon', 'Cursecatcher', 'Ornithopter of Paradise', 'Feed the Swarm', 'Failure // Comply', 'Beacon of Tomorrows', 'Grapeshot', 'Rishkar, Peema Renegade', 'Vryn Wingmare', 'Shriekmaw', 'Raven''s Crime', 'Whip of Erebos', 'Irencrag Pyromancer', 'Falkenrath Forebear', 'Vampire Opportunist', 'Gigantomancer', 'Gateway Plaza', 'Barbed Sextant', 'Prophetic Bolt', 'Blazing Specter', 'Palace Siege', 'Lost Legacy', 'Lich''s Mastery', 'Glacial Fortress', 'Cathar Commando', 'Shardless Agent', 'Fact or Fiction', 'Forsake the Worldly', 'Vedalken Shackles', 'Howltooth Hollow', 'Thought Scour', 'Tide Shaper', 'Orgg', 'Bad River', 'Prahv, Spires of Order', 'Sarcomancy', 'Tidehollow Strix', 'Satyr Hoplite', 'Odds // Ends', 'Chain Lightning', 'Balustrade Spy', 'Abiding Grace', 'Vivid Crag', 'Trespasser''s Curse', 'Cultivate', 'Temple Bell', 'Discovery // Dispersal', 'Breya''s Apprentice', 'Pyromancer''s Swath', 'Fling', 'Goblin Dark-Dwellers', 'Hypnotic Sprite', 'Tectonic Reformation', 'Porphyry Nodes', 'Colossal Skyturtle', 'Barren Moor', 'Lochmere Serpent', 'Strike It Rich', 'Kaya, Ghost Assassin', 'Thirst for Discovery', 'Hornet Queen', 'Terminus', 'Genesis', 'Spark Elemental', 'Restore Balance', 'Call of the Herd', 'Satyr Wayfinder', 'Wren''s Run Vanquisher', 'Frost Walker', 'Tomb of Urami', 'Dispel', 'Master of Death', 'Temple of Deceit', 'Rite of Oblivion', 'Heartless Act', 'Briarbridge Patrol', 'Phantasmagorian', 'Murderous Redcap', 'Acidic Slime', 'Maelstrom Nexus', 'Blacklance Paragon', 'Riveteers Charm', 'Hushwing Gryff', 'Blackbloom Rogue', 'Kin-Tree Invocation', 'Asceticism', 'Pirate''s Pillage', 'Skyclave Shade', 'Maestros Charm', 'Skirk Prospector', 'Infinite Obliteration', 'Dragonskull Summit', 'Midnight Reaper', 'Mogg War Marshal', 'Angel of Glory''s Rise', 'Canyon Slough', 'Verdant Command', 'Ritual of Soot', 'Storm Herald', 'Loxodon Smiter', 'Dovin Baan', 'Deprive', 'Unsubstantiate', 'Furyblade Vampire', 'Vampire Lacerator', 'Warkite Marauder', 'Silver-Fur Master', 'Lashwrithe', 'Drannith Healer', 'Lathliss, Dragon Queen', 'Erdwal Illuminator', 'Colossification', 'Glorybringer', 'Goblin Chieftain', 'Vampire of the Dire Moon', 'Think Twice', 'Zealous Persecution', 'Infernal Grasp', 'Spikefield Hazard', 'Vampire Nighthawk', 'Fieldmist Borderpost', 'Drannith Stinger', 'Augur of Bolas', 'Judith, the Scourge Diva', 'Stubborn Denial', 'Epochrasite', 'Seal of Removal', 'Foundry Street Denizen', 'Secluded Courtyard', 'Arcbound Ravager', 'Evangel of Heliod', 'Bloodline Keeper', 'Evolving Wilds', 'Flame-Blessed Bolt', 'Searing Spear', 'Devious Cover-Up', 'Goblin Instigator', 'Fallen Shinobi', 'Mizzium Skin', 'Cabal Therapist', 'Sigil of the Empty Throne', 'Aphemia, the Cacophony', 'Elvish Clancaller', 'Dragon Mantle', 'Eiganjo Uprising', 'Desperate Ravings', 'Tamiyo''s Safekeeping', 'Judge''s Familiar', 'Nissa, Worldwaker', 'Fireball', 'Elemental Bond', 'Egon, God of Death', 'Azorius Charm', 'Kumano Faces Kakkazan', 'Piranha Marsh', 'Nevermaker', 'Search for Tomorrow', 'Fiery Temper', 'Murmuring Mystic', 'Queza, Augur of Agonies', 'Angelsong', 'Bone Shards', 'Cordial Vampire', 'Worldgorger Dragon', 'Vivid Meadow', 'Treasure Cruise', 'Wight', 'Death Baron', 'Moss-Pit Skeleton', 'Laboratory Maniac', 'Throes of Chaos', 'Sterling Grove', 'Jeskai Ascendancy', 'Geomancer''s Gambit', 'Prophet of Kruphix', 'Draconic Roar', 'Jwari Disruption', 'Okina, Temple to the Grandfathers', 'Overwhelming Splendor', 'Season of Growth', 'Cloudblazer', 'Putrid Goblin', 'Angel''s Grace', 'Incubation Druid', 'Mesmeric Fiend', 'Moment of Craving', 'Improbable Alliance', 'Voldaren Epicure', 'Terramorphic Expanse', 'Opt', 'Jace, the Living Guildpact', 'Martyr of Sands', 'Abandon Hope', 'Sorcerer Class', 'Lightning Rift', 'Goblin Bushwhacker', 'Shaman of the Pack', 'Viashino Pyromancer', 'Gnarlroot Trapper', 'Darksteel Colossus', 'Buried Alive', 'Fabricate', 'Oni-Cult Anvil', 'Earthquake', 'Akroma, Angel of Fury', 'Patchwork Automaton', 'Merrow Reejerey', 'Quicksilver Gargantuan', 'Stasis Snare', 'Guild Globe', 'Hypnotic Specter', 'Darkmoss Bridge', 'See the Truth', 'Quest for Pure Flame', 'Sky Hussar', 'Tranquil Cove', 'Circle of Confinement', 'Mirrodin''s Core', 'Champion of Dusk', 'Blasphemous Act', 'Benevolent Bodyguard', 'Mouth // Feed', 'Dusk Legion Zealot', 'Falkenrath Aristocrat', 'Overgrowth', 'Dream Trawler', 'Assault Strobe', 'Chain of Plasma', 'Cleansing Wildfire', 'Tormenting Voice', 'Master of the Pearl Trident', 'Expedite', 'Mikokoro, Center of the Sea', 'Mirage Mirror', 'Valiant Rescuer', 'Outland Liberator', 'Tombstalker', 'Specter''s Shroud', 'Generous Visitor', 'Walk the Aeons', 'Spirited Companion', 'Shrine of Burning Rage', 'Decree of Justice', 'Braids, Cabal Minion', 'Horde of Notions', 'Burning of Xinye', 'Slumbering Tora', 'Liliana Vess', 'Dwynen''s Elite', 'Electrolyze', 'White Sun''s Zenith', 'Clattering Augur', 'Fiend Hunter', 'Glass Casket', 'Jhoira, Weatherlight Captain', 'Moon-Circuit Hacker', 'Reinforced Ronin', 'Grimdancer', 'Lumbering Falls', 'Mishra''s Factory', 'Sign in Blood', 'Garruk Wildspeaker', 'Cleansing Nova', 'Grisly Salvage', 'Obstinate Baloth', 'Raise the Alarm', 'Slagstorm', 'Joraga Warcaller', 'Graf Mole', 'Spinerock Knoll', 'Kami''s Flare', 'Prowling Serpopard', 'Unburial Rites', 'Herbal Poultice', 'Hunted Horror', 'Consuming Vapors', 'Barrenton Medic', 'Glimpse of Tomorrow', 'Nine Lives', 'Ral Zarek', 'Myojin of Infinite Rage', 'Warriors'' Lesson', 'Ezuri, Renegade Leader', 'Barbarian Ring', 'Mission Briefing', 'Azami, Lady of Scrolls', 'Folio of Fancies', 'The Underworld Cookbook', 'Snow-Covered Forest', 'Condemn', 'Rustvale Bridge', 'Dryad Militant', 'Sylvan Anthem', 'Ral, Storm Conduit', 'Temple of Malady', 'High-Speed Hoverbike', 'Biting-Palm Ninja', 'Kaleidoscorch', 'Debtors'' Knell', 'Weaver of Harmony', 'Blackmail', 'Massacre Girl', 'Mind Rake', 'Mana Leak', 'Illuminator Virtuoso', 'Vigor', 'Mistvault Bridge', 'Embodiment of Fury', 'Oyobi, Who Split the Heavens', 'Reality Ripple', 'Goblin Electromancer', 'Seaside Citadel', 'Terrarion', 'Sleight of Hand', 'Temple of Mystery', 'Razortide Bridge', 'Caves of Koilos', 'Ghitu Encampment', 'Silverbluff Bridge', 'Unholy Heat', 'Lys Alana Huntmaster', 'Sprite Dragon', 'Truth or Tale', 'Demigod of Revenge', 'Dryad''s Revival', 'Jolrael, Mwonvuli Recluse', 'Sandsteppe Citadel', 'Maestros Theater', 'Sylvan Awakening', 'Elvish Champion', 'Game Trail', 'Bala Ged Recovery', 'Scurry Oak', 'Staggering Insight', 'Eye of Nowhere', 'Altar''s Reap', 'Reverent Hoplite', 'Greater Gargadon', 'Undercity Informer', 'Shrapnel Blast', 'Thirst for Meaning', 'Caravan Vigil', 'Dead // Gone', 'Dragonspark Reactor', 'Altar of the Brood', 'Iname, Life Aspect', 'Fusion Elemental', 'Liliana''s Specter', 'Dimir Signet', 'Golgari Rot Farm', 'Dark Ritual', 'Ranger''s Guile', 'Rishadan Dockhand'))) 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, 61.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (77.4 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Colossification', 'Warriors'' Lesson', 'Barbarian Ring', 'Lose Focus', 'Skylasher', 'Silumgar''s Scorn', 'Overwhelming Splendor', 'Birds of Paradise', 'Abiding Grace', 'Into the Story', 'Burst Lightning', 'Sky Hussar', 'Gossamer Chains', 'Maelstrom Nexus', 'Double Vision', 'Moss-Pit Skeleton', 'Viashino Pyromancer', 'Angel of Despair', 'Blazing Specter', 'Mire Triton', 'Rune-Scarred Demon', 'Prowling Serpopard', 'Dragonstorm', 'Hushwing Gryff', 'Bad River', 'Riftwing Cloudskate', 'Vigor', 'Hunted Horror', 'Slip Out the Back', 'Dire-Strain Rampage', 'Tolsimir, Friend to Wolves', 'Dread Return', 'Skyclave Cleric', 'Hunted Nightmare', 'Warstorm Surge', 'Regal Force', 'Cathar Commando', 'Oran-Rief, the Vastwood', 'The Birth of Meletis', 'Bala Ged Recovery', 'Semblance Anvil', 'Gloomshrieker', 'Angelsong', 'Mire''s Grasp', 'Falkenrath Aristocrat', 'Incubation Druid', 'Swans of Bryn Argoll', 'Crumbling Necropolis', 'Diabolic Edict', 'Myojin of Life''s Web', 'Phyrexian Dreadnought', 'Cruel Reality', 'Mouth // Feed', 'Dragonskull Summit', 'Watcher for Tomorrow', 'Reinforced Ronin', 'Asylum Visitor', 'Gaea''s Will', 'Izzet Charm', 'Torment of Scarabs', 'Rule of Law', 'Morselhoarder', 'Rite of Oblivion', 'Dead // Gone', 'Nomad Outpost', 'Sphinx''s Tutelage', 'Garruk Wildspeaker', 'Blade Splicer', 'Sprite Dragon', 'Martyr of Sands', 'He Who Hungers', 'Dragonspark Reactor', 'Quicksilver Gargantuan', 'Demigod of Revenge', 'Tide Shaper', 'Hurricane', 'Throes of Chaos', 'Woodland Champion', 'Odds // Ends', 'Spear of Heliod', 'Inevitable Betrayal', 'Treasure Cruise', 'Folio of Fancies', 'Salt Flats', 'Sanguine Statuette', 'Eternal Scourge', 'Lich''s Mastery', 'Radiant Flames', 'Beastcaller Savant', 'Cathartic Pyre', 'Patchwork Automaton', 'Wrath of God', 'Goblin Dark-Dwellers', 'Sylvan Awakening', 'Mirage Mirror', 'Expansion // Explosion', 'Kaleidoscorch', 'Vampire of the Dire Moon', 'Chasm Skulker', 'Demonic Dread', 'Yosei, the Morning Star', 'Seal of Removal', 'Lumbering Falls', 'Bedevil', 'Squadron Hawk', 'Proclamation of Rebirth', 'Temple of Epiphany', 'Alchemist''s Vial', 'Falkenrath Forebear', 'Dream Trawler', 'Sylvan Library', 'Dusk Legion Zealot', 'Axgard Armory', 'Goblin Bombardment', 'Soulflayer', 'Oust', 'Heartless Act', 'Coiling Oracle', 'Safewright Quest', 'Vryn Wingmare', 'Disenchant', 'Figure of Destiny', 'Ponder', 'Lathliss, Dragon Queen', 'Trespasser''s Curse', 'Spark Spray', 'Generous Visitor', 'Thraben Inspector', 'Kaya, Ghost Assassin', 'Curse of Exhaustion', 'Silundi Vision', 'Bloodbraid Elf', 'Memorial to War', 'Grisly Salvage', 'Solfatara', 'Thousand-Faced Shadow', 'Imperious Perfect', 'Okina, Temple to the Grandfathers', 'Battlefield Forge', 'Frontier Bivouac', 'Treacherous Blessing', 'Earthshaker Khenra', 'Seaside Citadel', 'Runed Halo', 'Battle of Wits', 'Rishadan Dockhand', 'Mishra''s Factory', 'Lead the Stampede', 'Temple of Silence', 'Tectonic Reformation', 'Mobilized District', 'Detention Sphere', 'Gateway Plaza', 'Tomb of Urami', 'Omen of the Sun', 'Vampire''s Kiss', 'Rootbound Crag', 'Elderfang Ritualist', 'Slagstorm', 'Thunderblust', 'Nevermaker', 'Powerstone Shard', 'Balustrade Spy', 'Arcane Sanctum', 'Flame Slash', 'Pelakka Predation', 'Stromkirk Noble', 'Massacre Girl', 'Specter''s Shroud', 'Foundry Street Denizen', 'Sram''s Expertise', 'Unsubstantiate', 'Fiery Temper', 'Devious Cover-Up', 'Power Depot', 'Disciple of the Vault', 'Kami of False Hope', 'Lay of the Land', 'Breya''s Apprentice', 'Champion of Wits', 'Valiant Rescuer', 'Gigantomancer', 'Jwari Disruption', 'Tangled Florahedron', 'Knight of the White Orchid', 'Electrolyze', 'Midnight Clock', 'Edric, Spymaster of Trest', 'Abrade', 'Glass Casket', 'Shaman of the Pack', 'Join the Dance', 'Genesis', 'Embodiment of Fury', 'Mizzium Mortars', 'Ground Rift', 'Altar''s Reap', 'Walk the Aeons', 'Moorland Haunt', 'Frost Walker', 'Terminus', 'Conflagrate', 'Discovery // Dispersal', 'Bone Shards', 'Jeskai Ascendancy', 'Ethersworn Canonist', 'Master of the Pearl Trident', 'Egon, God of Death', 'Kira, Great Glass-Spinner', 'Tocatli Honor Guard', 'Warleader''s Helix', 'White Sun''s Zenith', 'Skyclave Shade', 'Satoru Umezawa', 'Izzet Boilerworks', 'Irencrag Feat', 'Kumano Faces Kakkazan', 'Dramatic Finale', 'Deliberate', 'Swiftwater Cliffs', 'Glimmer Bairn', 'Gather the Townsfolk', 'Phylath, World Sculptor', 'Sterling Grove', 'Fyndhorn Elves', 'Faerie Vandal', 'Fire Covenant', 'Jhoira''s Familiar', 'Piranha Marsh', 'Slagwoods Bridge', 'Pirate''s Pillage', 'Hypnotic Sprite', 'Prophetic Prism', 'Blazing Rootwalla', 'Chandra, Fire Artisan', 'Mana Flare', 'Dripping-Tongue Zubera', 'Brushfire Elemental', 'Gavony Township', 'The Underworld Cookbook', 'Liliana''s Specter', 'Graf Mole', 'Restoration Angel', 'Dark Salvation', 'Silumgar, the Drifting Death', 'Incinerate', 'Muddle the Mixture', 'Prophetic Bolt', 'Bogardan Hellkite', 'Temple Bell', 'Wirewood Herald', 'Fatal Grudge', 'That Which Was Taken', 'Karn''s Temporal Sundering', 'Wren''s Run Vanquisher', 'Fallen Shinobi', 'Zealous Persecution', 'Raging Ravine', 'Galvanic Relay', 'Desperate Ritual', 'Stormchaser Drake', 'Nyxathid', 'Dread Fugue', 'Dire Tactics', 'Worldgorger Dragon', 'Trace of Abundance', 'Raven''s Crime', 'Experimental Frenzy', 'Vampire Opportunist', 'Tranquil Cove', 'Intangible Virtue', 'Mwonvuli Acid-Moss', 'Blood Fountain', 'Oversoul of Dusk', 'Goblin Ringleader', 'Angel of Glory''s Rise', 'Permeating Mass', 'Liege of the Tangle', 'Wildfield Borderpost', 'Rebuild', 'Tormenting Voice', 'Oyobi, Who Split the Heavens', 'Sidisi''s Faithful', 'Demonic Embrace', 'Arc-Slogger', 'Canyon Slough', 'Mikokoro, Center of the Sea', 'Teferi, Mage of Zhalfir', 'Sign in Blood', 'Ravenous Chupacabra', 'Shredded Sails', 'Reverent Hoplite', 'Commune with the Gods', 'Ingenious Infiltrator', 'Ash Zealot', 'Smokestack', 'Goldmire Bridge', 'Pyromancer''s Swath', 'Ravenous Squirrel', 'Quicken', 'Elvish Clancaller', 'Memory''s Journey', 'Circle of Confinement', 'Consuming Vapors', 'Hellspark Elemental', 'Firespout', 'Suture Priest', 'Exclude', 'Tendrils of Agony', 'Engulf the Shore', 'Spirited Companion', 'Fading Hope', 'Satyr Hoplite', 'Reassembling Skeleton', 'Unburial Rites', 'Ranger''s Guile', 'Angel''s Grace', 'Graveyard Marshal', 'Liliana Vess', 'Memory Lapse', 'Lavaclaw Reaches', 'Altar of the Brood', 'Cleansing Wildfire', 'Lost Legacy', 'Necrotic Ooze', 'Queza, Augur of Agonies', 'Mistvault Bridge', 'Doom Foretold', 'Ral Zarek', 'Vault of the Archangel', 'Vedalken Shackles', 'Assault Strobe', 'Hagra Mauling', 'Fiend Hunter', 'Strike It Rich', 'Field of Ruin', 'Jolrael, Mwonvuli Recluse', 'See the Truth', 'Midnight Reaper', 'Skirge Familiar', 'Llanowar Tribe', 'Glacial Fortress', 'Costly Plunder', 'Darkmoss Bridge', 'Vapor Snag', 'Trostani''s Summoner', 'Fireball', 'Erebos''s Intervention', 'Snow-Covered Forest', 'Dryad''s Revival', 'Hornet Queen', 'Ral, Storm Conduit', 'Kami''s Flare', 'Indulgent Aristocrat', 'Mist-Syndicate Naga', 'Warkite Marauder', 'Drannith Healer', 'Myojin of Infinite Rage', 'Nissa, Worldwaker', 'Unified Will', 'Rustvale Bridge', 'Regrowth', 'Gatekeeper of Malakir', 'Possibility Storm', 'Riveteers Charm', 'Wandering Mind', 'Geomancer''s Gambit', 'Clifftop Retreat', 'Vivid Marsh', 'Whip of Erebos', 'Nivmagus Elemental', 'Night of Souls'' Betrayal', 'Prismatic Lens', 'Terrarion', 'Stony Strength', 'Firewild Borderpost', 'Crystal Shard', 'Eye of Nowhere', 'Arch of Orazca', 'Resurgent Belief', 'Timely Reinforcements', 'Judge''s Familiar', 'Woodfall Primus', 'Rishkar, Peema Renegade', 'Sylvan Anthem', 'Arcbound Ravager', 'Dakmor Salvage', 'Go for Blood', 'Mistcutter Hydra', 'Arrogant Bloodlord', 'Secluded Steppe', 'Curse of Death''s Hold', 'Azorius Charm', 'Erdwal Illuminator', 'Dragon Mantle', 'Filigree Angel', 'Hinterland Harbor', 'Dread', 'Fabricate', 'Calciform Pools', 'Saproling Migration', 'Fatestitcher', 'Sigil of the Empty Throne', 'Temple of Enlightenment', 'Kjeldoran Outpost', 'Elvish Mystic', 'Ritual of Soot', 'Sorin Markov', 'Sandsteppe Citadel', 'Steel Sabotage', 'Tymaret, Chosen from Death', 'Wavesifter', 'Palace Siege', 'Sejiri Shelter', 'Talara''s Battalion', 'Glorybringer', 'Cosima, God of the Voyage', 'Loxodon Smiter', 'Tarfire', 'Cabal Therapist', 'Elvish Piper', 'Archfiend''s Vessel', 'Mind Rake', 'Vendetta', 'Soulherder', 'Etherium Sculptor', 'Elvish Visionary', 'Goblin Bushwhacker', 'Ram Through', 'Eiganjo Uprising', 'Terramorphic Expanse', 'Ezuri, Renegade Leader', 'Temple of Malice', 'Failure // Comply', 'Needle Spires', 'Eldrazi Mimic', 'Dryad Militant', 'Cloudblazer', 'Lonely Sandbar', 'Fireblade Charger', 'Barrin, Tolarian Archmage', 'Momentary Blink', 'Phantasmagorian', 'Vivid Crag', 'Faerie Miscreant', 'Approach of the Second Sun', 'Vivid Meadow', 'Salvage Titan', 'Flourishing Fox', 'Stasis Snare', 'Primal Command', 'Staggering Insight', 'Scrapheap Scrounger', 'Moment of Craving', 'Sleight of Hand', 'Gnarlroot Trapper', 'Forsake the Worldly', 'Sylvan Messenger', 'Curse of Thirst', 'Kazandu Mammoth', 'Jokulhaups', 'Drift of Phantasms', 'Dark Ritual', 'Rabbit Battery', 'Villainous Wealth', 'Incandescent Aria', 'Verdant Command', 'Death Baron', 'Gigadrowse', 'Guild Globe', 'Boros Reckoner', 'Mistvein Borderpost', 'Improbable Alliance', 'Snow-Covered Mountain', 'Primal Beyond', 'Undercity Informer', 'Shrine of Burning Rage', 'Revitalize', 'Flood Plain', 'Iname, Life Aspect', 'Elvish Champion', 'Altered Ego', 'Metalwork Colossus', 'Glimpse of Tomorrow', 'Howltooth Hollow', 'Briarbridge Patrol', 'Obstinate Baloth', 'Chain of Plasma', 'Acidic Slime', 'Sejiri Refuge', 'Grapeshot', 'Dimir Signet', 'Mana Leak', 'Moon-Circuit Hacker', 'Flamekin Bladewhirl', 'Ghost Quarter', 'Grimdancer', 'Pyretic Ritual', 'Bloodline Keeper', 'Skymarcher Aspirant', 'Caravan Vigil', 'Llanowar Wastes', 'Vision Skeins', 'Lightning Strike', 'Temple of Mystery', 'Gonti, Lord of Luxury', 'Call of the Death-Dweller', 'Silvergill Adept', 'Wight', 'Skirk Prospector', 'Frantic Search', 'Mogg Fanatic', 'Laboratory Maniac', 'Azami, Lady of Scrolls', 'Smallpox', 'Blackmail', 'Luminarch Ascension', 'Beast Whisperer', 'Mizzium Skin', 'Silver-Fur Master', 'Barrenton Medic', 'Solitary Confinement', 'Drowned Catacomb', 'Vampire Nighthawk', 'Cartel Aristocrat', 'Buried Alive', 'Fblthp, the Lost', 'Vivid Creek', 'Razortide Bridge', 'Savra, Queen of the Golgari', 'Primal Amulet', 'Dawn Charm', 'Malakir Rebirth', 'Sacred Fire', 'Vindicate', 'Izzet Signet', 'Lashwrithe', 'Pillage', 'Caves of Koilos', 'High-Speed Hoverbike', 'Epochrasite', 'Satyr Wayfinder', 'Orim''s Chant', 'Nested Shambler', 'Dual Strike', 'Living Lore', 'Oblivion Ring', 'Biting-Palm Ninja', 'Ornithopter of Paradise', 'Mystic Snake', 'Magister of Worth', 'Thaumatic Compass', 'Fling', 'Sigil Blessing', 'Debtors'' Knell', 'Arbor Elf', 'Secluded Courtyard', 'Grim Lavamancer', 'Augur of Bolas', 'Temple of Triumph', 'Sylvan Primordial', 'Stubborn Denial', 'Akroma, Angel of Fury', 'Dead Weight', 'Lochmere Serpent', 'Hymn to Tourach', 'Oracle of Mul Daya', 'Merrow Reejerey', 'Timeless Witness', 'Benevolent Bodyguard', 'Crackling Drake', 'Flame-Kin Zealot', 'Jhoira, Weatherlight Captain', 'Coralhelm Commander', 'Pyroclasm', 'Azor''s Gateway', 'Burning of Xinye', 'Greater Gargadon', 'Radha, Heart of Keld', 'Incandescent Soulstoke', 'Jungle Shrine', 'Dovin Baan', 'Tidehollow Strix', 'Skybridge Towers', 'Searing Spear', 'Shivan Dragon', 'Dwynen, Gilt-Leaf Daen', 'Tempest Djinn', 'Spikefield Hazard', 'Flame Rift', 'Weaver of Harmony', 'Fauna Shaman', 'Prophet of Kruphix', 'Dragonsguard Elite', 'Tyrant''s Scorn', 'Cultivate', 'Forbid', 'Ghitu Encampment', 'Wilt-Leaf Liege', 'Of One Mind', 'Rift Sower', 'Dreadhorde Invasion', 'Porphyry Nodes', 'Golgari Rot Farm', 'Beacon of Tomorrows', 'Wooded Bastion', 'Kabira Takedown', 'Dwynen''s Elite', 'Braids, Cabal Minion', 'Blossoming Calm', 'Spell Pierce', 'Underworld Rage-Hound', 'Delver of Secrets', 'Saw It Coming', 'Dawn of Hope', 'Mind''s Desire', 'Ondu Inversion', 'Desolate Lighthouse', 'Oni-Cult Anvil', 'Storm Herald', 'Worst Fears', 'Falkenrath Gorger', 'Gideon Jura', 'Chromatic Lantern', 'Gitaxian Probe', 'Temple of Deceit', 'Spellweaver Helix', 'Veinfire Borderpost', 'The Raven''s Warning', 'Dictate of Kruphix', 'Unholy Heat', 'Angelic Purge', 'Glen Elendra Archmage', 'Concerted Defense', 'Behold the Multiverse', 'Sanguine Sacrament', 'Future Sight', 'Ignite Memories', 'Urza''s Factory', 'Abandon Hope', 'Myth Realized', 'Stone Rain', 'Grumgully, the Generous', 'Scorch Spitter', 'Prey''s Vengeance', 'Bygone Bishop', 'Thirst for Meaning', 'Thawing Glaciers', 'Chandra, Pyromaster', 'Kessig Wolf Run', 'Mogg War Marshal', 'Thunderbreak Regent', 'Overgrowth', 'Hero of Precinct One', 'Horde of Notions', 'Smokebraider', 'Overwhelming Denial', 'Jace Beleren', 'Asmodeus the Archfiend', 'Reality Ripple', 'Ethersworn Sphinx', 'Infinite Obliteration', 'Scab-Clan Berserker', 'Creeping Trailblazer', 'Restore Balance', 'Raise the Alarm', 'Artful Dodge', 'Goblin Instigator', 'Decree of Justice', 'Cleansing Nova', 'Elvish Archdruid', 'Experimental Overload', 'Obscura Storefront', 'Force of Rage', 'Hissing Quagmire', 'Ghirapur Aether Grid', 'Zenith Flare', 'Vampire Lacerator', 'Gruul Signet', 'Sunscorched Desert', 'Abundant Harvest', 'Kin-Tree Invocation', 'Thirst for Discovery', 'Fusion Elemental', 'Hypergenesis', 'Maestros Theater', 'Elemental Bond', 'Ancestral Anger', 'Duress', 'Yarok''s Fenlurker', 'Sokenzan Smelter', 'Master of Death', 'Outland Liberator', 'Temple of Malady', 'Lightning Rift', 'Touch the Spirit Realm', 'Darksteel Colossus', 'Slumbering Tora', 'Thundering Raiju', 'Sarcomancy', 'Retraction Helix', 'Snowfield Sinkhole', 'Disciple of Bolas', 'Whisperwood Elemental', 'Ivy Lane Denizen', 'Expedite', 'Teachings of the Kirin', 'Invisible Stalker', 'Drossforge Bridge', 'Security Bypass', 'Chain Lightning', 'Lys Alana Huntmaster', 'Captivating Vampire', 'Insolent Neonate', 'Prahv, Spires of Order', 'Reckoner''s Bargain', 'Jace, Memory Adept', 'Murderous Redcap', 'Temple of Abandon', 'Goblin Chieftain', 'Mirrodin''s Core', 'Brokers Hideout', 'Aphemia, the Cacophony', 'Foreboding Ruins', 'Fieldmist Borderpost', 'Wrench Mind', 'Boomerang', 'Deprive', 'Fact or Fiction', 'Viscera Seer', 'Foundation Breaker', 'Raze the Effigy', 'Evangel of Heliod', 'Big Score', 'Cordial Vampire', 'Search for Tomorrow', 'Fire-Lit Thicket', 'Thryx, the Sudden Storm', 'Clattering Augur', 'Flame-Blessed Bolt', 'Mission Briefing', 'Experimental Synthesizer', 'Murmuring Mystic', 'Mystic Monastery', 'Tectonic Giant', 'Shard Volley', 'Tamiyo''s Safekeeping', 'Invoke Calamity', 'Boros Signet', 'Molten Slagheap', 'Voltage Surge', 'Demon Bolt', 'Quest for Pure Flame', 'Scurry Oak', 'Silverbluff Bridge', 'Din of the Fireherd', 'Mistblade Shinobi', 'Ilysian Caryatid', 'Spark Elemental', 'Earthquake', 'Prognostic Sphinx', 'Kuldotha Forgemaster', 'Mesmeric Fiend', 'Mirrorshell Crab', 'Iname, Death Aspect', 'Bloodchief''s Thirst', 'Maestros Charm', 'Mentor of the Meek', 'Thought Scour', 'Lord of the Undead', 'Nullpriest of Oblivion', 'Gaea''s Revenge', 'Tombstalker', 'Exhaustion', 'Asceticism', 'Cruel Ultimatum', 'Lifespinner', 'Drannith Stinger', 'Hateful Eidolon', 'Cursed Totem', 'Jace, the Living Guildpact', 'Lava Dart', 'Cloudfin Raptor', 'Esper Charm', 'Wingcrafter', 'Fists of Ironwood', 'Elves of Deep Shadow', 'Irencrag Pyromancer', 'Shriekmaw', 'Desperate Ravings', 'Sylvan Advocate', 'Blackbloom Rogue', 'Barbed Sextant', 'Champion of Dusk', 'Opt', 'Tolsimir Wolfblood', 'Zetalpa, Primal Dawn', 'Stirring Wildwood', 'Putrid Goblin', 'Desecration Demon', 'Wild Pair', 'Nine Lives', 'Acolyte of Affliction', 'Negate', 'Jack-o''-Lantern', 'Game Trail', 'Judith, the Scourge Diva', 'Persistent Specimen', 'Inscription of Ruin', 'Spinerock Knoll', 'Evolving Wilds', 'Diregraf Ghoul', 'Revoke Existence', 'Izoni, Thousand-Eyed', 'Skeletal Swarming', 'Ulvenwald Mysteries', 'Phantasmal Bear', 'Dispel', 'Sorcerer Class', 'Falkenrath Pit Fighter', 'Secluded Glen', 'Tanglepool Bridge', 'Infernal Grasp', 'Joraga Warcaller', 'Shrapnel Blast', 'Kolaghan, the Storm''s Fury', 'Coastal Tower', 'General Ferrous Rokiric', 'Voldaren Epicure', 'Moonhold', 'Shardless Agent', 'Seething Song', 'Brain Freeze', 'Blue Sun''s Zenith', 'Rend Flesh', 'Wall of Omens', 'Nature''s Lore', 'Orgg', 'Call of the Herd', 'Barren Moor', 'Herbal Poultice', 'Carnophage', 'Truth or Tale', 'Lantern of the Lost', 'Force of Nature', 'Blightning', 'Woodland Cemetery', 'Archway Commons', 'Hypnotic Specter', 'Colossal Skyturtle', 'Undead Butler', 'Changeling Outcast', 'Think Twice', 'Castigate', 'Goblin Electromancer', 'Harbinger of the Tides', 'Sire of Insanity', 'Hanweir Garrison', 'Curse of Misfortunes', 'Ghitu Lavarunner', 'Bile Blight', 'Fertile Ground', 'Holy Day', 'Llanowar Elves', 'Draconic Roar', 'Cursecatcher', 'Season of Growth', 'Condemn', 'Repeal', 'Forgotten Cave', 'Keruga, the Macrosage', 'Day of Judgment', 'Howling Mine', 'Lonis, Cryptozoologist', 'Counterflux', 'Illuminator Virtuoso', 'Vampiric Fury', 'Feed the Swarm', 'Blasphemous Act', 'Ranger of Eos', 'Furyblade Vampire', 'Magister Sphinx', 'Animate Dead', 'Diregraf Colossus', 'Blacklance Paragon', 'Pack Rat'))) 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, 77.4, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (60.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Day of Judgment', 'Howltooth Hollow', 'Acidic Slime', 'Moment of Craving', 'Llanowar Elves', 'Reinforced Ronin', 'Mistcutter Hydra', 'Flamekin Bladewhirl', 'Fauna Shaman', 'Odds // Ends', 'Mouth // Feed', 'Mogg War Marshal', 'Kumano Faces Kakkazan', 'Steel Hellkite', 'Secluded Steppe', 'Drossforge Bridge', 'Necrotic Ooze', 'Rebuild', 'Nivmagus Elemental', 'Keruga, the Macrosage', 'Ilysian Caryatid', 'Truth or Tale', 'Fatestitcher', 'Burst Lightning', 'Goblin Dark-Dwellers', 'Temple of Deceit', 'Thunderbreak Regent', 'High-Speed Hoverbike', 'Rite of Oblivion', 'Power Depot', 'Mentor of the Meek', 'Tamiyo''s Safekeeping', 'Stubborn Denial', 'Orgg', 'Chasm Skulker', 'Memory Lapse', 'Gateway Plaza', 'Fusion Elemental', 'Smallpox', 'Dakmor Salvage', 'Hellspark Elemental', 'Ranger of Eos', 'Crumbling Necropolis', 'Go for Blood', 'Captivating Vampire', 'Solitary Confinement', 'Expedite', 'Woodland Champion', 'Incubation Druid', 'Dragonskull Summit', 'Horde of Notions', 'Mizzium Mortars', 'Zealous Persecution', 'Furyblade Vampire', 'Izzet Charm', 'Sanguine Statuette', 'The Birth of Meletis', 'Goblin Instigator', 'Yosei, the Morning Star', 'Wandering Mind', 'Asylum Visitor', 'Revoke Existence', 'Stony Strength', 'Stone Rain', 'Falkenrath Aristocrat', 'Weaver of Harmony', 'Costly Plunder', 'Beastcaller Savant', 'Animate Dead', 'Bloodbraid Elf', 'Angel''s Grace', 'Terrarion', 'Oversoul of Dusk', 'Spellweaver Helix', 'Battlefield Forge', 'Hero of Precinct One', 'Jokulhaups', 'Myr Superion', 'Altar''s Reap', 'Disenchant', 'Mogg Fanatic', 'Queza, Augur of Agonies', 'Think Twice', 'Dispel', 'Vapor Snag', 'Epochrasite', 'Wooded Bastion', 'Improbable Alliance', 'Phantasmal Bear', 'Fertile Ground', 'Draconic Roar', 'Memory''s Journey', 'Saw It Coming', 'Expansion // Explosion', 'Momentary Blink', 'Treasure Cruise', 'Persistent Specimen', 'Snow-Covered Forest', 'Tangled Florahedron', 'Assault Strobe', 'Sokenzan Smelter', 'Scab-Clan Berserker', 'Sigil Blessing', 'Coiling Oracle', 'Oblivion Ring', 'Balustrade Spy', 'Kessig Wolf Run', 'Savra, Queen of the Golgari', 'Thirst for Meaning', 'Mana Flare', 'Blood Fountain', 'Chain Lightning', 'Imperious Perfect', 'Grimdancer', 'Fyndhorn Elves', 'Master of the Pearl Trident', 'Lord of the Undead', 'Stromkirk Noble', 'Debtors'' Knell', 'Hunted Horror', 'Dark Salvation', 'Lead the Stampede', 'Lys Alana Huntmaster', 'Overwhelming Denial', 'Unburial Rites', 'Kabira Takedown', 'Gruul Signet', 'Dusk Legion Zealot', 'Verdant Command', 'Angel of Despair', 'Rabbit Battery', 'Demigod of Revenge', 'Of One Mind', 'Permeating Mass', 'Omen of the Sun', 'Experimental Overload', 'Boros Reckoner', 'Exhaustion', 'Mana Leak', 'Cultivate', 'Cartel Aristocrat', 'Wavesifter', 'Thawing Glaciers', 'Ulvenwald Mysteries', 'Sram''s Expertise', 'Goblin Electromancer', 'Urza''s Factory', 'Salt Flats', 'Detention Sphere', 'Dread Return', 'Seal of Removal', 'Angelic Purge', 'Vision Skeins', 'Desolate Lighthouse', 'Silumgar''s Scorn', 'Hanweir Garrison', 'Graveyard Marshal', 'Primal Amulet', 'Mizzium Skin', 'Quicksilver Gargantuan', 'Talara''s Battalion', 'Spark Elemental', 'Tymaret, Chosen from Death', 'It That Betrays', 'Falkenrath Pit Fighter', 'Boros Signet', 'Lonely Sandbar', 'Memorial to War', 'Figure of Destiny', 'Obstinate Baloth', 'Graf Mole', 'Murmuring Mystic', 'Signal Pest', 'Ignite Memories', 'Searing Spear', 'Midnight Clock', 'Teachings of the Kirin', 'Reality Ripple', 'Desecration Demon', 'Prismatic Lens', 'Invade the City', 'Deprive', 'Failure // Comply', 'Palace Siege', 'Snow-Covered Mountain', 'Fiend Hunter', 'Raging Ravine', 'Luminarch Ascension', 'Bedevil', 'Commune with the Gods', 'Reckoner''s Bargain', 'Archway Commons', 'Dragonstorm', 'Incinerate', 'Ethersworn Canonist', 'Maestros Charm', 'Pyretic Ritual', 'Saproling Migration', 'Vampiric Fury', 'Deliberate', 'Magister of Worth', 'Thought Scour', 'Storm Herald', 'Tempest Djinn', 'Cruel Reality', 'Judge''s Familiar', 'Beast Whisperer', 'Myojin of Infinite Rage', 'Unholy Heat', 'Rishkar, Peema Renegade', 'Glimmer Bairn', 'Blazing Rootwalla', 'Overwhelming Splendor', 'Jhoira''s Familiar', 'Tormenting Voice', 'Flame Slash', 'Suture Priest', 'Crystal Shard', 'Ghirapur Aether Grid', 'Temple of Epiphany', 'Diregraf Colossus', 'Steel Sabotage', 'Warleader''s Helix', 'Gaea''s Will', 'Abrade', 'Bala Ged Recovery', 'Geomancer''s Gambit', 'Restore Balance', 'Brushfire Elemental', 'Mobilized District', 'Loxodon Smiter', 'Hunted Nightmare', 'Caravan Vigil', 'Asceticism', 'Wingcrafter', 'Throes of Chaos', 'Vivid Crag', 'Fatal Grudge', 'Vile Rebirth', 'Shardless Agent', 'Buried Alive', 'Desperate Ravings', 'Gloomshrieker', 'Tide Shaper', 'Battle of Wits', 'Whip of Erebos', 'Morselhoarder', 'Hissing Quagmire', 'Mist-Syndicate Naga', 'Chain of Plasma', 'Porphyry Nodes', 'Okina, Temple to the Grandfathers', 'The Raven''s Warning', 'Obscura Storefront', 'Primal Command', 'Cloudblazer', 'Frost Titan', 'Dual Strike', 'Prognostic Sphinx', 'Sylvan Primordial', 'Timeless Witness', 'Shard Volley', 'Gather the Townsfolk', 'Lightning Strike', 'Skymarcher Aspirant', 'Hypnotic Sprite', 'Shredded Sails', 'Llanowar Wastes', 'Condemn', 'Dread', 'Search for Tomorrow', 'Lantern of the Lost', 'Vivid Marsh', 'Temple of Abandon', 'Chandra, Pyromaster', 'Arcane Sanctum', 'Viscera Seer', 'Artful Dodge', 'Irencrag Pyromancer', 'Prophetic Bolt', 'Crackling Drake', 'Dread Fugue', 'Gonti, Lord of Luxury', 'Sylvan Advocate', 'Rustvale Bridge', 'Phyrexian Dreadnought', 'Touch the Spirit Realm', 'Forbid', 'Flame-Blessed Bolt', 'Fieldmist Borderpost', 'Watcher for Tomorrow', 'Runed Halo', 'Dryad Militant', 'Unsubstantiate', 'Erebos''s Intervention', 'Changeling Outcast', 'Blade Splicer', 'Coralhelm Commander', 'Jack-o''-Lantern', 'Tarfire', 'Barrin, Tolarian Archmage', 'Blossoming Calm', 'Oni-Cult Anvil', 'Collected Conjuring', 'Revitalize', 'Fblthp, the Lost', 'Dripping-Tongue Zubera', 'Duress', 'Possibility Storm', 'Tectonic Giant', 'Liliana''s Specter', 'Sire of Insanity', 'Dawn Charm', 'Into the Story', 'Skirk Prospector', 'Skybridge Towers', 'Oust', 'Fiery Temper', 'Sorcerer Class', 'Kuldotha Forgemaster', 'Firewild Borderpost', 'Lost Legacy', 'Kami of False Hope', 'Slagstorm', 'Engulf the Shore', 'Jolrael, Mwonvuli Recluse', 'Mire''s Grasp', 'Woodland Cemetery', 'Mind Rake', 'Resurgent Belief', 'Midnight Reaper', 'Rune-Scarred Demon', 'Eiganjo Uprising', 'Dragon Mantle', 'Glass Casket', 'Brain Freeze', 'Arrogant Bloodlord', 'Semblance Anvil', 'Lava Dart', 'Nature''s Lore', 'Irencrag Feat', 'Cordial Vampire', 'Retraction Helix', 'Ground Rift', 'Sterling Grove', 'Hurricane', 'Opt', 'Dream Trawler', 'Elvish Piper', 'Augur of Bolas', 'Holy Day', 'Desperate Ritual', 'Murderous Redcap', 'Valiant Rescuer', 'Diregraf Ghoul', 'Eternal Scourge', 'Herbal Poultice', 'Demonic Embrace', 'Biting-Palm Ninja', 'Trace of Abundance', 'Phylath, World Sculptor', 'Oyobi, Who Split the Heavens', 'Barbarian Ring', 'Sarcomancy', 'Eldrazi Mimic', 'Fireblade Charger', 'Vampire Opportunist', 'Grisly Salvage', 'Moss-Pit Skeleton', 'Vryn Wingmare', 'Proteus Staff', 'Gitaxian Probe', 'Spinerock Knoll', 'Satyr Wayfinder', 'Generous Visitor', 'Rend Flesh', 'Regrowth', 'Angel of Glory''s Rise', 'Spikefield Hazard', 'Exclude', 'Vindicate', 'Sign in Blood', 'Quicken', 'Slagwoods Bridge', 'Falkenrath Forebear', 'Maelstrom Nexus', 'Night of Souls'' Betrayal', 'Lochmere Serpent', 'Pack Rat', 'Wirewood Herald', 'Vault of the Archangel', 'Ghost Quarter', 'Nyxathid', 'Sylvan Anthem', 'Benevolent Bodyguard', 'Vedalken Shackles', 'Folio of Fancies', 'Din of the Fireherd', 'Thunderblust', 'Cloudfin Raptor', 'That Which Was Taken', 'Pillage', 'Concerted Defense', 'Grumgully, the Generous', 'Massacre Girl', 'Skyclave Shade', 'Tendrils of Agony', 'Overgrowth', 'Skirge Familiar', 'Treacherous Blessing', 'Lay of the Land', 'Chromatic Lantern', 'Ravenous Squirrel', 'Mission Briefing', 'Worst Fears', 'Sylvan Awakening', 'Abiding Grace', 'Powerstone Shard', 'Colossal Skyturtle', 'Solfatara', 'Myr Retriever', 'Fabricate', 'Chandra, Fire Artisan', 'Golgari Rot Farm', 'Proclamation of Rebirth', 'Sylvan Messenger', 'Malakir Rebirth', 'Outland Liberator', 'Curse of Misfortunes', 'Needle Spires', 'Shrine of Burning Rage', 'Approach of the Second Sun', 'Blackmail', 'Throne of the God-Pharaoh', 'Cathartic Pyre', 'Tolsimir, Friend to Wolves', 'Strike It Rich', 'Radha, Heart of Keld', 'Temple of Triumph', 'Delver of Secrets', 'Phantasmagorian', 'Goblin Ringleader', 'Elvish Mystic', 'Kaya, Ghost Assassin', 'Prey''s Vengeance', 'Burning of Xinye', 'Hateful Eidolon', 'Mistblade Shinobi', 'Pelakka Predation', 'Torment of Scarabs', 'Barbed Sextant', 'Canyon Slough', 'Bloodline Keeper', 'Kolaghan, the Storm''s Fury', 'Discovery // Dispersal', 'Flourishing Fox', 'Shriekmaw', 'Moonhold', 'Liliana Vess', 'Stirring Wildwood', 'Precursor Golem', 'Skylasher', 'Seething Song', 'Carnophage', 'Temple of Silence', 'Nullpriest of Oblivion', 'Mirage Mirror', 'Decree of Justice', 'Rule of Law', 'Fling', 'Creeping Trailblazer', 'Dragonsguard Elite', 'Pyroclasm', 'Goblin Bushwhacker', 'Stasis Snare', 'Sejiri Shelter', 'Dragonspark Reactor', 'Riftwing Cloudskate', 'Galvanic Relay', 'Satoru Umezawa', 'Smokestack', 'Nested Shambler', 'Experimental Synthesizer', 'Bogardan Hellkite', 'Skeletal Swarming', 'Champion of Dusk', 'Raven''s Crime', 'Gnarlroot Trapper', 'Molten Slagheap', 'Specter''s Shroud', 'Foundation Breaker', 'Ivy Lane Denizen', 'Maestros Theater', 'Mikokoro, Center of the Sea', 'Bloodchief''s Thirst', 'Frontier Bivouac', 'Sprite Dragon', 'Fists of Ironwood', 'Bile Blight', 'Beacon of Tomorrows', 'Seaside Citadel', 'Shrapnel Blast', 'Living Lore', 'Slumbering Tora', 'Frost Walker', 'Ghitu Encampment', 'Voltage Surge', 'Champion of Wits', 'Mystic Snake', 'Terminus', 'Feed the Swarm', 'Viashino Pyromancer', 'Sorin Markov', 'Tanglepool Bridge', 'Myojin of Life''s Web', 'Safewright Quest', 'Terramorphic Expanse', 'Dire-Strain Rampage', 'Gossamer Chains', 'Arcbound Ravager', 'Undercity Informer', 'Soulherder', 'Clattering Augur', 'Elvish Champion', 'Bad River', 'Scurry Oak', 'Invisible Stalker', 'Disciple of Bolas', 'Warkite Marauder', 'Infinite Obliteration', 'Insolent Neonate', 'Buried Ruin', 'Glacial Fortress', 'Barrenton Medic', 'Silvergill Adept', 'Piranha Marsh', 'Wilt-Leaf Liege', 'Scrapheap Scrounger', 'Ritual of Soot', 'Sunscorched Desert', 'Embodiment of Fury', 'Gigadrowse', 'Snowfield Sinkhole', 'Cursecatcher', 'Drannith Stinger', 'Trespasser''s Curse', 'Vampire''s Kiss', 'Swans of Bryn Argoll', 'Ezuri, Renegade Leader', 'Negate', 'Vampire of the Dire Moon', 'Blacklance Paragon', 'Magister Sphinx', 'Abandon Hope', 'Frantic Search', 'Satyr Hoplite', 'Ravenous Chupacabra', 'Curse of Death''s Hold', 'Mirrorshell Crab', 'Hypergenesis', 'Erdwal Illuminator', 'Sky Hussar', 'Lavaclaw Reaches', 'Security Bypass', 'Temple Bell', 'Egon, God of Death', 'Master of Death', 'General Ferrous Rokiric', 'Wrath of God', 'Raze the Effigy', 'Briarbridge Patrol', 'Ethersworn Sphinx', 'Sidisi''s Faithful', 'Flame-Kin Zealot', 'Darksteel Colossus', 'Bone Shards', 'Disciple of the Vault', 'Rift Sower', 'Force of Rage', 'Axgard Armory', 'Altered Ego', 'Wall of Omens', 'Glimpse of Tomorrow', 'Blackbloom Rogue', 'Jeskai Ascendancy', 'Trostani''s Summoner', 'Illuminator Virtuoso', 'Dark Ritual', 'Artificer''s Assistant', 'Swiftwater Cliffs', 'Bloodtithe Harvester', 'Dawn of Hope', 'Gigantomancer', 'Spirited Companion', 'Dire Tactics', 'Mwonvuli Acid-Moss', 'Prophet of Kruphix', 'Falkenrath Gorger', 'Breya''s Apprentice', 'Evangel of Heliod', 'Flood Plain', 'Call of the Death-Dweller', 'Teferi, Mage of Zhalfir', 'Earthshaker Khenra', 'Behold the Multiverse', 'Cleansing Wildfire', 'Wild Pair', 'Mishra''s Factory', 'Lashwrithe', 'Kazandu Mammoth', 'Tocatli Honor Guard', 'Ponder', 'Mire Triton', 'Vampire Lacerator', 'Myth Realized', 'Azami, Lady of Scrolls', 'Llanowar Tribe', 'Faerie Miscreant', 'Grim Lavamancer', 'Quest for Pure Flame', 'Vigor', 'Drowned Catacomb', 'Restoration Angel', 'Ghoulish Procession', 'Arc-Slogger', 'Blue Sun''s Zenith', 'Gatekeeper of Malakir', 'Earthquake', 'Merrow Reejerey', 'Inevitable Betrayal', 'Tidehollow Strix', 'Jungle Shrine', 'Abundant Harvest', 'Edric, Spymaster of Trest', 'Jwari Disruption', 'Sandsteppe Citadel', 'Patchwork Automaton', 'Cruel Ultimatum', 'The Underworld Cookbook', 'Dreadhorde Invasion', 'Lich''s Mastery', 'Sleight of Hand', 'Foreboding Ruins', 'Doom Foretold', 'Wildfield Borderpost', 'Sigil of the Empty Throne', 'Moorland Haunt', 'Tranquil Cove', 'Ranger''s Guile', 'Shivan Dragon', 'Devious Cover-Up', 'Vendetta', 'Glorybringer', 'Reassembling Skeleton', 'Drift of Phantasms', 'Judith, the Scourge Diva', 'Kin-Tree Invocation', 'Prophetic Prism', 'Elvish Clancaller', 'Double Vision', 'Drannith Healer', 'Brokers Hideout', 'Colossification', 'Slip Out the Back', 'Field of Ruin', 'Thaumatic Compass', 'Incandescent Soulstoke', 'Thraben Inspector', 'Thousand-Faced Shadow', 'He Who Hungers', 'Harbinger of the Tides', 'Boomerang', 'Silver-Fur Master', 'Ash Zealot', 'Goblin Bombardment', 'Archfiend''s Vessel', 'Silundi Vision', 'Ancestral Anger', 'Inscription of Ruin', 'Ingenious Infiltrator', 'Big Score', 'Orim''s Chant', 'Dictate of Kruphix', 'Goldmire Bridge', 'Kami''s Flare', 'Wren''s Run Vanquisher', 'Electrolyze', 'Woodfall Primus', 'Warriors'' Lesson', 'Putrid Goblin', 'Hypnotic Specter', 'Dramatic Finale', 'Izzet Signet', 'Knight of the White Orchid', 'Sacred Fire', 'Wight', 'Consuming Vapors', 'Guild Globe', 'Kaleidoscorch', 'Filigree Angel', 'Demon Bolt', 'Join the Dance', 'Alchemist''s Vial', 'Elvish Visionary', 'Faerie Vandal', 'Infernal Grasp', 'Eye of Nowhere', 'Barren Moor', 'Coastal Tower', 'Scorch Spitter', 'Forgotten Cave', 'Martyr of Sands', 'Darkmoss Bridge', 'Dead Weight', 'Zenith Flare', 'Radiant Flames', 'Regal Force', 'Temple of Mystery', 'Cleansing Nova', 'Hinterland Harbor', 'Sejiri Refuge', 'Jhoira, Weatherlight Captain', 'Forsake the Worldly', 'Rootbound Crag', 'Mesmeric Fiend', 'Silverbluff Bridge', 'Oracle of Mul Daya', 'Altar of the Brood', 'Villainous Wealth', 'Dryad''s Revival', 'See the Truth', 'Shaman of the Pack', 'Tolsimir Wolfblood', 'Karn''s Temporal Sundering', 'Curse of Thirst', 'Cathar Commando', 'Blazing Specter', 'Jace, Memory Adept', 'Undead Butler', 'Skyclave Cleric', 'Azorius Charm', 'Muddle the Mixture', 'Temple of Enlightenment', 'Yarok''s Fenlurker', 'Evolving Wilds', 'Fireball', 'Ram Through', 'Soulflayer', 'Fire-Lit Thicket', 'Tombstalker', 'Wrench Mind', 'Lathliss, Dragon Queen', 'Genesis', 'Intangible Virtue', 'Tomb of Urami', 'Blightning', 'Elves of Deep Shadow', 'Reverent Hoplite', 'Invoke Calamity', 'Cabal Therapist', 'Greater Gargadon', 'Hagra Mauling', 'Braids, Cabal Minion', 'Foundry Street Denizen', 'Jace Beleren', 'Azor''s Gateway', 'Conflagrate', 'Blasphemous Act', 'Lose Focus', 'Mirrodin''s Core', 'Tectonic Reformation', 'Asmodeus the Archfiend', 'Nomad Outpost', 'Calciform Pools', 'Liege of the Tangle', 'Salvage Titan', 'Mistvault Bridge', 'Ondu Inversion', 'Counterflux', 'Heartless Act', 'Ornithopter of Paradise', 'Season of Growth', 'Primal Beyond', 'Laboratory Maniac', 'Kira, Great Glass-Spinner', 'Worldgorger Dragon', 'Elvish Archdruid', 'Unified Will', 'Thirst for Discovery', 'Prowling Serpopard', 'Kjeldoran Outpost', 'Lodestone Golem', 'Circle of Confinement', 'Glen Elendra Archmage', 'Fire Covenant', 'Cursed Totem', 'Victim of Night', 'Lifespinner', 'Metalwork Colossus', 'Silumgar, the Drifting Death', 'Birds of Paradise', 'Vampire Nighthawk', 'Etherium Sculptor', 'Akroma, Angel of Fury', 'Iname, Death Aspect', 'Lightning Rift', 'Gavony Township', 'Tyrant''s Scorn', 'Pyromancer''s Swath', 'Grand Architect', 'Raise the Alarm', 'Izzet Boilerworks', 'Force of Nature', 'Scrap Trawler', 'Repeal', 'Hushwing Gryff', 'Howling Mine', 'Warstorm Surge', 'Walk the Aeons', 'Ghitu Lavarunner', 'Nine Lives', 'Fading Hope', 'Curse of Exhaustion', 'Ral, Storm Conduit', 'Nissa, Worldwaker', 'Lumbering Falls', 'Dwynen''s Elite', 'Veinfire Borderpost', 'Elemental Bond', 'White Sun''s Zenith', 'Squadron Hawk', 'Joraga Warcaller', 'Spell Pierce', 'Elderfang Ritualist', 'Zetalpa, Primal Dawn', 'Experimental Frenzy', 'Dwynen, Gilt-Leaf Daen', 'Lonis, Cryptozoologist', 'Staggering Insight', 'Thryx, the Sudden Storm', 'Vivid Meadow', 'Smokebraider', 'Pirate''s Pillage', 'Caves of Koilos', 'Gideon Jura', 'Arbor Elf', 'Diabolic Edict', 'Jace, the Living Guildpact', 'Rishadan Dockhand', 'Stormchaser Drake', 'Cosima, God of the Voyage', 'Game Trail', 'Grapeshot', 'Goblin Chieftain', 'Clifftop Retreat', 'Vivid Creek', 'Mistvein Borderpost', 'Spear of Heliod', 'Aphemia, the Cacophony', 'Sphinx''s Tutelage', 'Izoni, Thousand-Eyed', 'Flame Rift', 'Prahv, Spires of Order', 'Oran-Rief, the Vastwood', 'Dimir Signet', 'Esper Charm', 'Sanguine Sacrament', 'Angelsong', 'Mind''s Desire', 'Dovin Baan', 'Fact or Fiction', 'Mystic Monastery', 'Call of the Herd', 'Firespout', 'Arch of Orazca', 'Voldaren Epicure', 'Acolyte of Affliction', 'Fallen Shinobi', 'Iname, Life Aspect', 'Gaea''s Revenge', 'Indulgent Aristocrat', 'Moon-Circuit Hacker', 'Whisperwood Elemental', 'Demonic Dread', 'Spark Spray', 'Bygone Bishop', 'Riveteers Charm', 'Future Sight', 'Hornet Queen', 'Dead // Gone', 'Secluded Courtyard', 'Hymn to Tourach', 'Death Baron', 'Chief Engineer', 'Razortide Bridge', 'Garruk Wildspeaker', 'Sylvan Library', 'Thundering Raiju', 'Underworld Rage-Hound', 'Ral Zarek', 'Temple of Malice', 'Temple of Malady', 'Timely Reinforcements', 'Incandescent Aria', 'Secluded Glen', 'Castigate', 'Nevermaker'))) 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, 60.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (81.0 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Barrin, Tolarian Archmage', 'Battlefield Forge', 'Sram''s Expertise', 'Asylum Visitor', 'Snow-Covered Forest', 'Concerted Defense', 'Ethersworn Canonist', 'Firewild Borderpost', 'Viscera Seer', 'Axgard Armory', 'Fact or Fiction', 'Cabal Therapist', 'Metalwork Colossus', 'Rite of Oblivion', 'Sunblade Samurai', 'Josu Vess, Lich Knight', 'Mirrorshell Crab', 'Greater Good', 'Temple of Deceit', 'Elvish Piper', 'Skyclave Shade', 'The Birth of Meletis', 'Dusk Legion Zealot', 'Soulflayer', 'Martyr of Sands', 'Prophetic Prism', 'Eldrazi Mimic', 'Dryad Militant', 'Deliberate', 'Revitalize', 'Possibility Storm', 'River''s Rebuke', 'Temple of Abandon', 'Unsubstantiate', 'Condemn', 'Lost Legacy', 'Mana Flare', 'Maestros Theater', 'Lich''s Mastery', 'Go for Blood', 'Blue Sun''s Zenith', 'Sorcerer Class', 'Genesis', 'Blackmail', 'General Ferrous Rokiric', 'Braids, Cabal Minion', 'Proclamation of Rebirth', 'Vivid Grove', 'Ivy Lane Denizen', 'Devious Cover-Up', 'Ornithopter', 'Worst Fears', 'Necrotic Ooze', 'Lashwrithe', 'Altar''s Reap', 'Lightning Strike', 'Biting-Palm Ninja', 'Mouth // Feed', 'Oblivion Ring', 'Varragoth, Bloodsky Sire', 'Vivid Meadow', 'See the Truth', 'Spear of Heliod', 'Teferi, Mage of Zhalfir', 'Slumbering Tora', 'Warstorm Surge', 'Spirited Companion', 'Cleansing Nova', 'Talisman of Impulse', 'Fabricate', 'Dictate of Kruphix', 'Raze the Effigy', 'Llanowar Elves', 'Moonhold', 'Akroma''s Memorial', 'Living Lore', 'Howltooth Hollow', 'Distended Mindbender', 'Fire Covenant', 'Caravan Vigil', 'Greater Gargadon', 'Azorius Charm', 'Elvish Visionary', 'Runed Halo', 'Drift of Phantasms', 'High-Speed Hoverbike', 'Foreboding Ruins', 'Quest for Pure Flame', 'Just the Wind', 'Tide Shaper', 'Duress', 'Skybridge Towers', 'Cultivate', 'Drossforge Bridge', 'Wild Mongrel', 'Terramorphic Expanse', 'Vivid Marsh', 'Elemental Bond', 'Bygone Bishop', 'Tectonic Reformation', 'Merfolk Looter', 'Lay of the Land', 'Steel Sabotage', 'Arch of Orazca', 'Vapor Snag', 'Mikokoro, Center of the Sea', 'He Who Hungers', 'Sleight of Hand', 'Pirate''s Pillage', 'Master of Death', 'Warriors'' Lesson', 'Rustvale Bridge', 'Cloudpost', 'Timeless Witness', 'Trostani''s Summoner', 'Sylvan Awakening', 'Conflagrate', 'Tireless Provisioner', 'Kaya, Ghost Assassin', 'Yosei, the Morning Star', 'Mist-Syndicate Naga', 'Shadow of the Grave', 'Quicksilver Gargantuan', 'Ichorclaw Myr', 'Skyclave Cleric', 'Become Immense', 'Incinerate', 'First-Sphere Gargantua', 'Repeal', 'Earthshaker Khenra', 'Dread Return', 'Wilt-Leaf Liege', 'Forbid', 'Circle of Confinement', 'Dragonsguard Elite', 'Prowling Serpopard', 'Chain Lightning', 'Ethersworn Sphinx', 'King of the Pride', 'Prognostic Sphinx', 'Lightning Rift', 'Jeskai Ascendancy', 'Dakmor Salvage', 'Dragonspark Reactor', 'Hornet Queen', 'Gather the Townsfolk', 'Savra, Queen of the Golgari', 'Consuming Vapors', 'Blasphemous Act', 'Reckoner''s Bargain', 'Mouth of Ronom', 'Lochmere Serpent', 'Quicken', 'Master of the Pearl Trident', 'Mistvein Borderpost', 'Overwhelming Denial', 'Silverbluff Bridge', 'Experimental Synthesizer', 'Nevermaker', 'Dovin Baan', 'Flame Rift', 'Savage Summoning', 'Intangible Virtue', 'Skymarcher Aspirant', 'Temple of Silence', 'Gigadrowse', 'Cabal Stronghold', 'Heartless Act', 'Field of Ruin', 'Orim''s Chant', 'Etherium Sculptor', 'Thermo-Alchemist', 'Game Trail', 'Wall of Omens', 'Briarbridge Patrol', 'Tomb of Urami', 'Magister of Worth', 'Bone Shards', 'Liege of the Tangle', 'Tamiyo''s Safekeeping', 'Clattering Augur', 'Doomed Traveler', 'Korlash, Heir to Blackblade', 'Memory Lapse', 'Dauntless Escort', 'Might of Old Krosa', 'Blade Splicer', 'Powerstone Shard', 'Mistvault Bridge', 'Murmuring Mystic', 'Touch the Spirit Realm', 'Goldmire Bridge', 'Qasali Pridemage', 'Dead // Gone', 'Saw It Coming', 'Realm Razer', 'Nylea''s Presence', 'Blightning', 'Seething Song', 'Disciple of the Vault', 'Vampiric Fury', 'Acolyte of Affliction', 'Gideon Jura', 'Darkmoss Bridge', 'Bad River', 'Blossoming Calm', 'Day of Judgment', 'Cruel Ultimatum', 'Dryad''s Revival', 'Knight of the White Orchid', 'Oni-Cult Anvil', 'Snow-Covered Mountain', 'Risk Factor', 'Altered Ego', 'Tempered Steel', 'Whip of Erebos', 'White Sun''s Zenith', 'Dream Trawler', 'Approach of the Second Sun', 'Eye of Nowhere', 'Cleansing Wildfire', 'Ritual of Soot', 'Smokestack', 'Deep Forest Hermit', 'Demon Bolt', 'Shivan Dragon', 'Bogardan Hellkite', 'Spinerock Knoll', 'Falkenrath Pit Fighter', 'Midnight Clock', 'That Which Was Taken', 'Kazandu Mammoth', 'Revoke Existence', 'Rakdos Charm', 'Goblin Dark-Dwellers', 'Tombstalker', 'Timely Reinforcements', 'Nullpriest of Oblivion', 'Arcanis the Omnipotent', 'Voltage Surge', 'Mystifying Maze', 'Solitary Confinement', 'Dreadhorde Invasion', 'Vault of the Archangel', 'Discovery // Dispersal', 'Rebuild', 'Goblin Bombardment', 'Salvage Titan', 'Barbarian Ring', 'Bloodbraid Elf', 'Pillage', 'Wingcrafter', 'Hour of Promise', 'Crumbling Necropolis', 'Unburial Rites', 'Zealous Persecution', 'Fleecemane Lion', 'Chandra, Fire Artisan', 'Curse of the Pierced Heart', 'Gray Merchant of Asphodel', 'Lava Dart', 'Lavaclaw Reaches', 'Signal Pest', 'Sorin Markov', 'Mind''s Desire', 'Spikefield Hazard', 'Tendrils of Agony', 'Regal Force', 'Wandering Mind', 'Laboratory Maniac', 'Ornithopter of Paradise', 'Silvergill Adept', 'Vedalken Shackles', 'Kira, Great Glass-Spinner', 'Smallpox', 'Ground Rift', 'Spellweaver Helix', 'Flame-Blessed Bolt', 'Dispel', 'Hunted Nightmare', 'Gossamer Chains', 'Colossal Skyturtle', 'Blood Fountain', 'Fertile Ground', 'Trace of Abundance', 'Wildfield Borderpost', 'Swiftwater Cliffs', 'Vampire Lacerator', 'Bronzehide Lion', 'Consume the Meek', 'Chain of Plasma', 'Raise the Alarm', 'Thawing Glaciers', 'Patchwork Automaton', 'Temple of Triumph', 'Zetalpa, Primal Dawn', 'Cathar Commando', 'Storm Herald', 'Wrath of God', 'Negate', 'Demigod of Revenge', 'Vivid Creek', 'Opt', 'Angel of Sanctions', 'Desolate Lighthouse', 'Beastcaller Savant', 'Hagra Mauling', 'Fusion Elemental', 'Strike It Rich', 'Archway Commons', 'Ancestral Anger', 'Infinite Obliteration', 'Hostage Taker', 'Myth Realized', 'Shrapnel Blast', 'Drowned Catacomb', 'Orgg', 'Infernal Grasp', 'Jungle Shrine', 'Dual Strike', 'Morselhoarder', 'Honored Hydra', 'Chandra, Pyromaster', 'Regrowth', 'Ominous Seas', 'Edge of Autumn', 'Hypergenesis', 'Ghitu Encampment', 'Breya''s Apprentice', 'Desecration Demon', 'Abrade', 'Nested Shambler', 'Expansion // Explosion', 'Sandsteppe Citadel', 'Gaea''s Will', 'Wild Nacatl', 'Gaea''s Revenge', 'Faerie Miscreant', 'Elvish Clancaller', 'Hurricane', 'Join the Dance', 'Loyal Sentry', 'Mobilized District', 'Thundering Raiju', 'Secluded Glen', 'Barbed Sextant', 'Elvish Mystic', 'Semblance Anvil', 'Mirrodin''s Core', 'Thaumatic Compass', 'Shrine of Burning Rage', 'Jolrael, Mwonvuli Recluse', 'Leyline of the Meek', 'Howling Mine', 'Ghost Quarter', 'Sire of Insanity', 'Battle of Wits', 'Terrarion', 'Urza''s Factory', 'Asceticism', 'Snowfield Sinkhole', 'Karn''s Temporal Sundering', 'Rishadan Dockhand', 'Captivating Vampire', 'Mishra''s Factory', 'Obstinate Baloth', 'Counterflux', 'Cloudblazer', 'Disenchant', 'Chasm Skulker', 'Oracle of Mul Daya', 'Satyr Wayfinder', 'Tyrant of Discord', 'Oyobi, Who Split the Heavens', 'Riftwing Cloudskate', 'Bloodline Keeper', 'Invade the City', 'Vampire Opportunist', 'Invigorate', 'Arrogant Bloodlord', 'Kabira Takedown', 'Nomad Outpost', 'Queza, Augur of Agonies', 'Invisible Stalker', 'Tidehollow Strix', 'Izzet Guildgate', 'Diregraf Ghoul', 'Metallic Rebuke', 'Pieces of the Puzzle', 'Thraben Inspector', 'Wooded Bastion', 'Needle Spires', 'Scurry Oak', 'Wonder', 'Illuminator Virtuoso', 'Jhoira, Weatherlight Captain', 'Blight Mamba', 'Burning of Xinye', 'Mentor of the Meek', 'Judge''s Familiar', 'Akroma, Angel of Fury', 'Dragonskull Summit', 'Adorned Pouncer', 'Bile Blight', 'Goblin Electromancer', 'Drannith Stinger', 'Servo Exhibition', 'Vendetta', 'Soulherder', 'Secluded Steppe', 'Razortide Bridge', 'Stirring Wildwood', 'Temple of Epiphany', 'Burst Lightning', 'Benevolent Bodyguard', 'Stormchaser Drake', 'Hissing Quagmire', 'Dread', 'Ral Zarek', 'Walk the Aeons', 'Sylvan Library', 'Reinforced Ronin', 'Tocatli Honor Guard', 'Angel''s Grace', 'Sea Gate Wreckage', 'Retraction Helix', 'Force of Rage', 'Mistcutter Hydra', 'The Flame of Keld', 'Insolent Neonate', 'Golgari Rot Farm', 'Wirewood Herald', 'Dread Fugue', 'Skeletal Swarming', 'Shriekmaw', 'Galvanic Relay', 'Ghirapur Aether Grid', 'Assault Strobe', 'Jwari Disruption', 'Court Homunculus', 'Frontier Bivouac', 'Behold the Multiverse', 'Clifftop Retreat', 'Tidespout Tyrant', 'Crystal Shard', 'Arcbound Ravager', 'Icehide Golem', 'The Underworld Cookbook', 'Dimir Charm', 'Doom Foretold', 'Glimpse of Tomorrow', 'Phyrexian Dreadnought', 'Declaration in Stone', 'Coralhelm Commander', 'Reassembling Skeleton', 'Restoration Angel', 'Regal Caracal', 'Raging Ravine', 'Artful Dodge', 'Tithe Taker', 'Spell Pierce', 'Cathartic Pyre', 'Dawn of Hope', 'Ash Zealot', 'Vampire''s Kiss', 'Coalition Relic', 'Vindicate', 'Drannith Healer', 'Iname, Death Aspect', 'Sterling Grove', 'Resurgent Belief', 'Treasure Cruise', 'Slip Out the Back', 'Groundswell', 'Iname, Life Aspect', 'Caves of Koilos', 'Saproling Migration', 'Hymn to Tourach', 'Kami''s Flare', 'Outland Liberator', 'Triskelion', 'Think Twice', 'Crumbling Vestige', 'Pride Sovereign', 'Nyxathid', 'Squadron Hawk', 'Experimental Overload', 'Sol Talisman', 'Vigor', 'Circular Logic', 'Chromatic Lantern', 'Azor''s Gateway', 'Fading Hope', 'Ram Through', 'Woodfall Primus', 'Dragon Mantle', 'Skylasher', 'Prophetic Bolt', 'Sign in Blood', 'Merrow Reejerey', 'Cartel Aristocrat', 'Collected Conjuring', 'Ral, Storm Conduit', 'Fauna Shaman', 'Falkenrath Aristocrat', 'Boros Signet', 'Blazing Specter', 'Sokenzan Smelter', 'Darksteel Colossus', 'Furyblade Vampire', 'Hard Evidence', 'Kitchen Imp', 'Naya Hushblade', 'Myojin of Life''s Web', 'Tolsimir Wolfblood', 'Graf Mole', 'Bump in the Night', 'Satyr Hoplite', 'Eiganjo Uprising', 'Guild Globe', 'Colossification', 'Porphyry Nodes', 'Leechridden Swamp', 'Dramatic Finale', 'Omen of the Sun', 'Mind Rake', 'Detention Sphere', 'Experimental Frenzy', 'Stormfist Crusader', 'Seaside Citadel', 'Feed the Swarm', 'Failure // Comply', 'Ranger''s Guile', 'Abiding Grace', 'Commune with the Gods', 'Alchemist''s Vial', 'Hushwing Gryff', 'Spark Spray', 'Gruul Signet', 'Mizzium Skin', 'Birds of Paradise', 'Dark Ritual', 'Asmodeus the Archfiend', 'Shrieking Affliction', 'Odds // Ends', 'Curse of Exhaustion', 'Figure of Destiny', 'Distortion Strike', 'Jace, the Living Guildpact', 'Din of the Fireherd', 'Phantasmal Bear', 'Rule of Law', 'Zenith Flare', 'Lumbering Falls', 'Skirge Familiar', 'Deep Analysis', 'Falkenrath Forebear', 'Llanowar Wastes', 'Judith, the Scourge Diva', 'Hotshot Mechanic', 'Shardless Agent', 'Michiko''s Reign of Truth', 'Primal Surge', 'Swans of Bryn Argoll', 'Lead the Stampede', 'Ajani, Caller of the Pride', 'Fblthp, the Lost', 'One with Nothing', 'Sylvan Primordial', 'Sigil Blessing', 'Pyromancer''s Swath', 'Stasis Snare', 'Champion of Wits', 'Jace, Memory Adept', 'Nezahal, Primal Tide', 'Search for Tomorrow', 'Flame Slash', 'Filigree Angel', 'Kessig Wolf Run', 'Lathliss, Dragon Queen', 'Thought Scour', 'Jhoira''s Familiar', 'Cosima, God of the Voyage', 'Ranger of Eos', 'Leonin Warleader', 'Tempest Djinn', 'Eternal Dragon', 'Ghostly Flicker', 'Kumano Faces Kakkazan', 'Angel of Despair', 'Palace Siege', 'Slagstorm', 'Mana Leak', 'Disciple of Bolas', 'Viashino Pyromancer', 'Cathedral of War', 'Myojin of Infinite Rage', 'Mystic Snake', 'Izzet Boilerworks', 'Pyretic Ritual', 'Persistent Specimen', 'Ondu Inversion', 'Garruk Wildspeaker', 'Season of Growth', 'Cursed Totem', 'Tymaret, Chosen from Death', 'Forsake the Worldly', 'Fire-Lit Thicket', 'Bloodchief''s Thirst', 'Izoni, Thousand-Eyed', 'Ulvenwald Mysteries', 'Tolsimir, Friend to Wolves', 'Firespout', 'Wrench Mind', 'Voldaren Epicure', 'Faerie Vandal', 'Decree of Justice', 'Mystical Teachings', 'End-Raze Forerunners', 'Horde of Notions', 'Riveteers Charm', 'Staggering Insight', 'Inscription of Ruin', 'Improbable Alliance', 'Archaeomancer', 'Sejiri Refuge', 'Epochrasite', 'Harbinger of the Tides', 'Terastodon', 'Kami of False Hope', 'Solfatara', 'Forgotten Cave', 'Barrenton Medic', 'Esper Charm', 'It That Betrays', 'Geomancer''s Gambit', 'Hypnotic Specter', 'Rotten Reunion', 'Cosmos Elixir', 'Dripping-Tongue Zubera', 'Ilysian Caryatid', 'Temple of Mystery', 'Moment of Craving', 'Sylvan Anthem', 'Altar of the Brood', 'Mesmeric Fiend', 'Mindlash Sliver', 'Mogg War Marshal', 'Rabbit Battery', 'Putrid Goblin', 'Buried Alive', 'Stony Strength', 'Gatekeeper of Malakir', 'Of One Mind', 'Scab-Clan Berserker', 'Elderfang Ritualist', 'Obscura Charm', 'Mephidross Vampire', 'Ingenious Infiltrator', 'Castigate', 'Grim Lavamancer', 'Hythonia the Cruel', 'Jack-o''-Lantern', 'Ad Nauseam', 'Permeating Mass', 'Future Sight', 'Vampire Nighthawk', 'Hero of Precinct One', 'The Raven''s Warning', 'Izzet Signet', 'Death Baron', 'Muddle the Mixture', 'Primal Command', 'Valiant Rescuer', 'Primal Amulet', 'Sky Hussar', 'Obscura Storefront', 'Magister Sphinx', 'Gavony Township', 'Specter''s Shroud', 'Incandescent Aria', 'Prey''s Vengeance', 'Eerie Interlude', 'Temple of Malice', 'Lantern of the Lost', 'Terminus', 'Safewright Quest', 'Treacherous Blessing', 'Moss-Pit Skeleton', 'Electrolyze', 'Oversoul of Dusk', 'Feline Sovereign', 'Lonis, Cryptozoologist', 'Bloodtithe Harvester', 'Exhaustion', 'Nature''s Lore', 'Trickbind', 'Cloudfin Raptor', 'Liliana''s Specter', 'Fiend Hunter', 'Expedite', 'Champion of Dusk', 'Ignite Memories', 'Flame-Kin Zealot', 'Sejiri Shelter', 'Coiling Oracle', 'Gilded Lotus', 'Temple of Malady', 'Fiery Temper', 'Liliana Vess', 'Chandra Ablaze', 'Invoke Calamity', 'Prahv, Spires of Order', 'Mystic Monastery', 'Debtors'' Knell', 'Scrapheap Scrounger', 'Veinfire Borderpost', 'Coastal Tower', 'Fling', 'Noose Constrictor', 'Flame Javelin', 'Maelstrom Nexus', 'Vivid Crag', 'Snow-Covered Plains', 'Jokulhaups', 'Double Vision', 'Sacred Fire', 'Stromkirk Noble', 'Grapeshot', 'Temple of Enlightenment', 'Pack Rat', 'Kin-Tree Invocation', 'Arrogant Wurm', 'Psychatog', 'Arcane Sanctum', 'Security Bypass', 'Crackling Drake', 'Blighted Agent', 'Warleader''s Helix', 'Glass Casket', 'Earthquake', 'Sigil of the Empty Throne', 'Call of the Herd', 'Molten Slagheap', 'Demonic Dread', 'Reverent Hoplite', 'Vault Skirge', 'Evolving Wilds', 'Fireblade Charger', 'Stone Rain', 'Faithful Mending', 'Boomerang', 'Canyon Slough', 'Frantic Search', 'Momentary Blink', 'Erebos''s Intervention', 'Animate Dead', 'Erdwal Illuminator', 'Grisly Salvage', 'Sanguine Statuette', 'Woodland Cemetery', 'Herbal Poultice', 'Cursecatcher', 'Shard Volley', 'Blackbloom Rogue', 'Delver of Secrets', 'Ponder', 'Brokers Hideout', 'Loam Lion', 'Thirst for Meaning', 'Hinterland Harbor', 'Undead Butler', 'Basking Rootwalla', 'Dimir Signet', 'Calciform Pools', 'Glimmer Bairn', 'Jace Beleren', 'Nimble Larcenist', 'Blacklance Paragon', 'Moon-Circuit Hacker', 'Egon, God of Death', 'Evangel of Heliod', 'Vision Skeins', 'Restore Balance', 'Boros Reckoner', 'Fireball', 'Rift Sower', 'Rootbound Crag', 'Glen Elendra Archmage', 'Rend Flesh', 'Diabolic Edict', 'Ravenous Chupacabra', 'Sanguine Sacrament', 'Sylvan Scrying', 'Costly Plunder', 'Loxodon Smiter', 'Mire Triton', 'Dire Tactics', 'Kaleidoscorch', 'Barren Moor', 'Watcher for Tomorrow', 'Yarok''s Fenlurker', 'Gitaxian Probe', 'Irencrag Pyromancer', 'Thirst for Discovery', 'Keruga, the Macrosage', 'Arc-Slogger', 'Reality Ripple', 'Incubation Druid', 'Midnight Reaper', 'Slagwoods Bridge', 'Nivmagus Elemental', 'Bedevil', 'Tyrant''s Scorn', 'Glimmerpost', 'Tanglepool Bridge', 'Glacial Fortress', 'Prophet of Kruphix', 'Arbor Elf', 'Flourishing Fox', 'Radiant Flames', 'Shredded Sails', 'Thoughtpicker Witch', 'Oust', 'Wavesifter', 'Fieldmist Borderpost', 'Grimdancer', 'Woodland Champion', 'Tectonic Giant', 'Blazing Rootwalla', 'Ancient Stirrings', 'Tyrant''s Choice', 'Lifespinner', 'Tooth and Nail', 'Falkenrath Gorger', 'Otherworldly Gaze', 'Lose Focus', 'Bala Ged Recovery', 'Tendo Ice Bridge', 'Kuldotha Forgemaster', 'Desperate Ritual', 'Ghitu Lavarunner', 'Kjeldoran Outpost', 'Arguel''s Blood Fast', 'Sylvan Advocate', 'Tormenting Voice', 'Suture Priest', 'Gateway Plaza', 'Izzet Charm', 'Searing Spear', 'Verdant Command', 'Raven''s Crime', 'Maestros Charm', 'Warkite Marauder', 'Force of Nature', 'Stubborn Denial'))) 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, 81.0, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (68.1 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Kaya, Ghost Assassin', 'Costly Plunder', 'Repeal', 'Stormchaser Drake', 'Thundering Raiju', 'Sorcerer Class', 'Deep Forest Hermit', 'Forsake the Worldly', 'Diabolic Edict', 'Obscura Storefront', 'Arbor Elf', 'Master of the Pearl Trident', 'Mana Flare', 'Mouth // Feed', 'Ulvenwald Mysteries', 'Boomerang', 'Shredded Sails', 'Eiganjo Uprising', 'Epochrasite', 'Stone Rain', 'Snow-Covered Mountain', 'Glimmer Bairn', 'Urza''s Factory', 'Geomancer''s Gambit', 'Persistent Specimen', 'Desecration Demon', 'Champion of Dusk', 'Evolving Wilds', 'Lumbering Falls', 'Sky Hussar', 'Wild Nacatl', 'Prophetic Prism', 'Regal Force', 'Herbal Poultice', 'Dual Strike', 'Hurricane', 'Jace, the Living Guildpact', 'Archway Commons', 'River''s Rebuke', 'Feed the Swarm', 'Swans of Bryn Argoll', 'Mouth of Ronom', 'Sigil of the Empty Throne', 'Ingenious Infiltrator', 'Howltooth Hollow', 'Vampiric Fury', 'Future Sight', 'Vapor Snag', 'Rebuild', 'Jhoira, Weatherlight Captain', 'Orgg', 'The Underworld Cookbook', 'Arrogant Bloodlord', 'Diregraf Ghoul', 'Sanguine Sacrament', 'Sign in Blood', 'Kabira Takedown', 'Cloudblazer', 'Ethersworn Canonist', 'Terastodon', 'Drowned Catacomb', 'Dream Trawler', 'Hotshot Mechanic', 'Dauntless Escort', 'Fireblade Charger', 'Falkenrath Forebear', 'Sorin Markov', 'Eerie Interlude', 'Demonic Dread', 'Slagstorm', 'Restoration Angel', 'Spear of Heliod', 'Iname, Life Aspect', 'Flame-Blessed Bolt', 'Sacred Fire', 'Dusk Legion Zealot', 'Eye of Nowhere', 'Mesmeric Fiend', 'Saproling Migration', 'Cloudfin Raptor', 'Scurry Oak', 'Suture Priest', 'Dimir Charm', 'Jace Beleren', 'Temple of Epiphany', 'Spell Pierce', 'Metalwork Colossus', 'Inscription of Ruin', 'Benevolent Bodyguard', 'Crackling Drake', 'Invisible Stalker', 'Gaea''s Revenge', 'Prowling Serpopard', 'Hissing Quagmire', 'Maelstrom Nexus', 'Garruk Wildspeaker', 'Lich''s Mastery', 'Hinterland Harbor', 'Clifftop Retreat', 'Triskelion', 'Orzhov Signet', 'Harmonize', 'Axgard Armory', 'Maestros Theater', 'Kuldotha Forgemaster', 'Vampire Lacerator', 'Skeletal Swarming', 'Llanowar Wastes', 'Shard Volley', 'Ancient Stirrings', 'Battle of Wits', 'Shadow of the Grave', 'Feline Sovereign', 'Falkenrath Pit Fighter', 'Asmodeus the Archfiend', 'Conclave Tribunal', 'Storm Herald', 'Mana Leak', 'Gigadrowse', 'Spellweaver Helix', 'Lost Legacy', 'Living Lore', 'Distortion Strike', 'Kjeldoran Outpost', 'Duress', 'Scab-Clan Berserker', 'Rend Flesh', 'Ghirapur Aether Grid', 'Firespout', 'Sire of Insanity', 'Leechridden Swamp', 'Disciple of the Vault', 'Ghitu Lavarunner', 'Crumbling Vestige', 'Deliberate', 'Faerie Miscreant', 'Mobilized District', 'Tolsimir Wolfblood', 'Drossforge Bridge', 'Burning of Xinye', 'Fling', 'Squadron Hawk', 'Wingcrafter', 'Fblthp, the Lost', 'Fertile Ground', 'Tyrant''s Choice', 'Dragonskull Summit', 'Genesis Wave', 'Nevermaker', 'Ghost Quarter', 'Oust', 'Lavaclaw Reaches', 'Chandra Ablaze', 'Grumgully, the Generous', 'Incubation Druid', 'Crack the Earth', 'Think Twice', 'Buried Alive', 'Ondu Inversion', 'Terrarion', 'Cruel Ultimatum', 'Ravenous Chupacabra', 'Magister of Worth', 'Vivid Creek', 'Coalition Relic', 'Azor''s Gateway', 'Dimir Signet', 'Metallic Rebuke', 'Sejiri Refuge', 'Pack Rat', 'General Ferrous Rokiric', 'Behold the Multiverse', 'Coastal Tower', 'Dragonsguard Elite', 'Rite of Oblivion', 'Stormfist Crusader', 'Primal Surge', 'Temple of Mystery', 'Jwari Disruption', 'Shardless Agent', 'Archaeomancer', 'Liege of the Tangle', 'Dead // Gone', 'Vault Skirge', 'Goblin Electromancer', 'Izzet Boilerworks', 'Karn''s Temporal Sundering', 'Drownyard Temple', 'Tidehollow Strix', 'Nimble Larcenist', 'Master of Death', 'Moss-Pit Skeleton', 'Sigil Captain', 'Mephidross Vampire', 'Walk the Aeons', 'Swiftwater Cliffs', 'Korlash, Heir to Blackblade', 'Sleight of Hand', 'Crumbling Necropolis', 'Invoke Calamity', 'Temple of Enlightenment', 'Ancestral Anger', 'Angel of Despair', 'Overwhelming Denial', 'Jack-o''-Lantern', 'Iname, Death Aspect', 'Stony Strength', 'Wildfield Borderpost', 'Ethersworn Sphinx', 'Zareth San, the Trickster', 'Altered Ego', 'Flame-Kin Zealot', 'Nested Shambler', 'Dryad''s Revival', 'Woodland Cemetery', 'Hythonia the Cruel', 'Incandescent Aria', 'Cloak and Dagger', 'Thoughtpicker Witch', 'Gruul Signet', 'Biting-Palm Ninja', 'Abiding Grace', 'Barbed Sextant', 'Ornithopter', 'Risk Factor', 'Loam Lion', 'Incinerate', 'Devious Cover-Up', 'Traxos, Scourge of Kroog', 'Fiend Hunter', 'Slumbering Tora', 'Quicken', 'Tyrant''s Scorn', 'Dispel', 'Magister Sphinx', 'Vindicate', 'Nivmagus Elemental', 'Dawn of Hope', 'Egon, God of Death', 'Woodfall Primus', 'Mogg War Marshal', 'Nyxathid', 'Sterling Grove', 'First-Sphere Gargantua', 'Tide Shaper', 'Expedite', 'Safehold Elite', 'Concerted Defense', 'Fae Offering', 'Firewild Borderpost', 'White Sun''s Zenith', 'Stubborn Denial', 'Etherium Sculptor', 'Cathartic Pyre', 'Signal Pest', 'Arch of Orazca', 'End-Raze Forerunners', 'Illuminator Virtuoso', 'Arc-Slogger', 'Infinite Obliteration', 'Failure // Comply', 'Searing Spear', 'Force of Rage', 'Inevitable Betrayal', 'Oblivion Ring', 'Circle of Confinement', 'Dramatic Finale', 'Fabricate', 'Doomed Traveler', 'Wrath of God', 'Raise the Alarm', 'Lantern of the Lost', 'Laboratory Maniac', 'Mystic Monastery', 'Barrenton Medic', 'Rootbound Crag', 'Bad River', 'Verdant Command', 'Vampire Opportunist', 'Bedevil', 'Chromatic Lantern', 'Tithe Taker', 'Retraction Helix', 'Bloodtithe Harvester', 'Doom Foretold', 'Mind''s Desire', 'Hour of Promise', 'Noose Constrictor', 'Altar of the Brood', 'Yosei, the Morning Star', 'Hunted Nightmare', 'Champion of Wits', 'Clattering Augur', 'Llanowar Elves', 'Staggering Insight', 'Kira, Great Glass-Spinner', 'Reassembling Skeleton', 'Double Vision', 'Skybridge Towers', 'Lashwrithe', 'Primal Amulet', 'Solfatara', 'Thawing Glaciers', 'Moment of Craving', 'Terramorphic Expanse', 'Ral, Storm Conduit', 'Timeless Witness', 'Lay of the Land', 'Blazing Rootwalla', 'Sylvan Awakening', 'Jungle Shrine', 'Thermo-Alchemist', 'Mizzium Mortars', 'Murmuring Mystic', 'Oyobi, Who Split the Heavens', 'Wirewood Herald', 'Keruga, the Macrosage', 'Burst Lightning', 'Cosmos Elixir', 'Midnight Reaper', 'Elvish Clancaller', 'Mirrodin''s Core', 'Thought Scour', 'Sylvan Scrying', 'Temple of Deceit', 'Coiling Oracle', 'Game Trail', 'Prognostic Sphinx', 'Primal Command', 'Of One Mind', 'Argent Sphinx', 'Forbid', 'Skyclave Shade', 'Bile Blight', 'Spinerock Knoll', 'Oracle of Mul Daya', 'Shrine of Burning Rage', 'Izoni, Thousand-Eyed', 'Canyon Slough', 'Scrapheap Scrounger', 'Strike It Rich', 'Signal the Clans', 'Erdwal Illuminator', 'Guild Globe', 'Colossal Skyturtle', 'Otherworldly Gaze', 'Restore Balance', 'Mentor of the Meek', 'Worst Fears', 'Vision Skeins', 'Court Homunculus', 'Blazing Specter', 'Vigor', 'Seaside Citadel', 'Arcanis the Omnipotent', 'Chain Lightning', 'Icehide Golem', 'Lonis, Cryptozoologist', 'Valiant Rescuer', 'Infernal Grasp', 'Galvanic Relay', 'Gather the Townsfolk', 'Leyline of the Meek', 'Blossoming Calm', 'Secluded Courtyard', 'Unburial Rites', 'Blood Fountain', 'Braids, Cabal Minion', 'Nissa, Worldwaker', 'Go for Blood', 'Teferi, Mage of Zhalfir', 'Disciple of Bolas', 'Psychatog', 'Evangel of Heliod', 'Hushwing Gryff', 'Frantic Search', 'Shrapnel Blast', 'Cursecatcher', 'Thaumatic Compass', 'Bogardan Hellkite', 'Goldmire Bridge', 'Seething Song', 'Specter''s Shroud', 'Tanglepool Bridge', 'Eternal Dragon', 'Debtors'' Knell', 'Wandering Mind', 'Savage Summoning', 'Mindlash Sliver', 'Foreboding Ruins', 'Martyr of Sands', 'Insolent Neonate', 'Figure of Destiny', 'Mirrorshell Crab', 'Barbarian Ring', 'Blue Sun''s Zenith', 'Tempest Djinn', 'Ghostly Flicker', 'Tooth and Nail', 'The Birth of Meletis', 'Ram Through', 'Join the Dance', 'Myth Realized', 'Cathedral of War', 'Zealous Persecution', 'Putrid Goblin', 'Bygone Bishop', 'Quest for Pure Flame', 'Honored Hydra', 'Vampire''s Kiss', 'Eldrazi Mimic', 'Fusion Elemental', 'Search for Tomorrow', 'Tempered Steel', 'Adorned Pouncer', 'Ghitu Encampment', 'Radiant Flames', 'Sokenzan Smelter', 'Counterflux', 'Pyretic Ritual', 'Zenith Flare', 'Orim''s Chant', 'Thirst for Meaning', 'Horde of Notions', 'Intangible Virtue', 'Dire-Strain Rampage', 'Curse of Exhaustion', 'Mystic Snake', 'Might of Old Krosa', 'Heartless Act', 'Loxodon Smiter', 'Myojin of Life''s Web', 'Akroma''s Memorial', 'Ground Rift', 'Servo Exhibition', 'Trickbind', 'Jace, Memory Adept', 'Wilt-Leaf Liege', 'Mishra''s Factory', 'Wonder', 'Cultivate', 'Drannith Healer', 'Demon Bolt', 'Edge of Autumn', 'Blight Mamba', 'Skirge Familiar', 'Muddle the Mixture', 'Altar''s Reap', 'Animist''s Awakening', 'Judith, the Scourge Diva', 'Lose Focus', 'Oni-Cult Anvil', 'Tomb of Urami', 'Viashino Pyromancer', 'Revitalize', 'Tamiyo''s Safekeeping', 'Snowfield Sinkhole', 'Slip Out the Back', 'Raging Ravine', 'Wavesifter', 'Leonin Warleader', 'Blackbloom Rogue', 'Phantasmal Bear', 'Gaea''s Will', 'Dread Fugue', 'Merrow Reejerey', 'The Raven''s Warning', 'Merfolk Looter', 'Gideon Jura', 'Coralhelm Commander', 'Greater Gargadon', 'Ivy Lane Denizen', 'Mire Triton', 'Ornithopter of Paradise', 'Season of Growth', 'Shivan Dragon', 'Spikefield Hazard', 'Invigorate', 'Murderous Redcap', 'Caravan Vigil', 'Calciform Pools', 'Hypergenesis', 'Prophet of Kruphix', 'Voltage Surge', 'Ad Nauseam', 'Frontier Bivouac', 'Jolrael, Mwonvuli Recluse', 'Izzet Charm', 'Liliana Vess', 'Rule of Law', 'Dripping-Tongue Zubera', 'King of the Pride', 'Gateway Plaza', 'Tocatli Honor Guard', 'Ranger of Eos', 'Talisman of Conviction', 'Groundswell', 'Cursed Totem', 'Glimpse of Tomorrow', 'Zhalfirin Void', 'Falkenrath Gorger', 'Basking Rootwalla', 'Smallpox', 'Blighted Agent', 'Filigree Angel', 'Delver of Secrets', 'Call of the Herd', 'One with Nothing', 'Chasm Skulker', 'Mikokoro, Center of the Sea', 'Hagra Mauling', 'Raze the Effigy', 'Proclamation of Rebirth', 'Ral Zarek', 'Lifespinner', 'Elvish Mystic', 'Tectonic Reformation', 'Eidolon of Countless Battles', 'Force of Nature', 'Warstorm Surge', 'Fireball', 'Desperate Ritual', 'Quicksilver Gargantuan', 'Kaleidoscorch', 'Bloodchief''s Thirst', 'Battlefield Forge', 'Desolate Lighthouse', 'Needle Spires', 'Rotten Reunion', 'Reap the Past', 'Qasali Pridemage', 'Bloodline Keeper', 'Sylvan Library', 'Prahv, Spires of Order', 'Soulherder', 'Kumano Faces Kakkazan', 'Undead Butler', 'Saw It Coming', 'Solitary Confinement', 'Retreat to Hagra', 'Reality Ripple', 'Abrade', 'Curse of the Pierced Heart', 'Runed Halo', 'Morselhoarder', 'Regrowth', 'Thraben Inspector', 'Bala Ged Recovery', 'Rift Sower', 'Blasphemous Act', 'Wild Mongrel', 'Prey''s Vengeance', 'Reckoner''s Bargain', 'Birds of Paradise', 'Briarbridge Patrol', 'Resurgent Belief', 'Mistcutter Hydra', 'Death Baron', 'Harbinger of the Tides', 'Conflagrate', 'Ash Zealot', 'Mirrorpool', 'Hypnotic Specter', 'Mistvault Bridge', 'Temple of Silence', 'Breya''s Apprentice', 'Dark Ritual', 'Lead the Stampede', 'Obstinate Baloth', 'Timely Reinforcements', 'Whip of Erebos', 'Kami of False Hope', 'Kin-Tree Invocation', 'Arrogant Wurm', 'Barrin, Tolarian Archmage', 'Molten Slagheap', 'Darksteel Colossus', 'Tolsimir, Friend to Wolves', 'Detention Sphere', 'Pillage', 'Varragoth, Bloodsky Sire', 'Dragon Mantle', 'Nomad Outpost', 'Sanguine Statuette', 'Necrotic Ooze', 'Cabal Stronghold', 'Realm Razer', 'Pyromancer''s Swath', 'Colossification', 'Cabal Therapist', 'Assault Strobe', 'Akroma, Angel of Fury', 'Myr Incubator', 'Gatekeeper of Malakir', 'Mizzium Skin', 'Lightning Strike', 'Mind Rake', 'Distended Mindbender', 'Nature''s Lore', 'Skylasher', 'Vault of the Archangel', 'Chandra, Fire Artisan', 'Mystifying Maze', 'Asylum Visitor', 'Snow-Covered Plains', 'Declaration in Stone', 'Experimental Frenzy', 'Rakdos Charm', 'Nezahal, Primal Tide', 'Temple of Abandon', 'Arguel''s Blood Fast', 'Tombstalker', 'Mist-Syndicate Naga', 'Animate Dead', 'Possibility Storm', 'Phyrexian Dreadnought', 'Knight of the White Orchid', 'That Which Was Taken', 'Deep Analysis', 'Lodestone Golem', 'Castigate', 'Silvergill Adept', 'Lathliss, Dragon Queen', 'Glimmerpost', 'Regal Caracal', 'Irencrag Pyromancer', 'Dryad Militant', 'Sram''s Expertise', 'Cosima, God of the Voyage', 'Gavony Township', 'Raven''s Crime', 'Cloudpost', 'Ominous Seas', 'Falkenrath Aristocrat', 'Collected Conjuring', 'Prophetic Bolt', 'Myojin of Infinite Rage', 'Shrieking Affliction', 'Unholy Heat', 'Faithful Mending', 'Talisman of Impulse', 'Rabbit Battery', 'Savra, Queen of the Golgari', 'Cathar Commando', 'Warleader''s Helix', 'Mistvein Borderpost', 'Day of Judgment', 'Pride Sovereign', 'Rishadan Dockhand', 'Tireless Provisioner', 'Hero of Precinct One', 'See the Truth', 'Furyblade Vampire', 'Outland Liberator', 'Steel Overseer', 'Flourishing Fox', 'Ilysian Caryatid', 'Azorius Charm', 'Sigil Blessing', 'Michiko''s Reign of Truth', 'Wild Cantor', 'Fire-Lit Thicket', 'Demigod of Revenge', 'Blade Splicer', 'Kami''s Flare', 'Vivid Marsh', 'Gray Merchant of Asphodel', 'Thirst for Discovery', 'Sea Gate Wreckage', 'Snow-Covered Forest', 'Elvish Visionary', 'Obscura Charm', 'Reverent Hoplite', 'Acolyte of Affliction', 'Bump in the Night', 'Hard Evidence', 'Sandsteppe Citadel', 'Gitaxian Probe', 'Wooded Bastion', 'Commune with the Gods', 'Odds // Ends', 'Permeating Mass', 'Ritual of Soot', 'Steel Sabotage', 'Bone Shards', 'Goblin Dark-Dwellers', 'Flame Slash', 'Glacial Fortress', 'Bronzehide Lion', 'Forgotten Cave', 'Woodland Champion', 'Disenchant', 'Spirited Companion', 'Gilded Lotus', 'Hymn to Tourach', 'Grapeshot', 'Rustvale Bridge', 'Vampire Nighthawk', 'Glen Elendra Archmage', 'Trostani''s Summoner', 'Naya Hushblade', 'Flame Javelin', 'Goblin Bombardment', 'Boros Reckoner', 'Riveteers Charm', 'Fading Hope', 'Tymaret, Chosen from Death', 'He Who Hungers', 'Anticognition', 'Kazandu Mammoth', 'Temple of Malady', 'Dread Return', 'Nullpriest of Oblivion', 'Essence Flux', 'Patchwork Automaton', 'Graf Mole', 'Din of the Fireherd', 'Dictate of Kruphix', 'Salvage Titan', 'Ichorclaw Myr', 'Talisman of Resilience', 'Blackmail', 'Palace Siege', 'Boros Signet', 'Drown in Sorrow', 'Captivating Vampire', 'Crystal Shard', 'Lightning Rift', 'Elvish Piper', 'Izzet Signet', 'Heartmender', 'Lava Dart', 'Darkmoss Bridge', 'Consuming Vapors', 'Cleansing Wildfire', 'Pirate''s Pillage', 'Treasure Cruise', 'Lochmere Serpent', 'Genesis', 'Approach of the Second Sun', 'Expansion // Explosion', 'Jokulhaups', 'Memory Lapse', 'Treacherous Blessing', 'Meteor Golem', 'Esper Charm', 'Chandra, Pyromaster', 'Alchemist''s Vial', 'Merfolk Windrobber', 'Skymarcher Aspirant', 'Watcher for Tomorrow', 'Wall of Omens', 'Carnophage', 'Faerie Vandal', 'Porphyry Nodes', 'Wrench Mind', 'Ignite Memories', 'Jeskai Ascendancy', 'Electrolyze', 'Touch the Spirit Realm', 'Sylvan Advocate', 'Nylea''s Presence', 'Blacklance Paragon', 'Momentary Blink', 'Vivid Crag', 'Omen of the Sun', 'Liliana''s Specter', 'Zetalpa, Primal Dawn', 'Cleansing Nova', 'Vivid Meadow', 'Grisly Salvage', 'Howling Mine', 'Dire Tactics', 'Sejiri Shelter', 'Temple of Triumph', 'Tectonic Giant', 'Tormenting Voice', 'Oversoul of Dusk', 'Cartel Aristocrat', 'Yarok''s Fenlurker', 'Temple of Malice', 'Shriekmaw', 'Security Bypass', 'Vedalken Shackles', 'Soaring Thought-Thief', 'Satyr Wayfinder', 'Myr Battlesphere', 'Grimdancer', 'Beastcaller Savant', 'Slagwoods Bridge', 'Condemn', 'Josu Vess, Lich Knight', 'Judge''s Familiar', 'Experimental Overload', 'Angel of Sanctions', 'Artful Dodge', 'Jhoira''s Familiar', 'Revoke Existence', 'Platinum Angel', 'Lonely Sandbar', 'High-Speed Hoverbike', 'Asceticism', 'Reinforced Ronin', 'Earthshaker Khenra', 'Fauna Shaman', 'Invade the City', 'Dragonspark Reactor', 'Experimental Synthesizer', 'Veinfire Borderpost', 'Powerstone Shard', 'Stasis Snare', 'Elemental Bond', 'Consume the Meek', 'Izzet Guildgate', 'Blightning', 'Warkite Marauder', 'Brokers Hideout', 'Greater Good', 'Riftwing Cloudskate', 'Opt', 'Tidespout Tyrant', 'Terminus', 'Trace of Abundance', 'Angel''s Grace', 'Sunblade Samurai', 'Field of Ruin', 'Fallen Shinobi', 'Negate', 'Razortide Bridge', 'Dovin Baan', 'Glass Casket', 'Skyclave Cleric', 'Sylvan Primordial', 'Earthquake', 'Oona''s Blackguard', 'Bloodbraid Elf', 'Mystical Teachings', 'Fieldmist Borderpost', 'Secluded Glen', 'Smokestack', 'Stromkirk Noble', 'Fire Covenant', 'Kitchen Imp', 'Decree of Justice', 'Tyrant of Discord', 'Hornet Queen', 'Ponder', 'Tendrils of Agony', 'Fact or Fiction', 'Vivid Grove', 'Satyr Hoplite', 'Queza, Augur of Agonies', 'Become Immense', 'Dreadhorde Invasion', 'Moonhold', 'Good-Fortune Unicorn', 'Unsubstantiate', 'Just the Wind', 'The Flame of Keld', 'Gossamer Chains', 'Vendetta', 'Drift of Phantasms', 'Elderfang Ritualist', 'Midnight Clock', 'Maestros Charm', 'Loyal Sentry', 'It That Betrays', 'Golgari Rot Farm', 'Secluded Steppe', 'Hostage Taker', 'Arcane Sanctum', 'Sol Talisman', 'Exhaustion', 'Pieces of the Puzzle', 'Dread', 'Stirring Wildwood', 'Caves of Koilos', 'Tendo Ice Bridge', 'Retreat to Kazandu', 'Dakmor Salvage', 'Barren Moor', 'Discovery // Dispersal', 'Fleecemane Lion', 'Flame Rift', 'Wight', 'Ajani, Caller of the Pride', 'Gargoyle Castle', 'Grim Lavamancer', 'Voldaren Epicure', 'Safewright Quest', 'Erebos''s Intervention', 'Fiery Temper', 'Sylvan Anthem', 'Silverbluff Bridge', 'Drannith Stinger', 'Semblance Anvil', 'Arcbound Ravager', 'Spark Spray', 'Crooked Custodian', 'Chain of Plasma', 'Seal of Removal', 'Ranger''s Guile', 'Kessig Wolf Run', 'Improbable Alliance', 'Warriors'' Lesson', 'Soulflayer', 'Circular Logic', 'Moon-Circuit Hacker', 'Viscera Seer'))) 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, 68.1, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (60.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Shrapnel Blast', 'Kami of False Hope', 'Guild Globe', 'Universal Automaton', 'Atris, Oracle of Half-Truths', 'The Birth of Meletis', 'Sandsteppe Citadel', 'Experimental Synthesizer', 'Deep Analysis', 'Bala Ged Recovery', 'Sylvan Primordial', 'Discovery // Dispersal', 'Staggering Insight', 'Hive Mind', 'Wildfield Borderpost', 'Resurgent Belief', 'Expansion // Explosion', 'Psychatog', 'Dovin Baan', 'Plea for Guidance', 'Demonic Embrace', 'Rift Sower', 'Strike It Rich', 'Caves of Koilos', 'Dragonspark Reactor', 'Oyobi, Who Split the Heavens', 'Obstinate Baloth', 'Memory Lapse', 'Invoke Calamity', 'Eidolon of Countless Battles', 'Myr Incubator', 'Figure of Destiny', 'Warleader''s Helix', 'Chasm Skulker', 'Izzet Signet', 'Vindicate', 'Shrine of Burning Rage', 'Colossification', 'Moonhold', 'Asceticism', 'Gather the Townsfolk', 'Labyrinth of Skophos', 'Heartless Act', 'High-Speed Hoverbike', 'Liliana Vess', 'Midnight Reaper', 'Deliberate', 'Lupine Prototype', 'Colossal Skyturtle', 'Linvala, the Preserver', 'Vision Skeins', 'Mire''s Grasp', 'Lavinia of the Tenth', 'Sigil Blessing', 'Radiant Fountain', 'Wooded Bastion', 'Shriekmaw', 'Searing Spear', 'Gaea''s Revenge', 'Piper of the Swarm', 'Dimir Signet', 'Ram Through', 'Infernal Grasp', 'Drift of Phantasms', 'Buried Alive', 'Condemn', 'The Underworld Cookbook', 'Sokenzan Smelter', 'Flourishing Fox', 'Spectra Ward', 'Wavesifter', 'Spirited Companion', 'Ponder', 'Tymaret, Chosen from Death', 'Spear of Heliod', 'Arrogant Bloodlord', 'Big Score', 'Mirrorshell Crab', 'Stromkirk Noble', 'Hateful Eidolon', 'Spellweaver Helix', 'Skybridge Towers', 'Mistcutter Hydra', 'Esper Charm', 'Ingenious Infiltrator', 'Angel of Glory''s Rise', 'Grand Arbiter Augustin IV', 'Shivan Dragon', 'Voldaren Epicure', 'Harabaz Druid', 'Debtors'' Knell', 'Improbable Alliance', 'Ranger''s Guile', 'Erebos''s Intervention', 'Drossforge Bridge', 'Frontier Bivouac', 'Tatsunari, Toad Rider', 'Terramorphic Expanse', 'Concerted Defense', 'Platinum Angel', 'Hydra Broodmaster', 'Thraben Inspector', 'Raze the Effigy', 'General Ferrous Rokiric', 'Wilt-Leaf Liege', 'Eldrazi Conscription', 'Mistvein Borderpost', 'Intangible Virtue', 'Arcanis the Omnipotent', 'Grimdancer', 'Cleansing Nova', 'Ghost Quarter', 'Fblthp, the Lost', 'Spark Spray', 'Generous Visitor', 'Shardless Agent', 'Boomerang', 'Thirst for Meaning', 'Kuldotha Forgemaster', 'Security Bypass', 'Argent Sphinx', 'Forgotten Cave', 'Goblin Dark-Dwellers', 'Essence Flux', 'Restore Balance', 'Inscription of Ruin', 'Prahv, Spires of Order', 'Dragon Mantle', 'Talisman of Resilience', 'Dryad Militant', 'Commune with the Gods', 'Ilysian Caryatid', 'Seaside Citadel', 'Swallow Whole', 'Hard Evidence', 'Cruel Ultimatum', 'Pyromancer''s Swath', 'Tombstalker', 'Cathartic Pyre', 'Maestros Charm', 'Graf Mole', 'Snowfield Sinkhole', 'Cleansing Wildfire', 'Ancestral Anger', 'Vivid Marsh', 'Boros Reckoner', 'Wrench Mind', 'Orgg', 'Mizzium Skin', 'Spikefield Hazard', 'Sylvan Anthem', 'Bogardan Hellkite', 'Arc-Slogger', 'Putrid Goblin', 'Dragonskull Summit', 'Desperate Ritual', 'Ondu Cleric', 'Relentless Rats', 'Quest for Pure Flame', 'Hunted Nightmare', 'Early Frost', 'Dread Fugue', 'Forbidden Alchemy', 'Outland Liberator', 'Lodestone Golem', 'Demigod of Revenge', 'Irencrag Feat', 'Memnarch', 'Vampire Opportunist', 'Chromatic Lantern', 'Azorius Charm', 'Falkenrath Aristocrat', 'Blossoming Calm', 'Temple of Triumph', 'Mirror Entity', 'Cartel Aristocrat', 'Jokulhaups', 'Vivid Meadow', 'Dread', 'Tomb of Urami', 'Thaumatic Compass', 'Akroma''s Memorial', 'Raging Ravine', 'Mind''s Desire', 'Mouth // Feed', 'Oath of Gideon', 'Llanowar Elves', 'Canyon Slough', 'Wonder', 'Foreboding Ruins', 'Terminus', 'Insolent Neonate', 'Demonic Dread', 'Cabal Therapist', 'Elemental Bond', 'Barrin, Tolarian Archmage', 'Viscera Seer', 'Dual Strike', 'Izzet Boilerworks', 'Electrolyze', 'Talisman of Unity', 'Vampire Lacerator', 'Quirion Dryad', 'Safewright Quest', 'Dire Tactics', 'Harmonize', 'Earthquake', 'Rustvale Bridge', 'Ral, Storm Conduit', 'Infinite Obliteration', 'Into the Story', 'Retraction Helix', 'Galvanic Relay', 'Hypnotic Specter', 'Nomad Outpost', 'Veinfire Borderpost', 'Tanglepool Bridge', 'Nested Shambler', 'Murmuring Mystic', 'Ancient Stirrings', 'Wrath of God', 'First-Sphere Gargantua', 'Temple of Enlightenment', 'Saw It Coming', 'Dreg Mangler', 'Lavaclaw Reaches', 'Experimental Frenzy', 'Karn''s Temporal Sundering', 'Ulvenwald Mysteries', 'Failure // Comply', 'Jwari Shapeshifter', 'Temple of Silence', 'Barrenton Medic', 'Artful Dodge', 'Solfatara', 'Battlefield Forge', 'Daxos of Meletis', 'Darksteel Colossus', 'Desecration Demon', 'Jhoira''s Familiar', 'Sky Hussar', 'Fireblade Charger', 'Hurricane', 'Viashino Pyromancer', 'Angel of Despair', 'Elderfang Ritualist', 'Mogg War Marshal', 'Sire of Insanity', 'Lumbering Falls', 'Nylea''s Presence', 'Fertile Ground', 'Jace, Memory Adept', 'Undead Butler', 'Sejiri Shelter', 'Barren Moor', 'Hagra Mauling', 'Otherworldly Gaze', 'Timely Reinforcements', 'Mangara of Corondor', 'Lich''s Mastery', 'Dryad''s Revival', 'Kazandu Blademaster', 'Rise and Shine', 'Faerie Miscreant', 'Acolyte of Affliction', 'Jhoira, Weatherlight Captain', 'Satyr Hoplite', 'Palace Siege', 'Oversoul of Dusk', 'Bygone Bishop', 'Gaea''s Will', 'Cloudpost', 'Asmodeus the Archfiend', 'Chain Lightning', 'Necrotic Ooze', 'Axgard Armory', 'Temple of Plenty', 'Expedition Envoy', 'Tamiyo''s Safekeeping', 'Mind Rake', 'Firespout', 'Approach of the Second Sun', 'Howling Mine', 'Think Twice', 'Skymarcher Aspirant', 'Faerie Vandal', 'Abrade', 'Ajani, Caller of the Pride', 'Dakmor Salvage', 'Mishra''s Factory', 'Mist-Syndicate Naga', 'Ethersworn Canonist', 'Timeless Witness', 'Cursecatcher', 'Teferi, Mage of Zhalfir', 'Bloodbraid Elf', 'Uncharted Haven', 'Archway Commons', 'Champion of the Parish', 'Stubborn Denial', 'Diregraf Ghoul', 'Urza''s Ruinous Blast', 'Slitherhead', 'Tymaret Calls the Dead', 'Nivmagus Elemental', 'Dead Weight', 'Tyrant''s Scorn', 'Lay of the Land', 'Seething Song', 'Burning of Xinye', 'Dusk Legion Zealot', 'Sylvan Library', 'Skeletal Swarming', 'Izoni, Thousand-Eyed', 'Kin-Tree Invocation', 'Mystical Teachings', 'Pyretic Ritual', 'Smallpox', 'Primal Surge', 'Lashwrithe', 'Dream Trawler', 'Spell Pierce', 'Growth-Chamber Guardian', 'Scab-Clan Berserker', 'Molten Slagheap', 'Crystal Shard', 'Grapeshot', 'Lifespinner', 'Vampire Nighthawk', 'Sorcerer Class', 'Thrumming Stone', 'Sylvan Awakening', 'Eldrazi Mimic', 'Lena, Selfless Champion', 'Tolsimir Wolfblood', 'Reality Ripple', 'Master of Death', 'Dark Ritual', 'Selesnya Sanctuary', 'Kumano Faces Kakkazan', 'Detention Sphere', 'Obsessive Search', 'Moment of Craving', 'Diabolic Edict', 'Vedalken Shackles', 'Traxos, Scourge of Kroog', 'Caravan Vigil', 'Search for Tomorrow', 'Drannith Stinger', 'Sign in Blood', 'Retreat to Kazandu', 'Faithful Mending', 'Bone Shards', 'Conclave Tribunal', 'Myr Battlesphere', 'Zhalfirin Void', 'Day of Judgment', 'Oust', 'Assault Strobe', 'Angel of Sanctions', 'Fauna Shaman', 'Suture Priest', 'Decree of Justice', 'Ensoul Artifact', 'Gateway Plaza', 'Champion of Wits', 'Porphyry Nodes', 'Primal Amulet', 'Kabira Takedown', 'Den Protector', 'Overwhelming Denial', 'Logic Knot', 'Rite of Oblivion', 'Oracle of Mul Daya', 'Ravenous Chupacabra', 'Ethersworn Sphinx', 'Castigate', 'Loxodon Smiter', 'Secluded Glen', 'Worst Fears', 'Halimar Excavator', 'Bloodline Keeper', 'Fiery Temper', 'Overwhelming Splendor', 'Patchwork Automaton', 'Prowling Serpopard', 'Elixir of Immortality', 'Irregular Cohort', 'Valiant Rescuer', 'Maelstrom Nexus', 'Breya''s Apprentice', 'Furyblade Vampire', 'Blazing Specter', 'Shredded Sails', 'Lightning Rift', 'Dragonstorm', 'Cursed Totem', 'Thundering Raiju', 'Permeating Mass', 'Vivid Grove', 'Geomancer''s Gambit', 'Rakdos Charm', 'Iname, Life Aspect', 'Solitary Confinement', 'Captivating Vampire', 'Flame-Blessed Bolt', 'Garruk Wildspeaker', 'Sorin Markov', 'Hymn to Tourach', 'Evolving Wilds', 'Jeskai Ascendancy', 'Obscura Storefront', 'Darkmoss Bridge', 'Prognostic Sphinx', 'Phyrexian Dreadnought', 'Semblance Anvil', 'Maul of the Skyclaves', 'Elvish Visionary', 'Chandra Ablaze', 'Earthshaker Khenra', 'Eye of Nowhere', 'Prey''s Vengeance', 'Moon-Circuit Hacker', 'Calciform Pools', 'Alchemist''s Vial', 'Azor''s Gateway', 'Jwari Disruption', 'Ghirapur Aether Grid', 'Lose Focus', 'Forsake the Worldly', 'Glacial Fortress', 'Chandra, Pyromaster', 'Call of the Herd', 'Goldmire Bridge', 'Consuming Vapors', 'Revoke Existence', 'Gossamer Chains', 'Weathered Wayfarer', 'Force of Nature', 'Experimental Overload', 'Muddle the Mixture', 'Gloomshrieker', 'Bedevil', 'Din of the Fireherd', 'Kitchen Imp', 'Fusion Elemental', 'Game Trail', 'Altar''s Reap', 'Touch the Spirit Realm', 'Sanguine Sacrament', 'Mystic Monastery', 'Fabricate', 'Aphemia, the Cacophony', 'Retreat to Hagra', 'Thawing Glaciers', 'Morselhoarder', 'Nevermore', 'Blood Fountain', 'Drannith Healer', 'Genesis Wave', 'Revitalize', 'Shatter the Sky', 'Demon Bolt', 'Exhaustion', 'Unsubstantiate', 'Niambi, Esteemed Speaker', 'Prophetic Prism', 'Temple of Malice', 'Sacred Fire', 'Hornet Queen', 'Hushwing Gryff', 'Rabbit Battery', 'Augur of Bolas', 'Stony Strength', 'Hinterland Harbor', 'Death Baron', 'Tidespout Tyrant', 'Voltage Surge', 'Dripping-Tongue Zubera', 'Glen Elendra Archmage', 'Judge''s Familiar', 'Squadron Hawk', 'Rishkar, Peema Renegade', 'Coastal Tower', 'Explore', 'Ground Rift', 'Llanowar Wastes', 'Rule of Law', 'Goblin Electromancer', 'Lost Legacy', 'Judith, the Scourge Diva', 'Falkenrath Gorger', 'Jolrael, Mwonvuli Recluse', 'Frantic Search', 'Paralyze', 'Moss-Pit Skeleton', 'Forbid', 'Circular Logic', 'Incubation Druid', 'Contaminated Ground', 'Fling', 'Asylum Visitor', 'Queza, Augur of Agonies', 'Dictate of Kruphix', 'Metallic Rebuke', 'Chandra, Fire Artisan', 'Living Lore', 'Underworld Dreams', 'Storm Herald', 'Altar of the Brood', 'Expedite', 'Scrapheap Scrounger', 'Curse of Exhaustion', 'Temple of Malady', 'Stirring Wildwood', 'Arcane Sanctum', 'Sylvan Advocate', 'Abiding Grace', 'Ranger of Eos', 'Tectonic Reformation', 'Warriors'' Lesson', 'Gitaxian Probe', 'Ally Encampment', 'Costly Plunder', 'Runed Halo', 'Raven''s Crime', 'Blacklance Paragon', 'Feed the Swarm', 'Satyr Wayfinder', 'Disenchant', 'Tectonic Giant', 'Delver of Secrets', 'Tocatli Honor Guard', 'Sleight of Hand', 'Grisly Salvage', 'Bad River', 'Mentor of the Meek', 'Savra, Queen of the Golgari', 'Sram''s Expertise', 'Talisman of Conviction', 'Wingcrafter', 'Manabarbs', 'Field of Ruin', 'Erdwal Illuminator', 'Kaya, Ghost Assassin', 'Biting-Palm Ninja', 'Skyclave Cleric', 'Ghitu Encampment', 'Specter''s Shroud', 'Brokers Hideout', 'Egon, God of Death', 'Glimmer Bairn', 'Kessig Wolf Run', 'Vampiric Fury', 'Lightning Strike', 'Rebuild', 'Gargoyle Castle', 'Opt', 'Silverbluff Bridge', 'Golgari Rot Farm', 'Curse of the Pierced Heart', 'Elvish Mystic', 'Horde of Notions', 'Tempest Djinn', 'Martyr of Sands', 'Myojin of Infinite Rage', 'Quarantine Field', 'Falkenrath Forebear', 'Stasis Snare', 'Sphere of Safety', 'Rally the Ancestors', 'Persistent Specimen', 'Kabira Evangel', 'Woodland Cemetery', 'Sunblade Samurai', 'Swiftwater Cliffs', 'Battle of Wits', 'Future Sight', 'Incinerate', 'Riptide Laboratory', 'Phyrexian Revoker', 'Maestros Theater', 'Nyxathid', 'Mikokoro, Center of the Sea', 'Whip of Erebos', 'Dimir Aqueduct', 'Fading Hope', 'Soulflayer', 'Fireball', 'Crystallization', 'Gigadrowse', 'Coiling Oracle', 'Liliana''s Specter', 'Jungle Shrine', 'Skirge Familiar', 'Eiganjo Uprising', 'Elvish Clancaller', 'Kaleidoscorch', 'Dead // Gone', 'Pooling Venom', 'Terrarion', 'Gideon Jura', 'Prophet of Kruphix', 'Duress', 'Slagwoods Bridge', 'Sterling Grove', 'Animist''s Awakening', 'Ritual of Soot', 'Dimir Charm', 'That Which Was Taken', 'Etherium Sculptor', 'Thought Scour', 'Orzhov Signet', 'Kambal, Consul of Allocation', 'Worldgorger Dragon', 'Iname, Death Aspect', 'Dread Return', 'Needle Spires', 'Blasphemous Act', 'Skylasher', 'Walk the Aeons', 'Genesis Hydra', 'Briarbridge Patrol', 'Tidehollow Strix', 'Counterflux', 'Radiant Flames', 'Ornithopter of Paradise', 'Verdant Command', 'Hero of Precinct One', 'Blessed Alliance', 'Midnight Clock', 'Treasure Cruise', 'Jace Beleren', 'Cosima, God of the Voyage', 'Salvage Titan', 'Skyclave Shade', 'Howltooth Hollow', 'Orim''s Chant', 'Urza''s Factory', 'Kjeldoran Outpost', 'Zealous Persecution', 'Season of Growth', 'Liege of the Tangle', 'Vivid Creek', 'Trace of Abundance', 'Zur''s Weirding', 'Spinerock Knoll', 'Razortide Bridge', 'Angel''s Grace', 'Lonis, Cryptozoologist', 'Elvish Piper', 'Stormchaser Drake', 'Beastcaller Savant', 'Abundant Harvest', 'Summer Bloom', 'Odds // Ends', 'Weaver of Harmony', 'Piranha Marsh', 'Reverent Hoplite', 'Blackmail', 'Reassembling Skeleton', 'Endless Horizons', 'Gavony Township', 'Repeal', 'Barbed Sextant', 'Powerstone Shard', 'Tormenting Voice', 'Invisible Stalker', 'Slumbering Tora', 'Rend Flesh', 'Kirtar''s Desire', 'Mobilized District', 'Jace, the Living Guildpact', 'Pirate''s Pillage', 'Devious Cover-Up', 'Greater Gargadon', 'Gruul Signet', 'Fire Covenant', 'He Who Hungers', 'Vivid Crag', 'Cathar Commando', 'Kami''s Flare', 'Evangel of Heliod', 'Illuminator Virtuoso', 'Arch of Orazca', 'Impostor of the Sixth Pride', 'Tendo Ice Bridge', 'Tendrils of Agony', 'Herbal Poultice', 'Vampire''s Kiss', 'Fae Offering', 'Pack Rat', 'Temple of Mystery', 'Abzan Charm', 'Izzet Charm', 'Dawn of Hope', 'Gilded Lotus', 'Magmatic Sinkhole', 'Mana Leak', 'Dragonsguard Elite', 'See the Truth', 'Falkenrath Pit Fighter', 'Secluded Steppe', 'Wall of Omens', 'Drowned Catacomb', 'Goblin Bombardment', 'Raise the Alarm', 'Firewild Borderpost', 'Oblivion Ring', 'Meteor Golem', 'Knight of the White Orchid', 'Scurry Oak', 'Oni-Cult Anvil', 'Mirrorpool', 'Vapor Snag', 'Rotten Reunion', 'Circle of Confinement', 'Laboratory Maniac', 'Proclamation of Rebirth', 'Temple of Deceit', 'Blazing Rootwalla', 'Mystic Snake', 'Slip Out the Back', 'Disciple of Bolas', 'Zenith Flare', 'Slagstorm', 'Lava Dart', 'Thirst for Discovery', 'Cosmos Elixir', 'Saproling Migration', 'Veteran Warleader', 'Regrowth', 'Hada Freeblade', 'Force of Rage', 'The Raven''s Warning', 'Slaughter Pact', 'Rise of the Hobgoblins', 'Ignite Memories', 'Sanguine Statuette', 'Hissing Quagmire', 'Rootbound Crag', 'Primal Command', 'Gatekeeper of Malakir', 'Incandescent Aria', 'Grim Lavamancer', 'Lochmere Serpent', 'Birds of Paradise', 'Intervention Pact', 'Consume the Meek', 'Nature''s Lore', 'Myth Realized', 'Jalira, Master Polymorphist', 'Mesmeric Fiend', 'Double Vision', 'Reckoner''s Bargain', 'Dramatic Finale', 'Crumbling Necropolis', 'Bloodchief''s Thirst', 'Metalwork Colossus', 'Negate', 'Vault of the Archangel', 'Regal Force', 'Snow-Covered Forest', 'Secluded Courtyard', 'Eternal Dragon', 'White Sun''s Zenith', 'Burst Lightning', 'Ivy Lane Denizen', 'Declaration in Stone', 'Conclave Mentor', 'Blackbloom Rogue', 'Unburial Rites', 'Yarok''s Fenlurker', 'Bile Blight', 'Vigor', 'Mire Triton', 'Animate Dead', 'Dennick, Pious Apprentice', 'Woodfall Primus', 'Kazandu Mammoth', 'Join the Dance', 'Fact or Fiction', 'Quicken', 'Glass Casket', 'Clattering Augur', 'Wirewood Herald', 'Ral Zarek', 'Keruga, the Macrosage', 'Fire-Lit Thicket', 'Temple of Epiphany', 'Trostani''s Summoner', 'Wandering Mind', 'Dreadhorde Invasion', 'Brain Freeze', 'Blue Sun''s Zenith', 'Myojin of Life''s Web', 'Lantern of the Lost', 'Ondu Inversion', 'Reinforced Ronin', 'Tolsimir, Friend to Wolves', 'Genesis', 'Sprite Dragon', 'Possibility Storm', 'Mistvault Bridge', 'Flame-Kin Zealot', 'Cultivate', 'Glimmerpost', 'Nezahal, Primal Tide', 'Mana Flare', 'Flame Slash', 'Boonweaver Giant', 'Fieldmist Borderpost', 'Magister of Worth', 'Fatestitcher', 'Arbor Elf', 'Teachings of the Kirin', 'Woodland Champion', 'Steel Sabotage', 'Conflagrate', 'Filigree Angel', 'Disciple of the Vault', 'Lead the Stampede', 'Boros Signet', 'Ghostly Flicker', 'Prophetic Bolt', 'Desolate Lighthouse', 'Clifftop Retreat', 'Thassa''s Intervention', 'Yahenni''s Expertise', 'Barbarian Ring', 'Champion of Dusk'))) 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, 60.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (77.9 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Paralyze', 'Spinerock Knoll', 'Clattering Augur', 'Electrostatic Field', 'Garruk Wildspeaker', 'Nissa, Worldwaker', 'Vigor', 'Lumbering Falls', 'Burst Lightning', 'Squadron Hawk', 'Consume the Meek', 'Sram''s Expertise', 'Goblin Anarchomancer', 'Ingenious Infiltrator', 'Expedition Envoy', 'Wirewood Herald', 'Diregraf Ghoul', 'Liliana''s Devotee', 'Battlefield Thaumaturge', 'Rend Flesh', 'Oyobi, Who Split the Heavens', 'Permeating Mass', 'Exhaustion', 'Dryad Militant', 'Bag of Holding', 'Suture Priest', 'Azorius Charm', 'Crumbling Necropolis', 'Howling Mine', 'Dread', 'Teysa, Orzhov Scion', 'Cathartic Pyre', 'Argent Sphinx', 'Tombstalker', 'Mind''s Desire', 'Cloud Key', 'Spirited Companion', 'Curse of Exhaustion', 'White Sun''s Zenith', 'Cruel Reality', 'Negate', 'Fertile Ground', 'Ilysian Caryatid', 'Colossal Skyturtle', 'Moment of Craving', 'Falkenrath Aristocrat', 'Stinkdrinker Bandit', 'Wrath of God', 'Ranger of Eos', 'Woodland Cemetery', 'Blossom Prancer', 'Mirror Entity', 'Soulflayer', 'Snowfield Sinkhole', 'Dakmor Salvage', 'Noose Constrictor', 'Ethersworn Canonist', 'Thassa''s Intervention', 'Flame-Kin Zealot', 'Conflagrate', 'Skyclave Shade', 'Invisible Stalker', 'Approach of the Second Sun', 'Cabal Therapist', 'Otherworldly Gaze', 'Fieldmist Borderpost', 'Rule of Law', 'Urza''s Ruinous Blast', 'Barren Moor', 'Double Vision', 'Batterbone', 'Incubation Druid', 'Lost Legacy', 'Dusk Legion Zealot', 'Sign in Blood', 'Staggering Insight', 'Moon-Circuit Hacker', 'Demon Bolt', 'Slagwoods Bridge', 'Mogg War Marshal', 'Oni-Cult Anvil', 'Fae Offering', 'Spikefield Hazard', 'See the Truth', 'Concerted Defense', 'Elvish Mystic', 'Gilded Lotus', 'Birds of Paradise', 'Boonweaver Giant', 'Quarantine Field', 'Nicol Bolas, Planeswalker', 'Chandra, Pyromaster', 'Expansion // Explosion', 'Mystic Snake', 'Trace of Abundance', 'Canyon Slough', 'Mystical Teachings', 'Oath of Liliana', 'Insolent Neonate', 'Halimar Excavator', 'Early Harvest', 'Reverent Hoplite', 'Teferi, Mage of Zhalfir', 'Myojin of Life''s Web', 'Sphere of Safety', 'Viscera Seer', 'Kaya, Ghost Assassin', 'Hurricane', 'Skymarcher Aspirant', 'Cosmos Elixir', 'Gruul Signet', 'Dreg Mangler', 'Boros Signet', 'Force of Nature', 'Arrogant Bloodlord', 'Jwari Disruption', 'Nivmagus Elemental', 'Thawing Glaciers', 'Prophetic Bolt', 'Walk the Aeons', 'Vapor Snag', 'Thaumatic Compass', 'Artisan of Forms', 'Needle Spires', 'Dire Tactics', 'Mindslaver', 'Mind Rake', 'Declaration in Stone', 'Magmatic Sinkhole', 'Research // Development', 'Vedalken Archmage', 'Patch Up', 'Elvish Visionary', 'Proclamation of Rebirth', 'Artisan of Kozilek', 'Biting-Palm Ninja', 'Skylasher', 'Ghirapur Aether Grid', 'Daxos of Meletis', 'Fusion Elemental', 'Jace, Memory Adept', 'Seething Song', 'Secluded Courtyard', 'Planar Bridge', 'Frontier Bivouac', 'Runechanter''s Pike', 'Blessed Alliance', 'Thrumming Stone', 'Liliana''s Specter', 'Selesnya Sanctuary', 'Abbot of Keral Keep', 'He Who Hungers', 'Forbidden Alchemy', 'Desperate Ritual', 'Slip Out the Back', 'Rakdos Headliner', 'Into the Roil', 'Tendrils of Agony', 'Dripping-Tongue Zubera', 'Grim Lavamancer', 'Servo Exhibition', 'Coiling Oracle', 'Vision Skeins', 'Growth-Chamber Guardian', 'Kuldotha Forgemaster', 'Earthquake', 'Goblin Dark-Dwellers', 'Explore', 'Curse of Thirst', 'Reap the Past', 'Unsubstantiate', 'Cursecatcher', 'Gather the Townsfolk', 'Odds // Ends', 'Thirst for Meaning', 'Rally the Ancestors', 'Temple of Deceit', 'Guild Globe', 'Timely Reinforcements', 'Ramunap Excavator', 'Jalira, Master Polymorphist', 'Dominating Vampire', 'Genesis', 'Sprite Dragon', 'Bone Shards', 'Chamber Sentry', 'Sylvan Anthem', 'Arrogant Wurm', 'Angel of Despair', 'Char', 'Reinforced Ronin', 'Drossforge Bridge', 'Firespout', 'Forbid', 'Commune with the Gods', 'Experimental Frenzy', 'Tireless Provisioner', 'Snow-Covered Forest', 'Raging Ravine', 'Improbable Alliance', 'Urza''s Factory', 'Secluded Glen', 'Signal Pest', 'Lavaclaw Reaches', 'Sacred Fire', 'Aqueous Form', 'Flame Slash', 'Nylea''s Presence', 'Dosan the Falling Leaf', 'Genesis Wave', 'Tocatli Honor Guard', 'Veteran Warleader', 'Asmodeus the Archfiend', 'Thermo-Alchemist', 'Carth the Lion', 'Plea for Guidance', 'Smallpox', 'Tidehollow Strix', 'Thrill of Possibility', 'Darkmoss Bridge', 'Loxodon Smiter', 'Saw It Coming', 'Game Trail', 'Kabira Evangel', 'Temple of Malady', 'Dark Ritual', 'Eye of Nowhere', 'Terminus', 'Vivid Grove', 'Counterflux', 'Blightning', 'Skybridge Towers', 'Woodfall Primus', 'Rite of Oblivion', 'Cryptic Caves', 'Master of Death', 'Searing Spear', 'Dryad''s Revival', 'Fabricate', 'Gloomshrieker', 'Endless One', 'Overwhelming Splendor', 'Ally Encampment', 'Yarok''s Fenlurker', 'Oblivion Ring', 'Pack Rat', 'Din of the Fireherd', 'Eidolon of Countless Battles', 'Stromkirk Noble', 'Asceticism', 'Vampire Opportunist', 'Incinerate', 'Tidal Warrior', 'Alchemist''s Vial', 'Faerie Miscreant', 'Temple of Mystery', 'Circle of Confinement', 'Eldrazi Conscription', 'Undead Butler', 'Edric, Spymaster of Trest', 'Thirst for Discovery', 'Dive Down', 'Search for Tomorrow', 'Dwarven Mine', 'Prahv, Spires of Order', 'Mistvein Borderpost', 'Sigil Blessing', 'Glass Casket', 'Intervention Pact', 'Diabolic Edict', 'Mirrodin Besieged', 'Obsessive Search', 'Renegade Map', 'Orzhov Signet', 'Pirate''s Pillage', 'Feed the Swarm', 'Torment of Scarabs', 'Memory Lapse', 'Gateway Plaza', 'Merfolk Windrobber', 'Niveous Wisps', 'Azor''s Gateway', 'Izzet Boilerworks', 'Silverbluff Bridge', 'Piper of the Swarm', 'Captain''s Claws', 'Briarbridge Patrol', 'Primal Command', 'Court Homunculus', 'Tormenting Voice', 'Phantasmal Form', 'Wooded Bastion', 'Radiant Fountain', 'Vampiric Fury', 'Mist-Syndicate Naga', 'Grim Haruspex', 'Foreboding Ruins', 'Rise and Shine', 'Hymn to Tourach', 'Fading Hope', 'Season of Growth', 'Arbor Elf', 'Temple of Epiphany', 'Ethersworn Sphinx', 'Chromatic Lantern', 'Weaver of Harmony', 'Boomerang', 'Asylum Visitor', 'Howltooth Hollow', 'Mishra''s Factory', 'Mangara of Corondor', 'Orim''s Chant', 'Merfolk Mistbinder', 'Ajani, Caller of the Pride', 'Reckoner''s Bargain', 'Unburial Rites', 'Elvish Piper', 'Oust', 'Tanglepool Bridge', 'High-Speed Hoverbike', 'Rotten Reunion', 'Gaea''s Revenge', 'Gigadrowse', 'Incandescent Aria', 'Graf Mole', 'Grand Arbiter Augustin IV', 'Kitchen Imp', 'Witch''s Cottage', 'Knight of the White Orchid', 'Abundant Harvest', 'Swiftwater Cliffs', 'Voltage Surge', 'Lochmere Serpent', 'Coralhelm Guide', 'Jeskai Ascendancy', 'Nether Traitor', 'Nightveil Predator', 'Revitalize', 'Weathered Wayfarer', 'Flame-Blessed Bolt', 'Ral, Storm Conduit', 'Evermind', 'Zealous Persecution', 'Hero of Precinct One', 'Chief Engineer', 'Terrarion', 'Dragonspark Reactor', 'Whip of Erebos', 'Furyblade Vampire', 'Galvanic Relay', 'Arcane Sanctum', 'Fire-Lit Thicket', 'Vault of the Archangel', 'Kin-Tree Invocation', 'Thought Erasure', 'Firewild Borderpost', 'Angel of Glory''s Rise', 'Maestros Charm', 'Blue Sun''s Zenith', 'Talisman of Unity', 'Regrowth', 'Snow-Covered Swamp', 'Chasm Skulker', 'Jace, the Living Guildpact', 'Opt', 'Lashwrithe', 'Herbal Poultice', 'Sol Talisman', 'Ral Zarek', 'Tymaret, Chosen from Death', 'Sterling Grove', 'Pyromancer''s Swath', 'Bloodchief''s Thirst', 'Deep Analysis', 'Essence Flux', 'Dread Fugue', 'Arc-Slogger', 'Restoration Angel', 'Dragon Mantle', 'Eldrazi Mimic', 'Oath of Gideon', 'Battle of Wits', 'Jolrael, Mwonvuli Recluse', 'Ghost Quarter', 'Wild Mongrel', 'Temple of Malice', 'Sorcerer Class', 'Moss-Pit Skeleton', 'Raise the Alarm', 'Expedite', 'Falkenrath Forebear', 'Touch the Spirit Realm', 'Hunted Nightmare', 'Barbed Sextant', 'Snow-Covered Plains', 'Desecration Demon', 'Axgard Armory', 'Bloodline Keeper', 'Shrapnel Blast', 'Neutralize', 'Eternal Dragon', 'Yahenni''s Expertise', 'Tatsunari, Toad Rider', 'Tide Shaper', 'Bitterheart Witch', 'Pyretic Ritual', 'Thornglint Bridge', 'Abzan Charm', 'Shrine of Burning Rage', 'Lava Dart', 'Dennick, Pious Apprentice', 'Murmuring Mystic', 'Stormchaser Drake', 'Altar''s Reap', 'Magister of Worth', 'Oracle of Mul Daya', 'Horrifying Revelation', 'Drowned Catacomb', 'Deploy the Gatewatch', 'Homestead Courage', 'Wandering Mind', 'Contaminated Ground', 'Drift of Phantasms', 'Vampire''s Kiss', 'Mire''s Grasp', 'Riddlesmith', 'Sokenzan Smelter', 'Curiosity', 'Trespasser''s Curse', 'Dead Weight', 'Palace Siege', 'Inevitable Betrayal', 'Ondu Inversion', 'Lifespinner', 'Goblin Bombardment', 'Blasphemous Act', 'Cathartic Reunion', 'Summer Bloom', 'Master of the Pearl Trident', 'Silvergill Adept', 'Cleansing Wildfire', 'Arcanis the Omnipotent', 'Jungle Shrine', 'Scrapheap Scrounger', 'Everdream', 'Midnight Clock', 'Sarcomancy', 'Sanguine Sacrament', 'Shard Volley', 'Kjeldoran Outpost', 'Ghostly Flicker', 'Flame Jab', 'Dimir Signet', 'Desperate Ravings', 'Slaughter Pact', 'Alms of the Vein', 'Call of the Conclave', 'Cursed Totem', 'Nezahal, Primal Tide', 'Heartless Act', 'Dovescape', 'Dread Return', 'Blossoming Calm', 'Disenchant', 'Etherium Sculptor', 'Icehide Golem', 'Sylvan Library', 'Crystal Shard', 'Cultivate', 'Sunblade Samurai', 'Sylvan Awakening', 'Hada Freeblade', 'Sire of Insanity', 'Mistcutter Hydra', 'Maestros Theater', 'Sky Hussar', 'Field of Ruin', 'Savra, Queen of the Golgari', 'Wingcrafter', 'Lantern of the Lost', 'Eiganjo Uprising', 'Prophet of Kruphix', 'Nested Shambler', 'Falkenrath Gorger', 'Trickbind', 'Glacial Fortress', 'Scab-Clan Berserker', 'Vivid Creek', 'Illuminator Virtuoso', 'Faerie Vandal', 'Rise of the Hobgoblins', 'Chandra Ablaze', 'Kazandu Mammoth', 'Hateful Eidolon', 'Bond of Insight', 'Ancient Stirrings', 'Tamiyo''s Safekeeping', 'Arcbound Mouser', 'Rabbit Battery', 'Stromkirk Captain', 'Glen Elendra Archmage', 'Gaea''s Will', 'Battlefield Forge', 'Necrotic Ooze', 'Selesnya Charm', 'Outland Liberator', 'Revoke Existence', 'Metalwork Colossus', 'Queza, Augur of Agonies', 'Dire-Strain Rampage', 'Animate Dead', 'Endbringer', 'Laboratory Maniac', 'Kessig Wolf Run', 'Geist-Honored Monk', 'Vilis, Broker of Blood', 'Inscription of Ruin', 'Hushwing Gryff', 'Burning of Xinye', 'Demonic Dread', 'Myth Realized', 'Umara Raptor', 'Runed Halo', 'Mizzium Mortars', 'General Ferrous Rokiric', 'Seaside Citadel', 'Future Sight', 'Rootbound Crag', 'Lightning Axe', 'Elixir of Immortality', 'Firebolt', 'Kessig Flamebreather', 'Obscura Storefront', 'Turn Aside', 'Call of the Herd', 'Judith, the Scourge Diva', 'Chandra, Fire Artisan', 'Iname, Life Aspect', 'Lavinia of the Tenth', 'Pooling Venom', 'Decree of Justice', 'Tendo Ice Bridge', 'Zur''s Weirding', 'Frantic Search', 'Mystic Monastery', 'Molten Slagheap', 'Waterfront District', 'Merrow Reejerey', 'Tempest Djinn', 'Omen of the Sun', 'Logic Knot', 'Retreat to Kazandu', 'Semblance Anvil', 'Prowling Serpopard', 'Putrid Goblin', 'Wilt-Leaf Liege', 'Spare Supplies', 'Dovin Baan', 'Kirtar''s Desire', 'Llanowar Wastes', 'Satyr Hoplite', 'Overwhelming Denial', 'Riptide Laboratory', 'Evangel of Heliod', 'Jace Beleren', 'Liliana Vess', 'Blazing Specter', 'Detention Sphere', 'Cathar Commando', 'Sleight of Hand', 'Rakdos Charm', 'Dimir Aqueduct', 'First-Sphere Gargantua', 'Lodestone Golem', 'Thief of Sanity', 'Quirion Dryad', 'Failure // Comply', 'Ground Rift', 'Vampire Lacerator', 'Mouth of Ronom', 'Pyroclasm', 'Possibility Storm', 'Ornithopter of Paradise', 'Iname, Death Aspect', 'Sylvan Advocate', 'Gossamer Chains', 'Fauna Shaman', 'Ash Zealot', 'Storm Herald', 'Rishadan Dockhand', 'Faithful Mending', 'Platinum Angel', 'Nyxathid', 'Persistent Specimen', 'Spawning Pool', 'Desolate Lighthouse', 'Pathrazer of Ulamog', 'Solfatara', 'Shivan Dragon', 'Raze the Effigy', 'Temple of Enlightenment', 'Dismal Backwater', 'Mirrorpool', 'Elvish Clancaller', 'Condemn', 'Ram Through', 'Artful Dodge', 'Obstinate Baloth', 'Kaleidoscorch', 'Judge''s Familiar', 'Valorous Stance', 'Zetalpa, Primal Dawn', 'Devious Cover-Up', 'Commit // Memory', 'Captivating Vampire', 'Tymaret Calls the Dead', 'Discovery // Dispersal', 'Psychatog', 'Lich''s Mastery', 'Steel Sabotage', 'Skeletal Swarming', 'Dictate of Kruphix', 'Hypnotic Specter', 'Haunted Fengraf', 'Trostani''s Summoner', 'Hotshot Mechanic', 'Stirring Wildwood', 'Glimmerpost', 'Scurry Oak', 'Barrenton Medic', 'Wavesifter', 'Arcbound Ravager', 'Out of Time', 'Conclave Mentor', 'Satyr Wayfinder', 'Cartel Aristocrat', 'Security Bypass', 'Salvage Titan', 'Gitaxian Probe', 'Erdwal Illuminator', 'Slumbering Tora', 'Strike It Rich', 'Wrench Mind', 'Rustvale Bridge', 'Myr Battlesphere', 'Grimdancer', 'Bedevil', 'Rishkar, Peema Renegade', 'Ugin''s Conjurant', 'Breya''s Apprentice', 'Stony Strength', 'Dawn of Hope', 'Gavony Township', 'Nevermore', 'Mana Flare', 'Esper Charm', 'Bogardan Hellkite', 'Animist''s Awakening', 'Leechridden Swamp', 'Infernal Grasp', 'Fireball', 'Bond of Revival', 'Crackling Drake', 'Bloodvial Purveyor', 'Skyclave Cleric', 'Stubborn Denial', 'Nomad Outpost', 'Conclave Tribunal', 'Invoke Calamity', 'Slitherhead', 'Demonic Embrace', 'Treacherous Blessing', 'The Underworld Cookbook', 'Morselhoarder', 'Vampire Envoy', 'Mindlink Mech', 'Wonder', 'Chain Lightning', 'Myr Incubator', 'Form of the Dragon', 'Nature''s Lore', 'Bala Ged Recovery', 'Rampant Growth', 'Earthshaker Khenra', 'Metallic Rebuke', 'Thraben Inspector', 'Mikokoro, Center of the Sea', 'Goldmire Bridge', 'The Raven''s Warning', 'Golgari Rot Farm', 'Sylvan Primordial', 'Evolving Wilds', 'Thundering Raiju', 'Doom Foretold', 'Kalastria Healer', 'Universal Automaton', 'Shelter', 'Teachings of the Kirin', 'Vivid Marsh', 'Consuming Vapors', 'Blood Fountain', 'Champion of Dusk', 'Greater Gargadon', 'Oversoul of Dusk', 'Saproling Migration', 'Nirkana Assassin', 'Generous Visitor', 'Honored Hydra', 'Clifftop Retreat', 'Geomancer''s Gambit', 'Ignite Memories', 'Forsake the Worldly', 'Beastcaller Savant', 'Vault Skirge', 'Purphoros''s Intervention', 'Patchwork Automaton', 'Silver-Fur Master', 'Egon, God of Death', 'Goblin Electromancer', 'Meteor Golem', 'Abrade', 'Voldaren Epicure', 'Vedalken Shackles', 'Demigod of Revenge', 'Cleansing Nova', 'Warriors'' Lesson', 'Primal Surge', 'Tomb of Urami', 'Kabira Takedown', 'Gatekeeper of Malakir', 'Curse of Death''s Hold', 'Mirrorshell Crab', 'Make Disappear', 'Dream Trawler', 'Tectonic Giant', 'Izoni, Thousand-Eyed', 'Underworld Dreams', 'Prognostic Sphinx', 'Aphemia, the Cacophony', 'Tenacious Dead', 'Slagstorm', 'Umara Entangler', 'Theater of Horrors', 'Erebos''s Intervention', 'Memnarch', 'Tolsimir Wolfblood', 'Scoured Barrens', 'Ulvenwald Mysteries', 'Disciple of the Vault', 'Dramatic Finale', 'Jhoira, Weatherlight Captain', 'Abiding Grace', 'Bile Blight', 'Darksteel Colossus', 'Fire Covenant', 'Tolsimir, Friend to Wolves', 'That Which Was Taken', 'Woodland Champion', 'Kunoros, Hound of Athreos', 'Hard Evidence', 'Manabarbs', 'Fireblade Charger', 'Anax, Hardened in the Forge', 'Mobilized District', 'Silumgar''s Command', 'Lead the Stampede', 'Blacklance Paragon', 'Spectra Ward', 'Mire Triton', 'Grisly Salvage', 'Endless Horizons', 'Champion of the Parish', 'Zulaport Cutthroat', 'Just the Wind', 'Hornet Queen', 'Debtors'' Knell', 'Kumano Faces Kakkazan', 'Sejiri Shelter', 'Assault Strobe', 'Curse of the Pierced Heart', 'Lena, Selfless Champion', 'Acolyte of Affliction', 'Atris, Oracle of Half-Truths', 'Worst Fears', 'Bloodfell Caves', 'Dreadhorde Invasion', 'Cordial Vampire', 'Nullpriest of Oblivion', 'Lonis, Cryptozoologist', 'Genesis Hydra', 'Dihada''s Ploy', 'Wedding Invitation', 'Worldgorger Dragon', 'Linvala, the Preserver', 'Cruel Ultimatum', 'Regal Force', 'Flame Rift', 'Spell Pierce', 'Hagra Mauling', 'Barbarian Ring', 'Lose Focus', 'Centaur Garden', 'Swallow Whole', 'Orgg', 'Curse of Misfortunes', 'Ponder', 'Talisman of Resilience', 'Porphyry Nodes', 'Figure of Destiny', 'Hidden Strings', 'Experimental Synthesizer', 'Martyr of Sands', 'Temple of Plenty', 'Traxos, Scourge of Kroog', 'Cartographer''s Survey', 'Auratouched Mage', 'Mana Leak', 'Day of Judgment', 'Labyrinth of Skophos', 'Phyrexian Dreadnought', 'Buried Ruin', 'Smokestack', 'Dead // Gone', 'Ajani Unyielding', 'Glimmer Bairn', 'Radiant Flames', 'Elemental Bond', 'Brokers Hideout', 'Viashino Pyromancer', 'Gods Willing', 'Ironroot Warlord', 'Experimental Overload', 'Gone Missing', 'Caves of Koilos', 'Think Twice', 'Dokuchi Silencer', 'Sylvan Scrying', 'Dragonsguard Elite', 'Sanguine Statuette', 'Myojin of Infinite Rage', 'Thought Scour', 'Arch of Orazca', 'Horde of Notions', 'Powerstone Shard', 'Early Frost', 'Quicken', 'Death Baron', 'Blackmail', 'Michiko''s Reign of Truth', 'Mistvault Bridge', 'Midnight Reaper', 'Llanowar Elves', 'Ritual of Soot', 'Ornithopter', 'Mizzium Skin', 'Quest for Pure Flame', 'Bojuka Brigand', 'Den Protector', 'Rebuild', 'Dual Strike', 'Basking Rootwalla', 'Cut // Ribbons', 'Harmonize', 'Join the Dance', 'Altar of the Brood', 'Ancestral Anger', 'Vampire Nighthawk', 'Piranha Marsh', 'Intangible Virtue', 'Izzet Charm', 'Blood for Bones', 'Acquisitions Expert', 'Frantic Inventory', 'Fatestitcher', 'Elderfang Ritualist', 'Terramorphic Expanse', 'Ophidian Eye', 'Skullsnatcher', 'Deliberate', 'Ravenous Chupacabra', 'Lightning Strike', 'Harrow', 'Jhoira''s Familiar', 'Angel of Sanctions', 'Sungold Sentinel', 'Maelstrom Nexus', 'Relentless Rats', 'Keruga, the Macrosage', 'Champion of Wits', 'Shriekmaw', 'Dimir Charm', 'Mentor of the Meek', 'Restore Balance', 'Spear of Heliod', 'Prey''s Vengeance', 'Falkenrath Pit Fighter', 'Kopala, Warden of Waves', 'Hissing Quagmire', 'Fblthp, the Lost', 'Mesmeric Fiend', 'Verdant Command', 'Retraction Helix', 'Zhalfirin Void', 'Augur of Bolas', 'Calciform Pools', 'Blazing Rootwalla', 'Fling', 'Gruul Turf', 'Electrolyze', 'Into the Story', 'Akroma''s Memorial', 'Impostor of the Sixth Pride', 'Temple of Triumph', 'Retreat to Hagra', 'Putrid Imp', 'Deep Forest Hermit', 'Temple of Silence', 'Bump in the Night', 'Jokulhaups', 'Maul of the Skyclaves', 'Vivid Meadow', 'Doom Blade', 'Costly Plunder', 'Timeless Witness', 'Liege of the Tangle', 'Circular Logic', 'Veinfire Borderpost', 'Castigate', 'Ivy Lane Denizen', 'Tyrant''s Choice', 'Kazandu Blademaster', 'Ranger''s Guile', 'Cloudpost', 'Grapeshot', 'Gideon Jura', 'Forgotten Cave', 'Soaring Thought-Thief', 'Spellweaver Helix', 'Tempered Steel', 'Mystifying Maze', 'Blackbloom Rogue', 'Zombie Infestation', 'Sandsteppe Citadel', 'Shardless Agent', 'Skirge Familiar', 'Mindsparker', 'Reality Ripple', 'Glimpse of Tomorrow', 'Uncharted Haven', 'Kami''s Flare', 'Kambal, Consul of Allocation', 'Vivid Crag', 'Boros Reckoner', 'Stasis Snare', 'Mycosynth Wellspring', 'Reassembling Skeleton', 'Fiery Temper', 'Ensoul Artifact', 'Primal Amulet', 'Barrin, Tolarian Archmage', 'Gargoyle Castle', 'Archfiend''s Vessel', 'Jwari Shapeshifter', 'Angel''s Grace', 'Muddle the Mixture', 'Solitary Confinement', 'Sorin Markov', 'Obliterate', 'Safewright Quest', 'Disciple of Bolas', 'Resurgent Belief', 'Necrogoyf', 'Pandemonium', 'Elspeth''s Nightmare', 'Dragonstorm', 'Hive Mind', 'Caravan Vigil', 'Talisman of Conviction', 'Mouth // Feed', 'Secluded Steppe', 'The Birth of Meletis', 'Irregular Cohort', 'Cosima, God of the Voyage', 'Hinterland Harbor', 'Bygone Bishop', 'Force of Rage', 'Fact or Fiction', 'Orcish Hellraiser', 'Wall of Omens', 'Coralhelm Commander', 'Immortal Servitude', 'Coastal Tower', 'Lupine Prototype', 'The Flame of Keld', 'Archway Commons', 'Kami of False Hope', 'Infinite Obliteration', 'Shatter the Sky', 'Wildfield Borderpost', 'Dragonskull Summit', 'Razortide Bridge', 'Repeal', 'Karn''s Temporal Sundering', 'Enduring Ideal', 'Living Lore', 'Filigree Angel', 'Vindicate', 'Bloodbraid Elf', 'Hydra Broodmaster', 'Saproling Burst', 'Vampire Socialite', 'Moonhold', 'Faithless Salvaging', 'Niambi, Esteemed Speaker', 'Gray Merchant of Asphodel', 'Buried Alive', 'Duress', 'Warleader''s Helix', 'Ghitu Encampment', 'Bad River', 'Lay of the Land', 'Colossification', 'Izzet Signet', 'Tyrant''s Scorn', 'Treasure Cruise', 'Drakuseth, Maw of Flames', 'Turnabout', 'Phyrexian Revoker', 'Specter''s Shroud', 'Rift Sower', 'Raven''s Crime', 'Goblin Wardriver', 'Crystallization', 'Ghitu Lavarunner', 'Prophetic Prism', 'Ondu Cleric', 'Tidespout Tyrant', 'Harabaz Druid', 'Delver of Secrets'))) 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, 77.9, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (61.3 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Curiosity', 'Drift of Phantasms', 'Skymarcher Aspirant', 'Underworld Dreams', 'Distended Mindbender', 'Flame Jab', 'Boon of Safety', 'Revitalize', 'Captain''s Claws', 'Paralyze', 'Season of Growth', 'Intervention Pact', 'Wild Cantor', 'Flame Slash', 'Chandra, Pyromaster', 'Detention Sphere', 'Proclamation of Rebirth', 'Stubborn Denial', 'Vision Skeins', 'Butcher Ghoul', 'Radha, Heart of Keld', 'Temple of Epiphany', 'Kumano Faces Kakkazan', 'Animist''s Awakening', 'Vampire Envoy', 'Momentary Blink', 'Transmogrify', 'Thornglint Bridge', 'Stone Rain', 'Endless One', 'Radiant Fountain', 'Riddlesmith', 'Furyblade Vampire', 'Immortal Servitude', 'Defy Gravity', 'Auratouched Mage', 'Opt', 'Mystic Snake', 'Hydra Broodmaster', 'Pyretic Ritual', 'Battlefield Thaumaturge', 'Incandescent Aria', 'Ancient Grudge', 'Vault of the Archangel', 'Alms of the Vein', 'Gone Missing', 'Rise of the Hobgoblins', 'Living Lore', 'Moss-Pit Skeleton', 'Quest for the Nihil Stone', 'Sterling Grove', 'Touch the Spirit Realm', 'Massive Might', 'Voldaren Stinger', 'Omen of the Forge', 'Mistvault Bridge', 'Chandra, Fire Artisan', 'Ponder', 'Triskelion', 'Ash Zealot', 'Iname, Death Aspect', 'Hypnotic Specter', 'Myth Realized', 'Foreboding Ruins', 'Coralhelm Guide', 'Desolation Twin', 'Walk the Aeons', 'Debtors'' Knell', 'Crumbling Necropolis', 'Declaration in Stone', 'Arch of Orazca', 'Thought Erasure', 'Flame-Kin Zealot', 'Blackbloom Rogue', 'Temple of Deceit', 'Stern Dismissal', 'Tempest Djinn', 'Dark Ritual', 'Reverent Hoplite', 'Slip Out the Back', 'Gideon''s Intervention', 'Emmara, Soul of the Accord', 'Prey''s Vengeance', 'Outland Liberator', 'Not of This World', 'Wildfield Borderpost', 'Oath of Gideon', 'Overwhelming Splendor', 'Snow-Covered Forest', 'Nirkana Assassin', 'Sarkhan the Mad', 'Gideon Jura', 'Teferi, Mage of Zhalfir', 'Fire Covenant', 'Cloud Key', 'Experimental Overload', 'Crack the Earth', 'Tidal Warrior', 'Incinerate', 'Dramatic Finale', 'Scrabbling Claws', 'Weaver of Harmony', 'Mistcutter Hydra', 'Memory''s Journey', 'Dragon Tempest', 'Eerie Interlude', 'Archaeomancer', 'Ugin''s Conjurant', 'Crystal Shard', 'Restore Balance', 'Tolsimir Wolfblood', 'Yarok''s Fenlurker', 'Nimble Larcenist', 'Conflagrate', 'Rally the Ancestors', 'Timeless Witness', 'Conqueror''s Pledge', 'Witching Well', 'Logic Knot', 'Martyr of Sands', 'Drowned Catacomb', 'Ghostly Flicker', 'Arrogant Bloodlord', 'Acolyte of Affliction', 'Boomerang', 'Read the Bones', 'Quiet Speculation', 'Kazandu Blademaster', 'Into the Story', 'Abzan Charm', 'Molten Slagheap', 'Urza''s Factory', 'Akroma''s Memorial', 'Cordial Vampire', 'Dreg Mangler', 'Kazandu Mammoth', 'Izzet Boilerworks', 'Spare Supplies', 'Midnight Reaper', 'Filigree Angel', 'Blood for Bones', 'Prophetic Prism', 'Grotag Bug-Catcher', 'Vampire Socialite', 'Blasphemous Act', 'Dovin Baan', 'Arcane Sanctum', 'Everflowing Chalice', 'Figure of Destiny', 'Counterflux', 'Bedevil', 'Mobilized District', 'Neutralize', 'Ethersworn Canonist', 'Flame Rift', 'Dire-Strain Rampage', 'Polymorph', 'Postmortem Lunge', 'Shrieking Affliction', 'Tidespout Tyrant', 'Fumigate', 'Ixalan''s Binding', 'Skybridge Towers', 'Selesnya Charm', 'Faithless Salvaging', 'Trace of Abundance', 'Cultivator of Blades', 'Repeal', 'Phantasmal Form', 'Primal Amulet', 'Firespout', 'Purphoros''s Intervention', 'Summer Bloom', 'Devouring Light', 'Call of the Herd', 'Temple of Triumph', 'Permeating Mass', 'Shelter', 'Myr Battlesphere', 'Spawning Pool', 'Gather the Townsfolk', 'Gitaxian Probe', 'Swallow Whole', 'Dragon''s Hoard', 'Lux Cannon', 'Blackmail', 'Basking Rootwalla', 'Sylvan Anthem', 'Contagion Engine', 'Lava Dart', 'Sandwurm Convergence', 'Liquimetal Torque', 'Vizier of the Menagerie', 'Vivid Creek', 'Laboratory Maniac', 'Deploy the Gatewatch', 'Enduring Ideal', 'Briarbridge Patrol', 'Feed the Swarm', 'High-Speed Hoverbike', 'Caves of Koilos', 'Planar Bridge', 'Nissa''s Pilgrimage', 'Perilous Research', 'Sun Droplet', 'Pack Rat', 'Oversoul of Dusk', 'Dennick, Pious Apprentice', 'Revoke Existence', 'Shrine of Burning Rage', 'Goblin Electromancer', 'Lashwrithe', 'Brainstone', 'Ophidian Eye', 'Rustvale Bridge', 'Collected Conjuring', 'Archway Commons', 'Marauding Raptor', 'Hunted Nightmare', 'Mystical Teachings', 'Ulvenwald Mysteries', 'Dakmor Salvage', 'Incubation Druid', 'Zealous Persecution', 'Stromkirk Noble', 'Make Disappear', 'Thirst for Meaning', 'Double Vision', 'Diregraf Ghoul', 'Daxos of Meletis', 'Broodmate Dragon', 'Angel''s Grace', 'Conclave Tribunal', 'Alchemist''s Refuge', 'Eiganjo Castle', 'Faerie Miscreant', 'Anoint', 'Weathered Wayfarer', 'Tooth and Nail', 'Westvale Abbey', 'Egon, God of Death', 'Bloodline Keeper', 'Lead the Stampede', 'Cryptic Caves', 'Infinite Obliteration', 'Elvish Mystic', 'Sinister Sabotage', 'Geist-Honored Monk', 'Desperate Ravings', 'Sanguine Sacrament', 'Adventuring Gear', 'Mystifying Maze', 'Surgespanner', 'Sacred Fire', 'Mentor of the Meek', 'Keruga, the Macrosage', 'Nevermore', 'Hidden Strings', 'Mephidross Vampire', 'Search for Tomorrow', 'Lost Legacy', 'Devious Cover-Up', 'Kessig Wolf Run', 'Edge of Autumn', 'Master of Death', 'Cartographer''s Survey', 'Glint Hawk', 'Zur''s Weirding', 'Phyrexian Revoker', 'Woodland Cemetery', 'Contaminated Ground', 'Elvish Piper', 'Gods Willing', 'Genesis Wave', 'Mikokoro, Center of the Sea', 'Migratory Greathorn', 'Tendrils of Agony', 'Ancestral Anger', 'Rift Sower', 'Universal Automaton', 'Shenanigans', 'Raze the Effigy', 'Hada Freeblade', 'Jace Beleren', 'Hostage Taker', 'Kjeldoran Outpost', 'Bone Splinters', 'Desolate Lighthouse', 'Tezzeret''s Gambit', 'Hindering Light', 'Conclave Mentor', 'Liliana Vess', 'Howling Mine', 'Asylum Visitor', 'Auspicious Starrix', 'Tyrant''s Choice', 'Bloodvial Purveyor', 'Izzet Charm', 'Mana Leak', 'Barrin, Tolarian Archmage', 'Irregular Cohort', 'Liege of the Tangle', 'Sejiri Shelter', 'Balustrade Spy', 'Shaman en-Kor', 'Arcanis the Omnipotent', 'Dread Fugue', 'Razortide Bridge', 'Shuko', 'Iname, Life Aspect', 'Wandering Mind', 'Mirrorshell Crab', 'Invert // Invent', 'Commit // Memory', 'Myr Incubator', 'Scoured Barrens', 'Vampire Opportunist', 'Windbrisk Heights', 'Colossal Skyturtle', 'Hanweir Garrison', 'Coalition Relic', 'Court Homunculus', 'Glimmerpost', 'Pooling Venom', 'Mind''s Desire', 'Tamiyo''s Safekeeping', 'Talisman of Conviction', 'Arcbound Mouser', 'Putrid Imp', 'Magister of Worth', 'Mission Briefing', 'Pirate''s Pillage', 'Semblance Anvil', 'Battlefield Forge', 'Colossification', 'Wrench Mind', 'Tectonic Giant', 'Realm Razer', 'Eidolon of Countless Battles', 'Ravenous Chupacabra', 'Terminus', 'Fertile Ground', 'Hieroglyphic Illumination', 'Glen Elendra Archmage', 'Darksteel Colossus', 'Earthshaker Khenra', 'Sunblade Samurai', 'Jhoira''s Familiar', 'Arrogant Wurm', 'Bontu''s Last Reckoning', 'Epic Experiment', 'Lupine Prototype', 'Teachings of the Kirin', 'Glint-Horn Buccaneer', 'Vivid Crag', 'Forbid', 'Gargoyle Castle', 'Cosmos Elixir', 'Consuming Vapors', 'Rotten Reunion', 'Den Protector', 'Magmatic Sinkhole', 'Thaumatic Compass', 'Jace, Cunning Castaway', 'Scrapheap Scrounger', 'Flame-Blessed Bolt', 'Tombstalker', 'Grim Haruspex', 'Fauna Shaman', 'Biting-Palm Ninja', 'Tyrant of Discord', 'Muddle the Mixture', 'Infernal Grasp', 'Dryad''s Revival', 'Artisan of Forms', 'Game Trail', 'Shigeki, Jukai Visionary', 'Retraction Helix', 'Tocatli Honor Guard', 'Asmodeus the Archfiend', 'Thief of Sanity', 'Never // Return', 'Brokers Hideout', 'Endbringer', 'Slagstorm', 'Gift of Estates', 'Uncharted Haven', 'Oust', 'Orgg', 'Evangel of Heliod', 'Jokulhaups', 'Ral Zarek', 'Golgari Rot Farm', 'Tymaret Calls the Dead', 'Aqueous Form', 'Bond of Revival', 'Brushfire Elemental', 'Riveteers Overlook', 'Gilded Lotus', 'Animate Dead', 'Labyrinth of Skophos', 'Firewild Borderpost', 'Beastcaller Savant', 'Coiling Oracle', 'Gaea''s Will', 'Boonweaver Giant', 'Hateful Eidolon', 'Reckoner''s Bargain', 'Lonely Sandbar', 'Mistveil Plains', 'Victim of Night', 'Frantic Search', 'Karn, Silver Golem', 'Spikefield Hazard', 'Cursecatcher', 'Cosima, God of the Voyage', 'Fieldmist Borderpost', 'Bojuka Brigand', 'Nightveil Predator', 'Scab-Clan Berserker', 'Necrogoyf', 'Needle Spires', 'Noose Constrictor', 'Dark Salvation', 'Acquisitions Expert', 'Falkenrath Aristocrat', 'Bone Shards', 'Vengeful Strangler', 'Solfatara', 'Oblivion Ring', 'Pillage', 'Black Sun''s Zenith', 'Gatekeeper of Malakir', 'Sorin Markov', 'Wing Shards', 'Retreat to Kazandu', 'Prahv, Spires of Order', 'Talisman of Resilience', 'Viashino Pyromancer', 'Michiko''s Reign of Truth', 'Ecstatic Awakener', 'Caravan Vigil', 'Champion of Dusk', 'Noxious Vapors', 'Guild Globe', 'Harabaz Druid', 'Goblin Dark-Dwellers', 'Expedite', 'Demigod of Revenge', 'Slitherhead', 'Oyobi, Who Split the Heavens', 'Veteran Warleader', 'Approach of the Second Sun', 'Falkenrath Pit Fighter', 'Divert', 'Fblthp, the Lost', 'Nissa, Worldwaker', 'Call of the Conclave', 'Cleansing Nova', 'Ancient Stirrings', 'Saw It Coming', 'Genesis Hydra', 'Eye of Nowhere', 'Horrifying Revelation', 'Vampire Nighthawk', 'Snow-Covered Plains', 'Barrenton Medic', 'Riot Control', 'Stirring Wildwood', 'Vindicate', 'Fire-Lit Thicket', 'Pull from Tomorrow', 'Delver of Secrets', 'Ram Through', 'Wayward Swordtooth', 'Base Camp', 'Insolent Neonate', 'Hymn to Tourach', 'Sprite Dragon', 'Tanglepool Bridge', 'Tide Shaper', 'Voltaic Key', 'Sky Hussar', 'Everdream', 'Hissing Quagmire', 'Deliberate', 'Ranger''s Guile', 'Worst Fears', 'The Raven''s Warning', 'Think Twice', 'The Birth of Meletis', 'Dimir Aqueduct', 'Fabricate', 'Cloudpost', 'Sprouting Thrinax', 'Goblin Bombardment', 'Horde of Notions', 'Wrath of God', 'Starlit Sanctum', 'Demonic Embrace', 'Sylvan Ranger', 'Temple of Malady', 'Silvergill Adept', 'Riveteers Charm', 'Prophetic Bolt', 'Mirrodin''s Core', 'Lochmere Serpent', 'Maul of the Skyclaves', 'Staggering Insight', 'Jalira, Master Polymorphist', 'Swiftwater Cliffs', 'Embodiment of Agonies', 'Queza, Augur of Agonies', 'Prophet of Kruphix', 'Ornithopter', 'Shard Volley', 'Nivmagus Elemental', 'Deadly Alliance', 'Breya''s Apprentice', 'Strength of Solidarity', 'Zhalfirin Void', 'Harmonize', 'Sylvan Scrying', 'Spear of Heliod', 'Sol Talisman', 'Brokkos, Apex of Forever', 'Eldrazi Conscription', 'Rune Snag', 'Arbor Elf', 'Phylath, World Sculptor', 'Nicol Bolas, Planeswalker', 'Daru Spiritualist', 'Clarion Spirit', 'Restoration Angel', 'Mirrorpool', 'Searing Spear', 'Treasure Cruise', 'Ajani''s Presence', 'Energy Arc', 'Gaea''s Revenge', 'Dismal Backwater', 'Cartel Aristocrat', 'Stream of Thought', 'Dominating Vampire', 'Thundering Raiju', 'Fiery Temper', 'Force of Rage', 'Fusion Elemental', 'Curse of Exhaustion', 'Fodder Tosser', 'Umara Entangler', 'Spellweaver Helix', 'Arcbound Ravager', 'Strategic Planning', 'Future Sight', 'Kabira Takedown', 'Reinforced Ronin', 'Bag of Holding', 'Mogg War Marshal', 'Lavinia of the Tenth', 'Esper Charm', 'Verdant Command', 'Talisman of Unity', 'Porphyry Nodes', 'Novice Occultist', 'Mire''s Grasp', 'Dragonlord''s Servant', 'Magister Sphinx', 'Lay of the Land', 'Quirion Dryad', 'Ghitu Encampment', 'Rite of Oblivion', 'Evermind', 'Favored Hoplite', 'Azami, Lady of Scrolls', 'Vivid Meadow', 'Endless Sands', 'Temple of Plenty', 'Prowling Serpopard', 'Eiganjo Uprising', 'Electrostatic Field', 'Mindlink Mech', 'Abiding Grace', 'Vivien''s Arkbow', 'Blacklance Paragon', 'Obsessive Search', 'Murderous Cut', 'Circular Logic', 'Disciple of Bolas', 'Sleight of Hand', 'General Ferrous Rokiric', 'Master of the Pearl Trident', 'Elixir of Immortality', 'Curse of the Pierced Heart', 'Obscura Charm', 'Waterfront District', 'Cruel Ultimatum', 'Talisman of Impulse', 'Vampire''s Kiss', 'Quest for Pure Flame', 'Unsubstantiate', 'Undercity Informer', 'Hinterland Harbor', 'Tymaret, Chosen from Death', 'Cathartic Pyre', 'Dusk Legion Zealot', 'Thrumming Stone', 'Blood Operative', 'Abrade', 'Illuminator Virtuoso', 'Lightning Strike', 'Join the Dance', 'Turn Aside', 'Explore', 'Forbidden Alchemy', 'Manabarbs', 'Astral Cornucopia', 'Ondu Inversion', 'Rampant Growth', 'Moonhold', 'Alchemist''s Vial', 'Boros Reckoner', 'Chief of the Foundry', 'Urza''s Ruinous Blast', 'Nylea''s Presence', 'Torment of Scarabs', 'Pollywog Symbiote', 'Secluded Glen', 'Fading Hope', 'Glimmer Bairn', 'Vigor', 'Pieces of the Puzzle', 'Elvish Clancaller', 'Hotshot Mechanic', 'Slaughter Pact', 'Persistent Specimen', 'Fatestitcher', 'Dread Return', 'Curse of Misfortunes', 'Armament Master', 'Duress', 'Skeletal Swarming', 'Elves of Deep Shadow', 'Possibility Storm', 'Tormenting Voice', 'Canyon Slough', 'Prohibit', 'Memnarch', 'Wirewood Herald', 'Hushwing Gryff', 'Forsake the Worldly', 'Terastodon', 'Bygone Bishop', 'Unburial Rites', 'Cursed Totem', 'Security Bypass', 'Bogardan Hellkite', 'Gigadrowse', 'Malakir Blood-Priest', 'Oath of Liliana', 'Temple of Malice', 'Argent Sphinx', 'Cathar Commando', 'Malakir Rebirth', 'Chandra Ablaze', 'War''s Toll', 'Desperate Ritual', 'Shrapnel Blast', 'Whip of Erebos', 'Blazing Specter', 'Temple of Enlightenment', 'Concerted Defense', 'Costly Plunder', 'Frantic Inventory', 'Wonder', 'Far // Away', 'Rishkar, Peema Renegade', 'Generous Visitor', 'Ritual of Soot', 'Dripping-Tongue Zubera', 'Glacial Fortress', 'Ethersworn Sphinx', 'He Who Hungers', 'Faithful Mending', 'Magistrate''s Scepter', 'Fireblade Charger', 'Improbable Alliance', 'Myr Servitor', 'Stasis Snare', 'Essence Capture', 'Saproling Migration', 'Falkenrath Gorger', 'Kalastria Healer', 'Knight of the White Orchid', 'Mystic Retrieval', 'Ingenious Infiltrator', 'Vampiric Fury', 'Spinerock Knoll', 'Chasm Skulker', 'Braingeyser', 'Bump in the Night', 'Disenchant', 'Ransack the Lab', 'Slag Strider', 'Atris, Oracle of Half-Truths', 'Circle of Confinement', 'Dragonskull Summit', 'Tendo Ice Bridge', 'Seal of Cleansing', 'Stromkirk Captain', 'Evolving Wilds', 'Skylasher', 'Glass Casket', 'Impostor of the Sixth Pride', 'Timely Reinforcements', 'Jwari Disruption', 'Synchronized Spellcraft', 'Frontier Bivouac', 'Altar''s Reap', 'Shardless Agent', 'Ravager''s Mace', 'Battle of Wits', 'Orzhov Basilica', 'Bala Ged Recovery', 'Warriors'' Lesson', 'Enter the God-Eternals', 'Pyroclasm', 'Kopala, Warden of Waves', 'Loyal Pegasus', 'Soulherder', 'Kambal, Consul of Allocation', 'Cleansing Wildfire', 'Metalwork Colossus', 'Mistvein Borderpost', 'Vapor Snag', 'Lavaclaw Reaches', 'The Underworld Cookbook', 'Etherium Sculptor', 'Sickening Shoal', 'Orb of Dragonkind', 'Kaleidoscorch', 'Selesnya Sanctuary', 'Tangled Florahedron', 'Take Inventory', 'Grindclock', 'Grand Arbiter Augustin IV', 'Mycosynth Wellspring', 'Merfolk Mistbinder', 'Viscera Seer', 'Nezahal, Primal Tide', 'Footfall Crater', 'Fact or Fiction', 'Fling', 'Bad River', 'Deep Forest Hermit', 'Midnight Clock', 'Batterbone', 'Delirium Skeins', 'Cabal Therapist', 'Stony Strength', 'Din of the Fireherd', 'Quicken', 'Mystic Monastery', 'Rishadan Dockhand', 'Maestros Theater', 'Resurgent Belief', 'Birds of Paradise', 'Secluded Steppe', 'Bond of Insight', 'Curse of Thirst', 'Barren Moor', 'Raven''s Crime', 'Hypergenesis', 'Snowfield Sinkhole', 'Jack-o''-Lantern', 'Altar of the Brood', 'Nether Traitor', 'Inevitable Betrayal', 'That Which Was Taken', 'Tomb of Urami', 'Buried Alive', 'Necroplasm', 'Kin-Tree Invocation', 'Raging Ravine', 'Kuldotha Forgemaster', 'Kira, Great Glass-Spinner', 'Servo Exhibition', 'Scurry Oak', 'Moon-Circuit Hacker', 'Tidehollow Strix', 'Gavony Township', 'Assault Strobe', 'Maestros Charm', 'Merfolk Looter', 'Silverbluff Bridge', 'Masked Bandits', 'Whispers of the Muse', 'Dovescape', 'Shalai, Voice of Plenty', 'Pulse of the Grid', 'Mindslaver', 'Clifftop Retreat', 'Acidic Slime', 'Dirge Bat', 'Kami''s Flare', 'Wooded Bastion', 'Mizzium Skin', 'See the Truth', 'Electrolyze', 'Consume the Meek', 'Desecration Demon', 'Izoni, Thousand-Eyed', 'Savra, Queen of the Golgari', 'Patchwork Automaton', 'Icehide Golem', 'Lumbering Falls', 'Smokestack', 'Decree of Justice', 'Blood Fountain', 'Nyxathid', 'Mirrodin Besieged', 'Mina and Denn, Wildborn', 'Angel of Glory''s Rise', 'Meteor Golem', 'Kher Keep', 'Field of Ruin', 'Wingcrafter', 'Farseek', 'Shatterskull Minotaur', 'Howltooth Hollow', 'Veinfire Borderpost', 'Experimental Synthesizer', 'Soulflayer', 'Mangara of Corondor', 'Linvala, the Preserver', 'Drossforge Bridge', 'Vampire Lacerator', 'Yahenni''s Expertise', 'Hatching Plans', 'Haunted Fengraf', 'Surge Node', 'Kabira Evangel', 'Failure // Comply', 'Blazing Rootwalla', 'Shivan Dragon', 'Loxodon Smiter', 'Gladecover Scout', 'Dictate of Kruphix', 'Winterthorn Blessing', 'Gossamer Chains', 'Vault Skirge', 'Edric, Spymaster of Trest', 'Myojin of Infinite Rage', 'Liliana''s Specter', 'Tatsunari, Toad Rider', 'Spell Pierce', 'Herbal Poultice', 'Force of Nature', 'Elspeth''s Nightmare', 'Condemn', 'Niambi, Esteemed Speaker', 'Oracle of Mul Daya', 'Suture Priest', 'Diabolic Revelation', 'Thought Scour', 'Sigil Blessing', 'Cultivate', 'Damping Engine', 'Plea for Guidance', 'Powerstone Shard', 'Psychatog', 'Eternal Dragon', 'Fiery Justice', 'Coastal Tower', 'Curse of Echoes', 'Skyship Stalker', 'Rabbit Battery', 'Slagwoods Bridge', 'Invoke Calamity', 'Sephara, Sky''s Blade', 'Secluded Courtyard', 'Jolrael, Mwonvuli Recluse', 'Claws of Gix', 'Cliffhaven Kitesail', 'Rootbound Crag', 'Lantern of the Lost', 'Barbarian Ring', 'Pouncing Shoreshark', 'Orzhov Signet', 'Dihada''s Ploy', 'Dive Down', 'Darkmoss Bridge', 'Terramorphic Expanse', 'Expansion // Explosion', 'Chromatic Lantern', 'Gigantomancer', 'Woodfall Primus', 'Dreadhorde Invasion', 'Contagion Clasp', 'Vedalken Shackles', 'Aphemia, the Cacophony', 'Ajani Unyielding', 'Sphere of Safety', 'Dread', 'Otherworldly Gaze', 'Blessed Alliance', 'Vilis, Broker of Blood', 'Blue Sun''s Zenith', 'Salvage Titan', 'Skyclave Shade', 'Negate', 'Oni-Cult Anvil', 'Mind Rake', 'Zulaport Cutthroat', 'Bloodchief''s Thirst', 'Day of Judgment', 'Exclude', 'Merrow Reejerey', 'Harbinger of the Tides', 'Steel Sabotage', 'Champion of Wits', 'Falkenrath Forebear', 'Voldaren Epicure', 'Tranquil Cove', 'Smallpox', 'Skyclave Cleric', 'Platinum Angel', 'Hagra Mauling', 'Inscription of Ruin', 'Vivid Grove', 'Rend Flesh', 'Mire Triton', 'Skirge Familiar', 'Elemental Bond', 'Aeve, Progenitor Ooze', 'Elderfang Ritualist', 'Ironroot Warlord', 'Obscura Storefront', 'Ghost Quarter', 'Spectra Ward', 'Mwonvuli Acid-Moss', 'Moment of Craving', 'Judge''s Familiar', 'Hour of Promise', 'Llanowar Wastes', 'Jhoira, Weatherlight Captain', 'Sylvan Library', 'It That Betrays', 'Artful Dodge', 'Slumbering Tora', 'Ranger of Eos', 'Satyr Wayfinder', 'Phylactery Lich', 'Asceticism', 'Obstinate Baloth', 'Ral, Storm Conduit', 'Reassembling Skeleton', 'Kaya, Ghost Assassin', 'Runed Halo', 'Pyrite Spellbomb', 'Expedition Envoy', 'Trickbind', 'Kefnet the Mindful', 'Quest for the Holy Relic', 'Demanding Dragon', 'Altered Ego', 'Jeskai Ascendancy', 'Lich''s Mastery', 'Elvish Visionary', 'Mouth // Feed', 'Safewright Quest', 'Wavesifter', 'Tempered Steel', 'Sylvan Primordial', 'Reality Ripple', 'Erdwal Illuminator', 'Mishra''s Factory', 'Thassa''s Intervention', 'Barbed Sextant', 'Memory Lapse', 'Metallic Rebuke', 'Graf Mole', 'Geomancer''s Gambit', 'Sorcerer Class', 'Hive Mind', 'Sea Gate Colossus', 'Buried Ruin', 'Woodland Champion', 'Diabolic Edict', 'Halimar Excavator', 'Burning of Xinye', 'Homestead Courage', 'Wedding Invitation', 'Patch Up', 'Ghirapur Aether Grid', 'Champion of the Parish', 'Greater Gargadon', 'Lodestone Golem', 'Experimental Frenzy', 'Sanguine Statuette', 'Ignite Memories', 'Sandsteppe Citadel', 'Lonis, Cryptozoologist', 'Reckless Fireweaver', 'Murmuring Mystic', 'Terrarion', 'Castigate', 'Wild Mongrel', 'Demon Bolt', 'Phantasmagorian', 'Disciple of the Vault', 'Heartless Act', 'Piper of the Swarm', 'Kirtar''s Desire', 'Rise and Shine', 'Kitchen Imp', 'Bloodtithe Harvester', 'Pyromancer''s Swath', 'Riptide Laboratory', 'Exhaustion', 'Jace, Memory Adept', 'Specter''s Shroud', 'Angel of Despair', 'Sire of Insanity', 'Jungle Shrine', 'Dryad Militant', 'Dragonspark Reactor', 'Dead Weight', 'Wall of Omens', 'Blossoming Calm', 'Hard Evidence', 'End Hostilities', 'Mouth of Ronom', 'Dimir Charm', 'Rule of Law', 'Mortarpod', 'Boros Signet', 'Thirst for Discovery', 'Jaya Ballard', 'Deep Analysis', 'Kessig Flamebreather', 'Fireball', 'Sram''s Expertise', 'Burst Lightning', 'Hero of Precinct One', 'Azorius Signet', 'Veteran Adventurer', 'Titanic Brawl', 'Chamber Sentry', 'Shatter the Sky', 'Ally Encampment', 'Sigrid, God-Favored', 'Ondu Cleric', 'Myojin of Life''s Web', 'Ajani, Caller of the Pride', 'Shriekhorn', 'Snow-Covered Swamp', 'Seize the Storm', 'Kunoros, Hound of Athreos', 'Liquimetal Coating', 'Squadron Hawk', 'Relentless Rats', 'Kami of False Hope', 'Galvanic Relay', 'Goldmire Bridge', 'Vivid Marsh', 'Tyrant''s Scorn', 'Putrid Goblin', 'Abundant Harvest', 'Phyrexian Dreadnought', 'Temple of Abandon', 'Sokenzan Smelter', 'Raise the Alarm', 'Banisher Priest', 'Overwhelming Denial', 'Knowledge Pool', 'Jwari Shapeshifter', 'You Are Already Dead', 'Mana Flare', 'Grapeshot', 'Warleader''s Helix', 'Pelakka Predation', 'Azorius Charm', 'Ornithopter of Paradise', 'Dual Strike', 'White Sun''s Zenith', 'Gateway Plaza', 'Glorybringer', 'Chief Engineer', 'Karn''s Temporal Sundering', 'Drownyard Temple', 'Lena, Selfless Champion', 'Lose Focus', 'Meandering River', 'Reap the Past', 'Power Conduit', 'Eldrazi Mimic', 'Radiant Flames', 'Augur of Bolas', 'Blightning', 'End-Raze Forerunners', 'Orim''s Chant', 'Demonic Dread', 'Lifespinner', 'Dragon Mantle', 'Thawing Glaciers', 'Arc-Slogger', 'Wilt-Leaf Liege', 'Renegade Map', 'Nether Spirit', 'Dire Tactics', 'Prognostic Sphinx', 'Grimdancer', 'Cruel Reality', 'Stonework Packbeast', 'Bile Blight', 'Primal Surge', 'Thermo-Alchemist', 'Crystallization', 'Form of the Dragon', 'Frost Marsh', 'Mirror Entity', 'Tradewind Rider', 'Coralhelm Commander', 'Morselhoarder', 'Storm Herald', 'Hypnotic Sprite', 'Nightveil Specter', 'Ensoul Artifact', 'Grim Lavamancer', 'Regrowth', 'Faerie Vandal', 'Sign in Blood', 'Nature''s Lore', 'Ramunap Excavator', 'Zombie Infestation', 'Umara Raptor', 'Gods'' Eye, Gate to the Reikai', 'Dissolve', 'Lost Auramancers', 'Chain Lightning', 'Meishin, the Mind Cage', 'Goblin Anarchomancer', 'Valorous Stance', 'Maelstrom Nexus', 'Sylvan Advocate', 'Sungold Sentinel', 'Angel of Sanctions', 'Palace Siege', 'Dream Trawler', 'Commune with the Gods', 'Ivy Lane Denizen', 'Erebos''s Intervention', 'Zhur-Taa Goblin', 'Mist-Syndicate Naga', 'Rakdos Charm', 'Archfiend''s Vessel', 'Izzet Signet', 'Kor Duelist', 'Runechanter''s Pike', 'Thraben Inspector', 'Grisly Salvage', 'Early Frost', 'Calciform Pools', 'Watcher for Tomorrow', 'Essence Flux', 'Ilysian Caryatid', 'Garruk Wildspeaker', 'Dragonsguard Elite', 'Curse of Death''s Hold', 'Gruul Signet', 'Growth-Chamber Guardian', 'Earthquake', 'Honored Hydra', 'Necrotic Ooze', 'Thunderbreak Regent', 'Bloodbraid Elf', 'Brain Freeze', 'Invisible Stalker', 'Gloomshrieker', 'Clattering Augur', 'Insatiable Hemophage', 'Vedalken Archmage', 'Endless Horizons', 'Planar Outburst', 'Warstorm Surge', 'Orcish Lumberjack', 'Sylvan Awakening', 'Consign // Oblivion', 'Rebuild', 'Odds // Ends', 'Temple of Silence', 'Discovery // Dispersal', 'Dimir Signet', 'Hurricane', 'Traxos, Scourge of Kroog', 'Temple of Mystery', 'Stormchaser Drake', 'Axgard Armory', 'Dawn of Hope', 'Death Baron', 'Dead // Gone', 'Azor''s Gateway', 'Haven of the Spirit Dragon', 'Voltage Surge', 'Nomad Outpost', 'Nested Shambler', 'First-Sphere Gargantua', 'Solitary Confinement', 'Gadwick, the Wizened', 'Primal Command', 'Argentum Armor', 'Gruul Turf', 'Regal Force', 'Frostwalk Bastion', 'Carth the Lion', 'Strike It Rich', 'Nullpriest of Oblivion', 'Savage Lands', 'Trostani''s Summoner', 'Drakuseth, Maw of Flames', 'Quarantine Field', 'Judith, the Scourge Diva', 'Undead Butler', 'Seething Song', 'Torrent Sculptor', 'Wild Pair', 'Niveous Wisps', 'Spirited Companion', 'Tolsimir, Friend to Wolves', 'Clan Defiance', 'Jace, the Living Guildpact', 'Seaside Citadel', 'Behold the Multiverse', 'Shriekmaw', 'Genesis', 'Captivating Vampire', 'Satyr Hoplite', 'Flood Plain', 'Hornet Queen', 'Azorius Guildgate', 'Power Depot', 'Fae Offering', 'Out of Time', 'Memorial to War', 'Intangible Virtue', 'Karn''s Bastion', 'Signal Pest', 'Kolaghan, the Storm''s Fury', 'Retreat to Hagra', 'Ground Rift', 'Llanowar Elves', 'Mesmeric Fiend'))) 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, 61.3, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (73.4 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Pillage', 'Hissing Quagmire', 'Consuming Vapors', 'Glacial Fortress', 'Aqueous Form', 'Grim Haruspex', 'Chandra, Fire Artisan', 'Curse of Thirst', 'Temple of Mystery', 'Pack Rat', 'Voldaren Stinger', 'Relentless Rats', 'Favored Hoplite', 'Wandering Mind', 'Mistvault Bridge', 'Orim''s Chant', 'Voltage Surge', 'Lost Legacy', 'Cloud Key', 'Drakuseth, Maw of Flames', 'Sanguine Sacrament', 'Blackmail', 'Angel of Despair', 'Mind''s Desire', 'Power Depot', 'Furyblade Vampire', 'Kazandu Blademaster', 'Reinforced Ronin', 'Abundant Harvest', 'Starlit Sanctum', 'Ash Zealot', 'Selesnya Sanctuary', 'Mist-Syndicate Naga', 'Gideon Jura', 'Molten Slagheap', 'Desecration Demon', 'Universal Automaton', 'Neutralize', 'Dryad''s Revival', 'Bone Shards', 'The Birth of Meletis', 'Wild Mongrel', 'Trostani''s Summoner', 'Mephidross Vampire', 'Bloodbraid Elf', 'Farseek', 'Voldaren Epicure', 'Fading Hope', 'Improbable Alliance', 'Hypergenesis', 'Diabolic Edict', 'Colossal Skyturtle', 'Ral, Storm Conduit', 'Quarantine Field', 'Immortal Servitude', 'Anoint', 'Magister Sphinx', 'Blasphemous Act', 'Soulflayer', 'Nezahal, Primal Tide', 'Kitchen Imp', 'Selesnya Charm', 'Unsubstantiate', 'Abiding Grace', 'Clifftop Retreat', 'Crystal Shard', 'Radiant Fountain', 'Woodfall Primus', 'Barrin, Tolarian Archmage', 'Renegade Map', 'Desperate Ritual', 'Rise and Shine', 'Wall of Omens', 'Dictate of Kruphix', 'Nightveil Specter', 'Spare Supplies', 'Nimble Larcenist', 'Curse of the Pierced Heart', 'Midnight Reaper', 'Elves of Deep Shadow', 'Damping Engine', 'Sylvan Awakening', 'Deploy the Gatewatch', 'Master of the Pearl Trident', 'Hieroglyphic Illumination', 'Axgard Armory', 'Zur''s Weirding', 'Intervention Pact', 'Essence Capture', 'Flood Plain', 'Sphere of Safety', 'Invoke Calamity', 'Ghitu Encampment', 'Temple of Malice', 'Timeless Witness', 'Grisly Salvage', 'Banisher Priest', 'Urza''s Factory', 'Nightveil Predator', 'The Mirari Conjecture', 'Lead the Stampede', 'Kalastria Healer', 'Biting-Palm Ninja', 'Bloodtithe Harvester', 'Demon Bolt', 'Terastodon', 'Cursecatcher', 'Sorin Markov', 'Oath of Liliana', 'Liliana''s Specter', 'Mystic Monastery', 'Skyship Stalker', 'Experimental Overload', 'Spirited Companion', 'Snow-Covered Swamp', 'Temple of Triumph', 'Izzet Boilerworks', 'Terrarion', 'Moon-Circuit Hacker', 'Ranger of Eos', 'Muddle the Mixture', 'Oni-Cult Anvil', 'Expedition Envoy', 'Thundering Raiju', 'Laboratory Maniac', 'Mobilized District', 'Harabaz Druid', 'Rend Flesh', 'Oath of Gideon', 'Icehide Golem', 'Vampire Nighthawk', 'Mortarpod', 'Altered Ego', 'Greater Gargadon', 'Exclude', 'Pouncing Shoreshark', 'Quirion Dryad', 'Eye of Nowhere', 'Verdant Command', 'Powerstone Shard', 'Slagstorm', 'Necroplasm', 'Sire of Insanity', 'Sun Droplet', 'Ally Encampment', 'Hurricane', 'Search for Tomorrow', 'Mirrorshell Crab', 'Whip of Erebos', 'Gilded Lotus', 'Knowledge Pool', 'Burning of Xinye', 'Weathered Wayfarer', 'Generous Visitor', 'Sejiri Shelter', 'Scrapheap Scrounger', 'Brainstone', 'Glorybringer', 'Vindicate', 'Essence Flux', 'Stonework Packbeast', 'Ajani Unyielding', 'Goblin Anarchomancer', 'Ghost Quarter', 'Tormenting Voice', 'Kessig Wolf Run', 'Hard Evidence', 'Vengeful Strangler', 'Ondu Inversion', 'Sylvan Scrying', 'Tymaret, Chosen from Death', 'Drowned Catacomb', 'Fabricate', 'Mouth of Ronom', 'Lavinia of the Tenth', 'Endless Sands', 'Saw It Coming', 'Rabbit Battery', 'Cultivate', 'Cruel Ultimatum', 'Porphyry Nodes', 'Grotag Bug-Catcher', 'Basking Rootwalla', 'Migratory Greathorn', 'Azorius Guildgate', 'Dark Salvation', 'Auspicious Starrix', 'Revitalize', 'Boonweaver Giant', 'Lava Dart', 'Death Baron', 'Falkenrath Pit Fighter', 'Resurgent Belief', 'Slagwoods Bridge', 'Cloudpost', 'Brain Freeze', 'Braingeyser', 'Gods Willing', 'Dragonlord''s Servant', 'Curse of Death''s Hold', 'Kunoros, Hound of Athreos', 'Niveous Wisps', 'Shaman en-Kor', 'Blossoming Calm', 'Crack the Earth', 'Mindlink Mech', 'The Raven''s Warning', 'Mystic Snake', 'Myr Battlesphere', 'Lay of the Land', 'Ravager''s Mace', 'Circular Logic', 'Kessig Flamebreather', 'Call of the Herd', 'Ghostly Flicker', 'Ulvenwald Mysteries', 'Swallow Whole', 'Bone Splinters', 'Revoke Existence', 'Overwhelming Splendor', 'Butcher Ghoul', 'Cloudstone Curio', 'Frantic Inventory', 'Patch Up', 'Arc-Slogger', 'Curse of Misfortunes', 'Desperate Ravings', 'Sign in Blood', 'Desolate Lighthouse', 'Artful Dodge', 'Insolent Neonate', 'Viashino Pyromancer', 'Sprite Dragon', 'Voltaic Key', 'Astral Cornucopia', 'Niambi, Esteemed Speaker', 'Failure // Comply', 'Slitherhead', 'Ghirapur Aether Grid', 'Elvish Visionary', 'Primal Surge', 'Zealous Persecution', 'Outland Liberator', 'Goldmire Bridge', 'Proclamation of Rebirth', 'Carth the Lion', 'Hindering Light', 'Stormchaser Drake', 'Murderous Cut', 'Raging Ravine', 'Dreg Mangler', 'Phylactery Lich', 'Master of Death', 'Ram Through', 'Ugin''s Conjurant', 'Noxious Vapors', 'Glass Casket', 'Dryad Militant', 'Invisible Stalker', 'You Are Already Dead', 'Ornithopter of Paradise', 'Wilt-Leaf Liege', 'Shriekhorn', 'Soulherder', 'Pelakka Predation', 'Kin-Tree Invocation', 'Vision Skeins', 'Whispers of the Muse', 'Worst Fears', 'Dakmor Salvage', 'Pyrite Spellbomb', 'Skeletal Swarming', 'Moss-Pit Skeleton', 'Calciform Pools', 'Touch the Spirit Realm', 'Tidal Warrior', 'Haunted Fengraf', 'Mirrodin Besieged', 'Diabolic Revelation', 'Archfiend''s Vessel', 'Far // Away', 'Shelter', 'Electrolyze', 'Thirst for Meaning', 'Dire Tactics', 'Fire Covenant', 'Maestros Theater', 'Burst Lightning', 'Incandescent Aria', 'Tempest Djinn', 'Bond of Insight', 'Duress', 'Filigree Angel', 'Deliberate', 'Angel of Sanctions', 'Phyrexian Dreadnought', 'Bump in the Night', 'Phyrexian Revoker', 'Chandra, Pyromaster', 'Mirrodin''s Core', 'Boomerang', 'Fumigate', 'Golgari Rot Farm', 'Scoured Barrens', 'Cryptic Caves', 'Phantasmal Form', 'Pirate''s Pillage', 'Firewild Borderpost', 'Energy Arc', 'Everflowing Chalice', 'Sephara, Sky''s Blade', 'Blood Fountain', 'Coastal Tower', 'Synchronized Spellcraft', 'Vampiric Fury', 'Paralyze', 'Silverbluff Bridge', 'Fire-Lit Thicket', 'Dirge Bat', 'Distended Mindbender', 'Vampire Opportunist', 'Blazing Specter', 'Jace, Cunning Castaway', 'Reverent Hoplite', 'Radha, Heart of Keld', 'Ancient Stirrings', 'Wedding Invitation', 'Tymaret Calls the Dead', 'Nissa, Worldwaker', 'Sokenzan Smelter', 'Mina and Denn, Wildborn', 'Genesis', 'Jalira, Master Polymorphist', 'End Hostilities', 'Triskelion', 'Specter''s Shroud', 'Evangel of Heliod', 'Thaumatic Compass', 'Buried Ruin', 'Cathartic Pyre', 'Ophidian Eye', 'Angel of Glory''s Rise', 'Judith, the Scourge Diva', 'Undead Butler', 'Call of the Conclave', 'Herbal Poultice', 'Mogg War Marshal', 'Arrogant Wurm', 'Contagion Clasp', 'Tolsimir Wolfblood', 'Llanowar Elves', 'Turn Aside', 'Faerie Miscreant', 'Tezzeret''s Gambit', 'Reckless Fireweaver', 'Torment of Scarabs', 'Alchemist''s Refuge', 'Devious Cover-Up', 'Mistcutter Hydra', 'Fireball', 'Thief of Sanity', 'Hagra Mauling', 'Frontier Bivouac', 'Daxos of Meletis', 'Unburial Rites', 'Gigantomancer', 'Geomancer''s Gambit', 'Brokkos, Apex of Forever', 'Deadly Alliance', 'Primal Amulet', 'Incubation Druid', 'Vapor Snag', 'Grand Arbiter Augustin IV', 'Oblivion Ring', 'Condemn', 'Sylvan Library', 'Izzet Signet', 'Sigrid, God-Favored', 'Merfolk Looter', 'Mwonvuli Acid-Moss', 'Behold the Multiverse', 'Frantic Search', 'Hymn to Tourach', 'Cosmos Elixir', 'Wonder', 'Dread Return', 'Otherworldly Gaze', 'Nicol Bolas', 'Labyrinth of Skophos', 'Blightning', 'Slumbering Tora', 'Ondu Cleric', 'Brushfire Elemental', 'Shardless Agent', 'Maestros Charm', 'Temple of Enlightenment', 'Transmogrify', 'Chasm Skulker', 'Deep Forest Hermit', 'Dominating Vampire', 'Spear of Heliod', 'Jace, Memory Adept', 'Secluded Steppe', 'Acquisitions Expert', 'Stony Strength', 'Goblin Bombardment', 'Wooded Bastion', 'Pull from Tomorrow', 'Mire Triton', 'Tomb of Urami', 'Meandering River', 'Memnarch', 'Bad River', 'Glimmerpost', 'Vampire Socialite', 'Surgespanner', 'Obsessive Search', 'Mesmeric Fiend', 'Uncharted Haven', 'Armament Master', 'Scurry Oak', 'Treasure Cruise', 'Savra, Queen of the Golgari', 'Mentor of the Meek', 'Vivien''s Arkbow', 'Kaya, Ghost Assassin', 'Veteran Adventurer', 'Kami''s Flare', 'Arcbound Ravager', 'Barbarian Ring', 'Bloodchief''s Thirst', 'Demonic Dread', 'Pyretic Ritual', 'Tendo Ice Bridge', 'Dragon Tempest', 'Ajani''s Presence', 'Zhalfirin Void', 'Genesis Wave', 'Ancient Grudge', 'Akroma''s Memorial', 'Ornithopter', 'Skyclave Shade', 'Azami, Lady of Scrolls', 'Angel''s Grace', 'Massive Might', 'Wild Pair', 'Into the Story', 'Obscura Charm', 'Cursed Totem', 'Sorcerer Class', 'Dennick, Pious Apprentice', 'Mizzium Skin', 'Tyrant of Discord', 'Flame Rift', 'Suture Priest', 'Guild Globe', 'Logic Knot', 'Blackbloom Rogue', 'Crystallization', 'Eldrazi Mimic', 'Rampant Growth', 'Tocatli Honor Guard', 'Join the Dance', 'Eternal Dragon', 'Wavesifter', 'Gigadrowse', 'Castigate', 'Jhoira, Weatherlight Captain', 'Underworld Dreams', 'Enduring Ideal', 'Gossamer Chains', 'Disciple of Bolas', 'Needle Spires', 'Demanding Dragon', 'Hushwing Gryff', 'Staggering Insight', 'Jace Beleren', 'Reap the Past', 'Growth-Chamber Guardian', 'Runed Halo', 'Pyromancer''s Swath', 'Ironroot Warlord', 'Argent Sphinx', 'Hive Mind', 'Aphemia, the Cacophony', 'Platinum Angel', 'Skylasher', 'Costly Plunder', 'Quest for the Holy Relic', 'Kira, Great Glass-Spinner', 'Stone Rain', 'Loxodon Smiter', 'Argentum Armor', 'Tranquil Cove', 'Buried Alive', 'Clan Defiance', 'Izzet Charm', 'Cartographer''s Survey', 'Moonhold', 'Kher Keep', 'Kambal, Consul of Allocation', 'Putrid Imp', 'Hanweir Garrison', 'Lavaclaw Reaches', 'Oyobi, Who Split the Heavens', 'Commit // Memory', 'Bedevil', 'Metalwork Colossus', 'Prognostic Sphinx', 'Ground Rift', 'Embodiment of Agonies', 'Linvala, the Preserver', 'Dire-Strain Rampage', 'Dragonskull Summit', 'Vedalken Archmage', 'Postmortem Lunge', 'Homestead Courage', 'Glen Elendra Archmage', 'Thunderbreak Regent', 'Lonely Sandbar', 'Chandra Ablaze', 'Batterbone', 'Quest for the Nihil Stone', 'Meteor Golem', 'Judge''s Familiar', 'Faithful Mending', 'Ponder', 'Forbid', 'Nissa''s Pilgrimage', 'Trickbind', 'Shenanigans', 'Cliffhaven Kitesail', 'Skybridge Towers', 'Prophet of Kruphix', 'Timely Reinforcements', 'Field of Ruin', 'Loyal Pegasus', 'Maelstrom Nexus', 'Satyr Wayfinder', 'Mishra''s Factory', 'Talisman of Resilience', 'Mangara of Corondor', 'Meishin, the Mind Cage', 'Abzan Charm', 'Approach of the Second Sun', 'Disciple of the Vault', 'Jolrael, Mwonvuli Recluse', 'Persistent Specimen', 'Temple of Silence', 'Vivid Crag', 'Brokers Hideout', 'Dimir Signet', 'Kami of False Hope', 'Prohibit', 'Torrent Sculptor', 'Jhoira''s Familiar', 'Temple of Abandon', 'Altar of the Brood', 'Strike It Rich', 'Terminus', 'Dovin Baan', 'Flame-Blessed Bolt', 'Nomad Outpost', 'Consume the Meek', 'Sylvan Primordial', 'Make Disappear', 'Hunted Nightmare', 'Wrench Mind', 'Colossification', 'Elspeth''s Nightmare', 'Thought Erasure', 'Vigor', 'Daru Spiritualist', 'Conqueror''s Pledge', 'Insatiable Hemophage', 'Sterling Grove', 'Atris, Oracle of Half-Truths', 'Wirewood Herald', 'Overwhelming Denial', 'Terramorphic Expanse', 'Umara Entangler', 'Reassembling Skeleton', 'Saproling Migration', 'Arcbound Mouser', 'Not of This World', 'Obstinate Baloth', 'Oversoul of Dusk', 'Ritual of Soot', 'Silvergill Adept', 'Nylea''s Presence', 'Westvale Abbey', 'Riptide Laboratory', 'Retraction Helix', 'Bond of Revival', 'Coralhelm Guide', 'Arbor Elf', 'Dismal Backwater', 'Chief of the Foundry', 'Hypnotic Specter', 'Curiosity', 'Woodland Champion', 'Dragon''s Hoard', 'Hidden Strings', 'Sea Gate Colossus', 'Snow-Covered Forest', 'Diregraf Ghoul', 'Bontu''s Last Reckoning', 'Hour of Promise', 'Lodestone Golem', 'Form of the Dragon', 'Earthshaker Khenra', 'Coralhelm Commander', 'Razortide Bridge', 'Crumbling Necropolis', 'Inevitable Betrayal', 'Talisman of Impulse', 'Expedite', 'Mindslaver', 'Stromkirk Noble', 'Karn''s Temporal Sundering', 'Court Homunculus', 'Sol Talisman', 'Lost Auramancers', 'Arcane Sanctum', 'Wildfield Borderpost', 'Hada Freeblade', 'Counterflux', 'Acolyte of Affliction', 'Talisman of Unity', 'Viscera Seer', 'Knight of the White Orchid', 'Negate', 'Caves of Koilos', 'Boon of Safety', 'Gitaxian Probe', 'Azorius Signet', 'Demonic Embrace', 'Dragonsguard Elite', 'Magistrate''s Scepter', 'Obscura Storefront', 'Sky Hussar', 'Grimdancer', 'Kumano Faces Kakkazan', 'Kopala, Warden of Waves', 'Shuko', 'Purphoros''s Intervention', 'Iname, Life Aspect', 'Hostage Taker', 'Early Frost', 'Strategic Planning', 'Future Sight', 'Dual Strike', 'Grapeshot', 'Feed the Swarm', 'Dihada''s Ploy', 'Reality Ripple', 'That Which Was Taken', 'Cosima, God of the Voyage', 'Stubborn Denial', 'Lumbering Falls', 'Electrostatic Field', 'Realm Razer', 'Jokulhaups', 'Skymarcher Aspirant', 'Nested Shambler', 'Mirrorpool', 'Foreboding Ruins', 'Barbed Sextant', 'Vedalken Shackles', 'Slip Out the Back', 'Scrabbling Claws', 'Quiet Speculation', 'Stirring Wildwood', 'Jungle Shrine', 'Glimmer Bairn', 'Orzhov Signet', 'Witching Well', 'Rishadan Dockhand', 'Mikokoro, Center of the Sea', 'Egon, God of Death', 'Grim Lavamancer', 'Bloodline Keeper', 'Orcish Lumberjack', 'Runechanter''s Pike', 'Scab-Clan Berserker', 'Sandwurm Convergence', 'Orb of Dragonkind', 'Demigod of Revenge', 'Cordial Vampire', 'Ajani, Caller of the Pride', 'Wayward Swordtooth', 'Briarbridge Patrol', 'Sprouting Thrinax', 'Teachings of the Kirin', 'Lupine Prototype', 'Howling Mine', 'Fiery Justice', 'Smallpox', 'Murmuring Mystic', 'Prophetic Prism', 'Jeskai Ascendancy', 'War''s Toll', 'Explore', 'Retreat to Kazandu', 'Permeating Mass', 'Walk the Aeons', 'Frost Marsh', 'Slag Strider', 'Geist-Honored Monk', 'Cathar Commando', 'Lonis, Cryptozoologist', 'Bag of Holding', 'Hornet Queen', 'Grindclock', 'Cruel Reality', 'Restoration Angel', 'Glint-Horn Buccaneer', 'Dread Fugue', 'Edge of Autumn', 'Blacklance Paragon', 'Blazing Rootwalla', 'Dimir Aqueduct', 'Battlefield Thaumaturge', 'Liege of the Tangle', 'Dissolve', 'Myth Realized', 'Orzhov Basilica', 'Tradewind Rider', 'Necrotic Ooze', 'Horrifying Revelation', 'Memory''s Journey', 'Malakir Blood-Priest', 'Dragonspark Reactor', 'Gargoyle Castle', 'Michiko''s Reign of Truth', 'Shriekmaw', 'Consign // Oblivion', 'Gideon''s Intervention', 'Drossforge Bridge', 'Swiftwater Cliffs', 'Dark Ritual', 'Pyroclasm', 'Lena, Selfless Champion', 'Declaration in Stone', 'Drift of Phantasms', 'Memorial to War', 'Incinerate', 'Izoni, Thousand-Eyed', 'Out of Time', 'Flame Jab', 'Barrenton Medic', 'Grixis Panorama', 'End-Raze Forerunners', 'Deep Analysis', 'Vizier of the Menagerie', 'Curse of Exhaustion', 'Gateway Plaza', 'Chromatic Lantern', 'Bala Ged Recovery', 'Tendrils of Agony', 'Fieldmist Borderpost', 'Strength of Solidarity', 'Hateful Eidolon', 'Vilis, Broker of Blood', 'Azorius Charm', 'Animist''s Awakening', 'Gloomshrieker', 'Secluded Courtyard', 'Jace, the Living Guildpact', 'Regal Force', 'Semblance Anvil', 'Coiling Oracle', 'Sacred Fire', 'Fact or Fiction', 'Sigil Blessing', 'Mirror Entity', 'Season of Growth', 'Lux Cannon', 'Commune with the Gods', 'Seal of Cleansing', 'Archaeomancer', 'Horde of Notions', 'Genesis Hydra', 'Valorous Stance', 'Dawn of Hope', 'Act of Aggression', 'Fauna Shaman', 'Living Lore', 'Lantern of the Lost', 'Hotshot Mechanic', 'Quest for Pure Flame', 'Concerted Defense', 'Forsake the Worldly', 'Breya''s Apprentice', 'Dead // Gone', 'Champion of the Parish', 'Tyrant''s Choice', 'Prey''s Vengeance', 'Mystic Retrieval', 'Gift of Estates', 'Contaminated Ground', 'Figure of Destiny', 'Heartless Act', 'Fertile Ground', 'Read the Bones', 'Animate Dead', 'Asceticism', 'Rift Sower', 'Cabal Therapist', 'Impostor of the Sixth Pride', 'Mystifying Maze', 'Hydra Broodmaster', 'Jaya Ballard', 'Invert // Invent', 'Broodmate Dragon', 'Tolsimir, Friend to Wolves', 'Frostwalk Bastion', 'Bogardan Hellkite', 'Battlefield Forge', 'Intangible Virtue', 'Pollywog Symbiote', 'Veteran Warleader', 'Smokestack', 'Mystical Teachings', 'Nirkana Assassin', 'Moment of Craving', 'Skyclave Cleric', 'Myojin of Infinite Rage', 'Evermind', 'Eiganjo Castle', 'Wild Cantor', 'Martyr of Sands', 'Queza, Augur of Agonies', 'Mouth // Feed', 'Stern Dismissal', 'Weaver of Harmony', 'Shatter the Sky', 'Chamber Sentry', 'Raze the Effigy', 'Shrieking Affliction', 'Chain Lightning', 'Jwari Disruption', 'Lose Focus', 'Eldrazi Conscription', 'Gruul Turf', 'Stream of Thought', 'Umara Raptor', 'Artisan of Forms', 'Pieces of the Puzzle', 'Spectra Ward', 'Wrath of God', 'Planar Outburst', 'Auratouched Mage', 'Lashwrithe', 'Tanglepool Bridge', 'Tooth and Nail', 'Thraben Inspector', 'Odds // Ends', 'Dreadhorde Invasion', 'Primal Command', 'Blue Sun''s Zenith', 'Waterfront District', 'Thirst for Discovery', 'Teferi, Mage of Zhalfir', 'Mire''s Grasp', 'Erdwal Illuminator', 'Clattering Augur', 'Expansion // Explosion', 'Quicken', 'Bloodvial Purveyor', 'Veinfire Borderpost', 'Jack-o''-Lantern', 'Zhur-Taa Goblin', 'Liquimetal Torque', 'Mana Flare', 'Emmara, Soul of the Accord', 'Wingcrafter', 'Fblthp, the Lost', 'Spellweaver Helix', 'Tombstalker', 'Force of Rage', 'Warleader''s Helix', 'Iname, Death Aspect', 'Darkmoss Bridge', 'Traxos, Scourge of Kroog', 'Nether Spirit', 'Den Protector', 'Yahenni''s Expertise', 'Solitary Confinement', 'Dripping-Tongue Zubera', 'Faerie Vandal', 'Prowling Serpopard', 'Collected Conjuring', 'Palace Siege', 'Warriors'' Lesson', 'Claws of Gix', 'Rustvale Bridge', 'Solfatara', 'Elemental Bond', 'Tide Shaper', 'Restore Balance', 'Midnight Clock', 'Blood Operative', 'Vault Skirge', 'Elvish Clancaller', 'Thrumming Stone', 'Spinerock Knoll', 'Curse of Echoes', 'Arch of Orazca', 'Seize the Storm', 'Gavony Township', 'Seaside Citadel', 'Temple of Malady', 'Kirtar''s Desire', 'Rebuild', 'Blood for Bones', 'Vivid Creek', 'Dragon Mantle', 'Orgg', 'Security Bypass', 'Din of the Fireherd', 'Planar Bridge', 'Safewright Quest', 'Thawing Glaciers', 'Evolving Wilds', 'Phantasmagorian', 'Lightning Strike', 'Devouring Light', 'Eerie Interlude', 'Stromkirk Captain', 'Wing Shards', 'Karn, Silver Golem', 'Pulse of the Grid', 'Contagion Engine', 'Never // Return', 'Champion of Dusk', 'Shalai, Voice of Plenty', 'Nevermore', 'Shigeki, Jukai Visionary', 'Mana Leak', 'Vampire Envoy', 'Ignite Memories', 'Delver of Secrets', 'Sanguine Statuette', 'Nature''s Lore', 'Sleight of Hand', 'Eiganjo Uprising', 'Cleansing Nova', 'Caravan Vigil', 'Experimental Frenzy', 'Azor''s Gateway', 'Kabira Evangel', 'Ancestral Anger', 'Everdream', 'Rakdos Charm', 'Signal Pest', 'High-Speed Hoverbike', 'Experimental Synthesizer', 'Possibility Storm', 'Infernal Grasp', 'Fae Offering', 'Kor Duelist', 'Woodland Cemetery', 'Galvanic Relay', 'Hypnotic Sprite', 'Conflagrate', 'Tempered Steel', 'Surge Node', 'Kefnet the Mindful', 'Gone Missing', 'Shivan Dragon', 'Warstorm Surge', 'Kabira Takedown', 'Ethersworn Sphinx', 'Zulaport Cutthroat', 'Prophetic Bolt', 'Riot Control', 'Retreat to Hagra', 'Erebos''s Intervention', 'Magmatic Sinkhole', 'Decree of Justice', 'Myr Servitor', 'Winterthorn Blessing', 'Salvage Titan', 'Stasis Snare', 'Thermo-Alchemist', 'Rotten Reunion', 'Rootbound Crag', 'Archway Commons', 'Mind Rake', 'Manabarbs', 'Ramunap Excavator', 'Assault Strobe', 'Ethersworn Canonist', 'Riveteers Overlook', 'Forbidden Alchemy', 'Dream Trawler', 'Phylath, World Sculptor', 'Temple of Deceit', 'Elderfang Ritualist', 'Llanowar Wastes', 'Ransack the Lab', 'Noose Constrictor', 'Ilysian Caryatid', 'Drownyard Temple', 'Falkenrath Forebear', 'Elvish Piper', 'Glint Hawk', 'Cleansing Wildfire', 'Rune Snag', 'Piper of the Swarm', 'Tamiyo''s Safekeeping', 'Take Inventory', 'First-Sphere Gargantua', 'Mission Briefing', 'Fireblade Charger', 'Captivating Vampire', 'Kolaghan, the Storm''s Fury', 'Kjeldoran Outpost', 'Arrogant Bloodlord', 'Rule of Law', 'Myr Incubator', 'Esper Charm', 'Dead Weight', 'Storm Herald', 'Nicol Bolas, Planeswalker', 'Magister of Worth', 'Abrade', 'Hero of Precinct One', 'Sylvan Ranger', 'Morselhoarder', 'Cartel Aristocrat', 'Temple of Epiphany', 'Omen of the Forge', 'Tyrant''s Scorn', 'Sandsteppe Citadel', 'Liquimetal Coating', 'Spikefield Hazard', 'Fodder Tosser', 'Vivid Marsh', 'Game Trail', 'Alms of the Vein', 'Augur of Bolas', 'Polymorph', 'Sungold Sentinel', 'Birds of Paradise', 'Urza''s Ruinous Blast', 'Power Conduit', 'Goblin Dark-Dwellers', 'Mistveil Plains', 'Reckoner''s Bargain', 'Gladecover Scout', 'Marauding Raptor', 'Adventuring Gear', 'Lifespinner', 'Claim the Firstborn', 'Epic Experiment', 'Lich''s Mastery', 'Irregular Cohort', 'Slaughter Pact', 'Pooling Venom', 'Yarok''s Fenlurker', 'Vampire''s Kiss', 'Day of Judgment', 'Infinite Obliteration', 'Kuldotha Forgemaster', 'Dread', 'Firespout', 'Shatterskull Minotaur', 'Tectonic Giant', 'Riveteers Charm', 'Defy Gravity', 'Keruga, the Macrosage', 'Hatching Plans', 'Necrogoyf', 'Honored Hydra', 'Tidespout Tyrant', 'Battle of Wits', 'Arcanis the Omnipotent', 'Sarkhan the Mad', 'Skirge Familiar', 'He Who Hungers', 'Prahv, Spires of Order', 'Ingenious Infiltrator', 'Gatekeeper of Malakir', 'Shard Volley', 'Gruul Signet', 'Fling', 'Fiery Temper', 'Nivmagus Elemental', 'Oust', 'Thornglint Bridge', 'Champion of Wits', 'Discovery // Dispersal', 'Tangled Florahedron', 'Howltooth Hollow', 'Alchemist''s Vial', 'Elixir of Immortality', 'Liliana Vess', 'Spawning Pool', 'Cultivator of Blades', 'Riddlesmith', 'Vivid Meadow', 'General Ferrous Rokiric', 'Radiant Flames', 'Nether Traitor', 'Delirium Skeins', 'Double Vision', 'Flame Slash', 'Dusk Legion Zealot', 'Divert', 'Bojuka Brigand', 'Endless Horizons', 'Nyxathid', 'The Underworld Cookbook', 'White Sun''s Zenith', 'Enter the God-Eternals', 'Asmodeus the Archfiend', 'It That Betrays', 'Raise the Alarm', 'Falkenrath Aristocrat', 'Nullpriest of Oblivion', 'Vampire Lacerator', 'Exhaustion', 'Force of Nature', 'Raven''s Crime', 'Fusion Elemental', 'Secluded Glen', 'Illuminator Virtuoso', 'Ecstatic Awakener', 'Etherium Sculptor', 'Snowfield Sinkhole', 'Garruk Wildspeaker', 'Fatestitcher', 'Gaea''s Revenge', 'Endless One', 'Momentary Blink', 'Plea for Guidance', 'Gather the Townsfolk', 'Base Camp', 'Masked Bandits', 'Eidolon of Countless Battles', 'Seething Song', 'Edric, Spymaster of Trest', 'Sram''s Expertise', 'Altar''s Reap', 'See the Truth', 'Victim of Night', 'Psychatog', 'Shrapnel Blast', 'Regrowth', 'Boros Reckoner', 'Rise of the Hobgoblins', 'Captain''s Claws', 'Summer Bloom', 'Vault of the Archangel', 'Malakir Rebirth', 'Faithless Salvaging', 'Steel Sabotage', 'Spell Pierce', 'Searing Spear', 'Blessed Alliance', 'Elvish Mystic', 'Conclave Tribunal', 'Graf Mole', 'Ivy Lane Denizen', 'Mistvein Borderpost', 'Mycosynth Wellspring', 'Windbrisk Heights', 'Disenchant', 'Undercity Informer', 'Acidic Slime', 'Sinister Sabotage', 'Lochmere Serpent', 'Gaea''s Will', 'Beastcaller Savant', 'Footfall Crater', 'Thassa''s Intervention', 'Endbringer', 'Memory Lapse', 'Maul of the Skyclaves', 'Falkenrath Gorger', 'Rally the Ancestors', 'Jwari Shapeshifter', 'Karn''s Bastion', 'Ravenous Chupacabra', 'Rite of Oblivion', 'Halimar Excavator', 'Shrine of Burning Rage', 'Earthquake', 'Hinterland Harbor', 'Debtors'' Knell', 'Patchwork Automaton', 'Barren Moor', 'Metallic Rebuke', 'Chief Engineer', 'Satyr Hoplite', 'Rishkar, Peema Renegade', 'Perilous Research', 'Sylvan Anthem', 'Temple of Plenty', 'Coalition Relic', 'Haven of the Spirit Dragon', 'Gadwick, the Wizened', 'Aeve, Progenitor Ooze', 'Goblin Electromancer', 'Oracle of Mul Daya', 'Bile Blight', 'Watcher for Tomorrow', 'Novice Occultist', 'Tidehollow Strix', 'Kazandu Mammoth', 'Snow-Covered Plains', 'Ranger''s Guile', 'Merfolk Mistbinder', 'Clarion Spirit', 'Dovescape', 'Myojin of Life''s Web', 'Zombie Infestation', 'Dive Down', 'Merrow Reejerey', 'Detention Sphere', 'Talisman of Conviction', 'Servo Exhibition', 'Boros Signet', 'Putrid Goblin', 'Opt', 'Think Twice', 'Dimir Charm', 'Fatal Grudge', 'Tatsunari, Toad Rider', 'Kaleidoscorch', 'Harbinger of the Tides', 'Harmonize', 'Asylum Visitor', 'Repeal', 'Black Sun''s Zenith', 'Titanic Brawl', 'Dramatic Finale', 'Conclave Mentor', 'Sickening Shoal', 'Flame-Kin Zealot', 'Canyon Slough', 'Sylvan Advocate', 'Ixalan''s Binding', 'Squadron Hawk', 'Darksteel Colossus', 'Circle of Confinement', 'Sunblade Samurai', 'Savage Lands', 'Ensoul Artifact', 'Desolation Twin', 'Inscription of Ruin', 'Thought Scour', 'Balustrade Spy', 'Bygone Bishop', 'Trace of Abundance', 'Ral Zarek', 'Gods'' Eye, Gate to the Reikai', 'Vivid Grove'))) 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, 73.4, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (64.1 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Ghitu Encampment', 'Crystal Shard', 'Fodder Tosser', 'Raven''s Crime', 'Aphemia, the Cacophony', 'Not of This World', 'Izzet Boilerworks', 'Kor Duelist', 'Tymaret, Chosen from Death', 'Nylea''s Presence', 'Muddle the Mixture', 'Universal Automaton', 'Dominating Vampire', 'Riddlesmith', 'Obstinate Baloth', 'Whispers of the Muse', 'Divert', 'Memory''s Journey', 'Garruk Wildspeaker', 'Spawning Pool', 'Shrapnel Blast', 'Quest for the Nihil Stone', 'Voltage Surge', 'Azorius Signet', 'Ground Rift', 'Liquimetal Coating', 'Ransack the Lab', 'Damping Engine', 'Dual Strike', 'Galvanic Relay', 'Moment of Craving', 'Boonweaver Giant', 'Skylasher', 'Sanguine Sacrament', 'Hypnotic Specter', 'Judge''s Familiar', 'Faerie Miscreant', 'Ajani''s Presence', 'Desperate Ritual', 'Jungle Shrine', 'Nissa''s Pilgrimage', 'Cosmos Elixir', 'Wingcrafter', 'Pack Rat', 'Hieroglyphic Illumination', 'Augur of Bolas', 'Piper of the Swarm', 'Razortide Bridge', 'Archfiend''s Vessel', 'Heartless Act', 'Nivmagus Elemental', 'Waterfront District', 'Bone Shards', 'Feed the Swarm', 'Slumbering Tora', 'Frontier Bivouac', 'Essence Capture', 'Neutralize', 'Veteran Adventurer', 'Hanweir Garrison', 'Myth Realized', 'Vivid Crag', 'Mistveil Plains', 'Cosima, God of the Voyage', 'Ixalan''s Binding', 'Champion of the Parish', 'Pouncing Shoreshark', 'End-Raze Forerunners', 'Wild Mongrel', 'Genesis', 'Thunderbreak Regent', 'Expansion // Explosion', 'Fire-Lit Thicket', 'Mystic Monastery', 'Masked Bandits', 'Dead // Gone', 'Intervention Pact', 'White Sun''s Zenith', 'Bloodline Keeper', 'Gigantomancer', 'Meandering River', 'Wild Cantor', 'Bond of Insight', 'Oath of Liliana', 'Rebuild', 'Blazing Specter', 'Chandra, Fire Artisan', 'Haven of the Spirit Dragon', 'Endbringer', 'Abzan Charm', 'Staggering Insight', 'Barren Moor', 'Beastcaller Savant', 'Fiery Temper', 'Salvage Titan', 'First-Sphere Gargantua', 'Drift of Phantasms', 'Embodiment of Agonies', 'Dragonskull Summit', 'Prahv, Spires of Order', 'Boon of Safety', 'Evolving Wilds', 'Delirium Skeins', 'Improbable Alliance', 'Burst Lightning', 'Mogg War Marshal', 'Frantic Search', 'Adventuring Gear', 'Flame-Kin Zealot', 'Wavesifter', 'Coralhelm Commander', 'Braingeyser', 'Karn, Silver Golem', 'Obsessive Search', 'Pyromancer''s Swath', 'Westvale Abbey', 'Gideon''s Intervention', 'Vampiric Fury', 'Reap the Past', 'Lightning Strike', 'Sylvan Advocate', 'Angel of Sanctions', 'Ecstatic Awakener', 'Atris, Oracle of Half-Truths', 'Nissa, Worldwaker', 'Lavaclaw Reaches', 'Sphere of Safety', 'Migratory Greathorn', 'Cryptic Caves', 'Furyblade Vampire', 'Maelstrom Nexus', 'Runechanter''s Pike', 'Grapeshot', 'Blood for Bones', 'Scurry Oak', 'Relentless Rats', 'Chain of Plasma', 'Silvergill Adept', 'Base Camp', 'Eidolon of Countless Battles', 'Titanic Brawl', 'Genesis Wave', 'Merrow Reejerey', 'Howltooth Hollow', 'Kalastria Healer', 'Brokkos, Apex of Forever', 'Emmara, Soul of the Accord', 'Altar of the Brood', 'Falkenrath Pit Fighter', 'Victim of Night', 'Teachings of the Kirin', 'Captivating Vampire', 'Secluded Steppe', 'Bogardan Hellkite', 'Calciform Pools', 'Pull from Tomorrow', 'Arbor Elf', 'Sylvan Anthem', 'Massive Might', 'Lich''s Mastery', 'Earthquake', 'Fireball', 'Gitaxian Probe', 'Ancestral Anger', 'Bone Splinters', 'Swallow Whole', 'Lodestone Golem', 'Slagstorm', 'Colossification', 'Consuming Vapors', 'Auratouched Mage', 'Quest for Pure Flame', 'Claim the Firstborn', 'Wilt-Leaf Liege', 'Contagion Clasp', 'Chief Engineer', 'Turn Aside', 'Wirewood Herald', 'Veteran Warleader', 'Oblivion Ring', 'Plea for Guidance', 'Jolrael, Mwonvuli Recluse', 'Rift Sower', 'Tombstalker', 'Sylvan Primordial', 'Altar''s Reap', 'Conclave Mentor', 'Voltaic Key', 'Join the Dance', 'Nested Shambler', 'Temple of Mystery', 'Curse of Misfortunes', 'Timeless Witness', 'Shrieking Affliction', 'Sylvan Scrying', 'Glass Casket', 'Hagra Mauling', 'Vivien''s Arkbow', 'Arcanis the Omnipotent', 'Memory Lapse', 'Opt', 'Vampire Opportunist', 'Kami''s Flare', 'Nyxathid', 'Future Sight', 'Vizier of the Menagerie', 'Necrotic Ooze', 'Radiant Flames', 'Invisible Stalker', 'Desecration Demon', 'Ingenious Infiltrator', 'Deep Forest Hermit', 'Mystic Retrieval', 'Glint-Horn Buccaneer', 'Temple of Silence', 'Court Homunculus', 'Hatching Plans', 'Powerstone Shard', 'Orzhov Basilica', 'Stony Strength', 'Myojin of Life''s Web', 'Niveous Wisps', 'Temple of Abandon', 'Endless One', 'Tendrils of Agony', 'Gods'' Eye, Gate to the Reikai', 'Shatterskull Minotaur', 'Seaside Citadel', 'Psychatog', 'Arcbound Ravager', 'Selesnya Sanctuary', 'Yarok''s Fenlurker', 'Unsubstantiate', 'Necroplasm', 'Rotten Reunion', 'Kefnet the Mindful', 'Coralhelm Guide', 'Reverent Hoplite', 'Invoke Calamity', 'Prowling Serpopard', 'Elvish Clancaller', 'Caravan Vigil', 'Clifftop Retreat', 'Insolent Neonate', 'Gruul Signet', 'Commit // Memory', 'Mistvault Bridge', 'Champion of Wits', 'Behold the Multiverse', 'Jeskai Ascendancy', 'Planar Outburst', 'Vivid Grove', 'Rakdos Charm', 'Oversoul of Dusk', 'Talisman of Conviction', 'Obscura Charm', 'Veinfire Borderpost', 'Ponder', 'Oath of Gideon', 'Talisman of Resilience', 'Coiling Oracle', 'Scrabbling Claws', 'Rootbound Crag', 'Into the Story', 'Firewild Borderpost', 'Mire''s Grasp', 'Vivid Creek', 'Assault Strobe', 'Vision Skeins', 'Eiganjo Castle', 'Glacial Fortress', 'Devouring Light', 'Wayward Swordtooth', 'Cultivator of Blades', 'Stirring Wildwood', 'Flame Jab', 'Biting-Palm Ninja', 'Champion of Dusk', 'Icehide Golem', 'Shalai, Voice of Plenty', 'Exhaustion', 'Terminus', 'Merfolk Mistbinder', 'Tangled Florahedron', 'Mangara of Corondor', 'Tidehollow Strix', 'Abiding Grace', 'Wrench Mind', 'Alchemist''s Refuge', 'Restore Balance', 'Argent Sphinx', 'Sandwurm Convergence', 'Tide Shaper', 'Battlefield Thaumaturge', 'Cathar Commando', 'Faithful Mending', 'Circular Logic', 'Contaminated Ground', 'Laboratory Maniac', 'Halimar Excavator', 'Fading Hope', 'He Who Hungers', 'Smallpox', 'Deadly Alliance', 'Oracle of Mul Daya', 'Regrowth', 'Abundant Harvest', 'Talisman of Impulse', 'Discovery // Dispersal', 'Jwari Shapeshifter', 'Cruel Reality', 'Umara Entangler', 'Quicken', 'Darksteel Colossus', 'Fertile Ground', 'Ulvenwald Mysteries', 'Secluded Courtyard', 'Concerted Defense', 'Barbarian Ring', 'Elderfang Ritualist', 'Duress', 'Fireblade Charger', 'Kazandu Mammoth', 'Cleansing Nova', 'Mission Briefing', 'Boomerang', 'Arcbound Mouser', 'Brainstone', 'Burning of Xinye', 'Howling Mine', 'Linvala, the Preserver', 'Arch of Orazca', 'Karn''s Bastion', 'Thirst for Discovery', 'Teferi, Mage of Zhalfir', 'Midnight Clock', 'Sun Droplet', 'Ral Zarek', 'Dissolve', 'Talisman of Unity', 'Batterbone', 'Boros Signet', 'Semblance Anvil', 'Exclude', 'Grim Lavamancer', 'Sorin Markov', 'Artful Dodge', 'Electrostatic Field', 'Lashwrithe', 'Traxos, Scourge of Kroog', 'Undead Butler', 'Riptide Laboratory', 'Runed Halo', 'Weathered Wayfarer', 'Sandsteppe Citadel', 'Infernal Grasp', 'Blackmail', 'Phantasmal Form', 'Thassa''s Intervention', 'Dovescape', 'Paralyze', 'Bontu''s Last Reckoning', 'Squadron Hawk', 'Claws of Gix', 'Regal Force', 'Suture Priest', 'Demonic Embrace', 'Distended Mindbender', 'Revoke Existence', 'Mana Leak', 'Rustvale Bridge', 'Hurricane', 'Rishadan Dockhand', 'Dismal Backwater', 'Epic Experiment', 'Surge Node', 'Caves of Koilos', 'Murderous Cut', 'Glimmer Bairn', 'Tezzeret''s Gambit', 'Tradewind Rider', 'Myojin of Infinite Rage', 'Gigadrowse', 'Daru Spiritualist', 'Maestros Charm', 'Hunted Nightmare', 'Flame Rift', 'Faithless Salvaging', 'Satyr Wayfinder', 'Mire Triton', 'Dark Salvation', 'Iname, Death Aspect', 'Skyship Stalker', 'Tyrant of Discord', 'Stromkirk Captain', 'Chromatic Lantern', 'Spare Supplies', 'Sire of Insanity', 'Nirkana Assassin', 'Llanowar Wastes', 'Pooling Venom', 'Vampire Nighthawk', 'Jace, Memory Adept', 'Fiery Justice', 'Brokers Hideout', 'Kabira Takedown', 'Nature''s Lore', 'Jaya Ballard', 'Hour of Promise', 'Kirtar''s Desire', 'Timely Reinforcements', 'Walk the Aeons', 'Hindering Light', 'Defy Gravity', 'Sterling Grove', 'Goldmire Bridge', 'Hinterland Harbor', 'Reality Ripple', 'Endless Horizons', 'Izoni, Thousand-Eyed', 'Shigeki, Jukai Visionary', 'Seize the Storm', 'Putrid Goblin', 'Illuminator Virtuoso', 'Rule of Law', 'Permeating Mass', 'Field of Ruin', 'Loyal Pegasus', 'Wildfield Borderpost', 'Ajani Unyielding', 'Fire Covenant', 'Artisan of Forms', 'Sanguine Statuette', 'Tooth and Nail', 'Grim Haruspex', 'Make Disappear', 'Drowned Catacomb', 'Cathartic Pyre', 'Prohibit', 'Skymarcher Aspirant', 'Repeal', 'Breya''s Apprentice', 'Enter the God-Eternals', 'Spirited Companion', 'Act of Aggression', 'Conflagrate', 'Touch the Spirit Realm', 'Rend Flesh', 'Death Baron', 'Wandering Mind', 'Savage Lands', 'Blossoming Calm', 'Evermind', 'Golgari Rot Farm', 'Early Frost', 'Mirrodin''s Core', 'Shriekhorn', 'Gargoyle Castle', 'Iname, Life Aspect', 'Homestead Courage', 'Edge of Autumn', 'Ancient Grudge', 'Stonework Packbeast', 'Searing Spear', 'Chain Lightning', 'Goblin Anarchomancer', 'Soulherder', 'Astral Cornucopia', 'Dryad Militant', 'Persistent Specimen', 'Double Vision', 'Azorius Guildgate', 'Blasphemous Act', 'Inscription of Ruin', 'Retreat to Kazandu', 'Terrarion', 'Archway Commons', 'Jace Beleren', 'Dakmor Salvage', 'Patch Up', 'Prey''s Vengeance', 'Lose Focus', 'Solfatara', 'Swans of Bryn Argoll', 'Planar Bridge', 'High-Speed Hoverbike', 'Haunted Fengraf', 'It That Betrays', 'Shardless Agent', 'Gaea''s Will', 'Shard Volley', 'Raze the Effigy', 'Postmortem Lunge', 'Scoured Barrens', 'Voldaren Stinger', 'Valorous Stance', 'Dreg Mangler', 'Nullpriest of Oblivion', 'Ghost Quarter', 'Frostwalk Bastion', 'Jack-o''-Lantern', 'Sorcerer Class', 'Kuldotha Forgemaster', 'Thought Erasure', 'Egon, God of Death', 'Master of the Pearl Trident', 'Saw It Coming', 'Blessed Alliance', 'Eiganjo Uprising', 'Declaration in Stone', 'Glorybringer', 'Vault Skirge', 'Ornithopter of Paradise', 'Magmatic Sinkhole', 'Temple of Enlightenment', 'Primal Amulet', 'Cordial Vampire', 'Demonic Dread', 'Jwari Disruption', 'Hissing Quagmire', 'Foreboding Ruins', 'Grisly Salvage', 'Graf Mole', 'Asmodeus the Archfiend', 'Archaeomancer', 'Electrolyze', 'Buried Ruin', 'Insatiable Hemophage', 'Magister of Worth', 'General Ferrous Rokiric', 'Prophetic Prism', 'Ral, Storm Conduit', 'Banisher Priest', 'Mina and Denn, Wildborn', 'Den Protector', 'Quest for the Holy Relic', 'Vampire''s Kiss', 'Tidespout Tyrant', 'Sinister Sabotage', 'Lay of the Land', 'Demigod of Revenge', 'Nimble Larcenist', 'Tranquil Cove', 'Secluded Glen', 'Intangible Virtue', 'Dirge Bat', 'Necrogoyf', 'Dragon Tempest', 'Starlit Sanctum', 'Harmonize', 'Sylvan Library', 'Blacklance Paragon', 'Spectra Ward', 'Woodland Cemetery', 'Goblin Bombardment', 'Falkenrath Gorger', 'Canyon Slough', 'Dragonlord''s Servant', 'Dread', 'Coastal Tower', 'Kher Keep', 'Lost Legacy', 'Knight of the White Orchid', 'Tormenting Voice', 'Specter''s Shroud', 'Auspicious Starrix', 'Terramorphic Expanse', 'Season of Growth', 'Shrine of Burning Rage', 'Winterthorn Blessing', 'Gateway Plaza', 'Kitchen Imp', 'Temple of Triumph', 'Moss-Pit Skeleton', 'Altered Ego', 'Ramunap Excavator', 'Blazing Rootwalla', 'Crack the Earth', 'Bojuka Brigand', 'Thornglint Bridge', 'Riveteers Charm', 'Fae Offering', 'Ram Through', 'Chandra, Pyromaster', 'Cloudpost', 'Riveteers Overlook', 'Incubation Druid', 'Morselhoarder', 'Tempest Djinn', 'Omen of the Forge', 'Demon Bolt', 'Asceticism', 'Urza''s Factory', 'Condemn', 'Vampire Lacerator', 'Servo Exhibition', 'Erebos''s Intervention', 'Clattering Augur', 'Dire-Strain Rampage', 'Cartel Aristocrat', 'Bad River', 'Consume the Meek', 'Axgard Armory', 'Hateful Eidolon', 'Myr Battlesphere', 'Quarantine Field', 'Grimdancer', 'Manabarbs', 'Viashino Pyromancer', 'Curse of Thirst', 'Verdant Command', 'War''s Toll', 'Dark Ritual', 'Elvish Mystic', 'Pirate''s Pillage', 'Memorial to War', 'Renegade Map', 'Ghostly Flicker', 'Hard Evidence', 'Cruel Ultimatum', 'Lonis, Cryptozoologist', 'Polymorph', 'Quirion Dryad', 'Sylvan Ranger', 'Expedite', 'Tidal Warrior', 'Warstorm Surge', 'Prophetic Bolt', 'Hero of Precinct One', 'Platinum Angel', 'Sigil Blessing', 'Raise the Alarm', 'Zulaport Cutthroat', 'Kin-Tree Invocation', 'Contagion Engine', 'Patchwork Automaton', 'Take Inventory', 'Reckoner''s Bargain', 'The Underworld Cookbook', 'Hornet Queen', 'Zhalfirin Void', 'Blood Fountain', 'Gideon Jura', 'Inevitable Betrayal', 'That Which Was Taken', 'Satyr Hoplite', 'Vigor', 'Umara Raptor', 'Nether Spirit', 'Mirror Entity', 'Thrumming Stone', 'Radiant Fountain', 'Sungold Sentinel', 'Think Twice', 'Temple of Epiphany', 'Mindlink Mech', 'Vengeful Strangler', 'Harbinger of the Tides', 'Labyrinth of Skophos', 'Alchemist''s Vial', 'Warriors'' Lesson', 'Bloodvial Purveyor', 'Disciple of the Vault', 'Daxos of Meletis', 'Kumano Faces Kakkazan', 'Disenchant', 'Spinerock Knoll', 'Guild Globe', 'Yahenni''s Expertise', 'Black Sun''s Zenith', 'Vampire Envoy', 'Orcish Lumberjack', 'Terastodon', 'Glimmerpost', 'Tymaret Calls the Dead', 'Failure // Comply', 'Riot Control', 'Mirrodin Besieged', 'Flood Plain', 'Gruul Turf', 'Slaughter Pact', 'The Raven''s Warning', 'Logic Knot', 'Dryad''s Revival', 'Mystifying Maze', 'Scab-Clan Berserker', 'Snow-Covered Swamp', 'Battlefield Forge', 'Zhur-Taa Goblin', 'Eye of Nowhere', 'Ondu Inversion', 'Malakir Rebirth', 'Firespout', 'Gift of Estates', 'Nomad Outpost', 'Orim''s Chant', 'Security Bypass', 'Meteor Golem', 'Sram''s Expertise', 'Grotag Bug-Catcher', 'Fact or Fiction', 'Spear of Heliod', 'Mobilized District', 'Azami, Lady of Scrolls', 'Dead Weight', 'Odds // Ends', 'Acolyte of Affliction', 'Curse of Echoes', 'Wrath of God', 'Forbidden Alchemy', 'Snow-Covered Plains', 'Farseek', 'Dripping-Tongue Zubera', 'Dovin Baan', 'Orzhov Signet', 'Knowledge Pool', 'Putrid Imp', 'Gatekeeper of Malakir', 'Kessig Wolf Run', 'Noxious Vapors', 'Nightveil Specter', 'Dawn of Hope', 'Maul of the Skyclaves', 'Loxodon Smiter', 'Mesmeric Fiend', 'Zealous Persecution', 'Marauding Raptor', 'Unburial Rites', 'Proclamation of Rebirth', 'Master of Death', 'Revitalize', 'Lead the Stampede', 'Stern Dismissal', 'Overwhelming Denial', 'Cartographer''s Survey', 'Energy Arc', 'Solitary Confinement', 'Sunblade Samurai', 'Wing Shards', 'Irregular Cohort', 'Negate', 'Synchronized Spellcraft', 'Frantic Inventory', 'Mishra''s Factory', 'Vedalken Shackles', 'Birds of Paradise', 'Flame-Blessed Bolt', 'Bygone Bishop', 'Lantern of the Lost', 'Vilis, Broker of Blood', 'Ravager''s Mace', 'Barbed Sextant', 'Elvish Visionary', 'Endless Sands', 'Devious Cover-Up', 'Judith, the Scourge Diva', 'Glint Hawk', 'Elves of Deep Shadow', 'Shuko', 'Ajani, Caller of the Pride', 'Dread Return', 'Vapor Snag', 'Sokenzan Smelter', 'Gavony Township', 'Windbrisk Heights', 'Ritual of Soot', 'Horde of Notions', 'Gossamer Chains', 'Oust', 'Jokulhaups', 'Costly Plunder', 'Seal of Cleansing', 'Conclave Tribunal', 'Sickening Shoal', 'Kazandu Blademaster', 'Tolsimir, Friend to Wolves', 'Ravenous Chupacabra', 'Form of the Dragon', 'Bag of Holding', 'Storm Herald', 'Temple of Malady', 'Earthshaker Khenra', 'Dimir Signet', 'Strength of Solidarity', 'Stasis Snare', 'Colossal Skyturtle', 'Liliana Vess', 'Everflowing Chalice', 'Strategic Planning', 'Desolation Twin', 'Bloodchief''s Thirst', 'Fling', 'Deep Analysis', 'Myr Incubator', 'Lena, Selfless Champion', 'Trace of Abundance', 'Blightning', 'Phyrexian Revoker', 'Lifespinner', 'Dire Tactics', 'Force of Rage', 'Lumbering Falls', 'Pillage', 'Horrifying Revelation', 'Hymn to Tourach', 'Castigate', 'Thirst for Meaning', 'Dusk Legion Zealot', 'Detention Sphere', 'Gadwick, the Wizened', 'Mephidross Vampire', 'Sylvan Awakening', 'Crumbling Necropolis', 'Elvish Piper', 'Pulse of the Grid', 'Phylath, World Sculptor', 'Kambal, Consul of Allocation', 'Diabolic Revelation', 'Boros Reckoner', 'Armament Master', 'Vivid Meadow', 'Slagwoods Bridge', 'Skirge Familiar', 'Rampant Growth', 'Murmuring Mystic', 'Wonder', 'Arcane Sanctum', 'Ethersworn Canonist', 'Stream of Thought', 'Ignite Memories', 'Skyclave Cleric', 'Briarbridge Patrol', 'Spellweaver Helix', 'Cursed Totem', 'Nezahal, Primal Tide', 'Mouth // Feed', 'Skybridge Towers', 'Deploy the Gatewatch', 'Dragon Mantle', 'Desperate Ravings', 'Fatestitcher', 'Vedalken Archmage', 'Liquimetal Torque', 'Watcher for Tomorrow', 'Bedevil', 'Sarkhan the Mad', 'Disciple of Bolas', 'Elspeth''s Nightmare', 'Wedding Invitation', 'Grixis Panorama', 'Overwhelming Splendor', 'Mirrorshell Crab', 'Fabricate', 'Din of the Fireherd', 'Hidden Strings', 'Trostani''s Summoner', 'Blackbloom Rogue', 'Pieces of the Puzzle', 'Acidic Slime', 'Fatal Grudge', 'Retreat to Hagra', 'Ranger''s Guile', 'Enduring Ideal', 'Hydra Broodmaster', 'Dream Trawler', 'Anoint', 'Treasure Cruise', 'Fieldmist Borderpost', 'Kabira Evangel', 'Ash Zealot', 'Clarion Spirit', 'Steel Sabotage', 'Hypergenesis', 'Vivid Marsh', 'Rise and Shine', 'Jace, Cunning Castaway', 'Sprite Dragon', 'Midnight Reaper', 'Cloud Key', 'Shivan Dragon', 'Jhoira, Weatherlight Captain', 'Far // Away', 'Angel of Glory''s Rise', 'Glen Elendra Archmage', 'Mind Rake', 'Force of Nature', 'Undercity Informer', 'Shatter the Sky', 'Azor''s Gateway', 'Gladecover Scout', 'Power Conduit', 'Phantasmagorian', 'Lux Cannon', 'Debtors'' Knell', 'Thawing Glaciers', 'Memnarch', 'Genesis Hydra', 'Kaya, Ghost Assassin', 'Mana Flare', 'Conqueror''s Pledge', 'Barrin, Tolarian Archmage', 'Stromkirk Noble', 'Acquisitions Expert', 'Vindicate', 'Izzet Charm', 'Noose Constrictor', 'Realm Razer', 'Strike It Rich', 'Bala Ged Recovery', 'Sign in Blood', 'Demanding Dragon', 'Nicol Bolas', 'Tendo Ice Bridge', 'Hypnotic Sprite', 'Honored Hydra', 'Cliffhaven Kitesail', 'Battle of Wits', 'Deliberate', 'Torment of Scarabs', 'Animate Dead', 'Everdream', 'Blood Operative', 'Sea Gate Colossus', 'Forsake the Worldly', 'Experimental Overload', 'Ondu Cleric', 'Mikokoro, Center of the Sea', 'Jhoira''s Familiar', 'Desolate Lighthouse', 'Ancient Stirrings', 'Tectonic Giant', 'Drossforge Bridge', 'Never // Return', 'Magistrate''s Scepter', 'Fblthp, the Lost', 'Coalition Relic', 'Edric, Spymaster of Trest', 'Herbal Poultice', 'Sky Hussar', 'Angel''s Grace', 'Trickbind', 'Read the Bones', 'Pollywog Symbiote', 'Drakuseth, Maw of Flames', 'Witching Well', 'Aeve, Progenitor Ooze', 'Dihada''s Ploy', 'Ally Encampment', 'Niambi, Esteemed Speaker', 'Bond of Revival', 'Martyr of Sands', 'Transmogrify', 'Fauna Shaman', 'Eternal Dragon', 'Vault of the Archangel', 'Call of the Conclave', 'Harabaz Druid', 'Thundering Raiju', 'Shelter', 'Orb of Dragonkind', 'Game Trail', 'Kami of False Hope', 'Filigree Angel', 'Moonhold', 'Ugin''s Conjurant', 'Urza''s Ruinous Blast', 'Grand Arbiter Augustin IV', 'Sprouting Thrinax', 'Dragonsguard Elite', 'Pyroclasm', 'Keruga, the Macrosage', 'Snowfield Sinkhole', 'Dragon''s Hoard', 'Brushfire Elemental', 'Uncharted Haven', 'Liege of the Tangle', 'Lupine Prototype', 'Liliana''s Specter', 'Lava Dart', 'Approach of the Second Sun', 'Oyobi, Who Split the Heavens', 'Bloodtithe Harvester', 'Resurgent Belief', 'Blue Sun''s Zenith', 'You Are Already Dead', 'Mirrorpool', 'Ornithopter', 'Gaea''s Revenge', 'Lavinia of the Tenth', 'The Birth of Meletis', 'Llanowar Elves', 'Sol Talisman', 'Tomb of Urami', 'Darkmoss Bridge', 'Radha, Heart of Keld', 'Molten Slagheap', 'Maestros Theater', 'Eldrazi Mimic', 'Lonely Sandbar', 'Basking Rootwalla', 'Skyclave Shade', 'Raging Ravine', 'Outland Liberator', 'Mind''s Desire', 'Woodfall Primus', 'Curiosity', 'Ghirapur Aether Grid', 'Goblin Dark-Dwellers', 'Captain''s Claws', 'Jalira, Master Polymorphist', 'Thraben Inspector', 'Gone Missing', 'Dreadhorde Invasion', 'Ophidian Eye', 'Greater Gargadon', 'Faerie Vandal', 'Tempered Steel', 'Essence Flux', 'Crystallization', 'Dennick, Pious Apprentice', 'Chief of the Foundry', 'Tamiyo''s Safekeeping', 'Balustrade Spy', 'Thief of Sanity', 'Drownyard Temple', 'Cursecatcher', 'Merfolk Looter', 'Rishkar, Peema Renegade', 'Seething Song', 'Purphoros''s Intervention', 'Stone Rain', 'Metallic Rebuke', 'Chasm Skulker', 'Circle of Confinement', 'Tanglepool Bridge', 'Temple of Plenty', 'Mycosynth Wellspring', 'Torrent Sculptor', 'Infinite Obliteration', 'Nightveil Predator', 'Brain Freeze', 'Immortal Servitude', 'Summer Bloom', 'Geist-Honored Monk', 'Living Lore', 'Chamber Sentry', 'Rune Snag', 'Kaleidoscorch', 'Commune with the Gods', 'Invert // Invent', 'Esper Charm', 'Prophet of Kruphix', 'Explore', 'Gods Willing', 'Mouth of Ronom', 'Ethersworn Sphinx', 'Arrogant Bloodlord', 'Karn''s Temporal Sundering', 'Broodmate Dragon', 'Carth the Lion', 'Mindslaver', 'The Mirari Conjecture', 'End Hostilities', 'Eerie Interlude', 'Whip of Erebos', 'Wooded Bastion', 'Ironroot Warlord', 'Pyrite Spellbomb', 'Chandra Ablaze', 'Cleansing Wildfire', 'Power Depot', 'Nether Traitor', 'Gilded Lotus', 'Tatsunari, Toad Rider', 'Fumigate', 'Mistvein Borderpost', 'Safewright Quest', 'Spikefield Hazard', 'Pyretic Ritual', 'Buried Alive', 'Obscura Storefront', 'Call of the Herd', 'Evangel of Heliod', 'Dimir Aqueduct', 'Woodland Champion', 'Mist-Syndicate Naga', 'Mizzium Skin', 'Falkenrath Forebear', 'Slitherhead', 'Cultivate', 'Underworld Dreams', 'Dive Down', 'Tolsimir Wolfblood', 'Angel of Despair', 'Vampire Socialite', 'Footfall Crater', 'Day of Judgment', 'Warleader''s Helix', 'Kira, Great Glass-Spinner', 'Wall of Omens', 'Sleight of Hand', 'Quiet Speculation', 'Palace Siege', 'Voldaren Epicure', 'Clan Defiance', 'Animist''s Awakening', 'Etherium Sculptor', 'Reassembling Skeleton', 'Savra, Queen of the Golgari', 'Consign // Oblivion', 'Gather the Townsfolk', 'Skeletal Swarming', 'Incinerate', 'Mwonvuli Acid-Moss', 'Grindclock', 'Arrogant Wurm', 'Smokestack', 'Tyrant''s Choice', 'Asylum Visitor', 'Collected Conjuring', 'Akroma''s Memorial', 'Zur''s Weirding', 'Favored Hoplite', 'Moon-Circuit Hacker', 'Weaver of Harmony', 'Myr Servitor', 'Izzet Signet', 'Lost Auramancers', 'Tyrant''s Scorn', 'Primal Command', 'Surgespanner', 'Signal Pest', 'Oni-Cult Anvil', 'Kolaghan, the Storm''s Fury', 'Spell Pierce', 'Soulflayer', 'Triskelion', 'Ilysian Caryatid', 'Rite of Oblivion', 'Dictate of Kruphix', 'Silverbluff Bridge', 'Bile Blight', 'Rise of the Hobgoblins', 'Primal Surge', 'Delver of Secrets', 'Scrapheap Scrounger', 'Thermo-Alchemist', 'Experimental Frenzy', 'Incandescent Aria', 'Reinforced Ronin', 'Curse of Death''s Hold', 'Phyrexian Dreadnought', 'Search for Tomorrow', 'Sejiri Shelter', 'Fusion Elemental', 'Shaman en-Kor', 'Barrenton Medic', 'Thought Scour', 'Bump in the Night', 'Queza, Augur of Agonies', 'Geomancer''s Gambit', 'Temple of Malice', 'Alms of the Vein', 'Metalwork Colossus', 'Porphyry Nodes', 'Mentor of the Meek', 'Meishin, the Mind Cage', 'Hada Freeblade', 'Hushwing Gryff', 'Novice Occultist', 'Erdwal Illuminator', 'Perilous Research', 'Stormchaser Drake', 'Pelakka Predation', 'Dimir Charm', 'Worst Fears', 'Momentary Blink', 'Diregraf Ghoul', 'Dragonspark Reactor', 'Kunoros, Hound of Athreos', 'Reckless Fireweaver', 'Impostor of the Sixth Pride', 'Nevermore', 'Phylactery Lich', 'Azorius Charm', 'Hotshot Mechanic', 'Hive Mind', 'Diabolic Edict', 'Shenanigans', 'Sephara, Sky''s Blade', 'Michiko''s Reign of Truth', 'Zombie Infestation', 'Bloodbraid Elf', 'Kessig Flamebreather', 'Tocatli Honor Guard', 'See the Truth', 'Jace, the Living Guildpact', 'Curse of the Pierced Heart', 'Kjeldoran Outpost', 'Figure of Destiny', 'Curse of Exhaustion', 'Slag Strider', 'Shriekmaw', 'Ranger of Eos', 'Mystical Teachings', 'Rally the Ancestors', 'Dread Fugue', 'Expedition Envoy', 'Hostage Taker', 'Dramatic Finale', 'Saproling Migration', 'Out of Time', 'Decree of Justice', 'Gloomshrieker', 'Possibility Storm', 'Stubborn Denial', 'Restoration Angel', 'Lochmere Serpent', 'Butcher Ghoul', 'Retraction Helix', 'Eldrazi Conscription', 'Ivy Lane Denizen', 'Viscera Seer', 'Elixir of Immortality', 'Sacred Fire', 'Selesnya Charm', 'Prognostic Sphinx', 'Aqueous Form', 'Malakir Blood-Priest', 'Magister Sphinx', 'Growth-Chamber Guardian', 'Temple of Deceit', 'Elemental Bond', 'Generous Visitor', 'Swiftwater Cliffs', 'Nicol Bolas, Planeswalker', 'Experimental Synthesizer', 'Mistcutter Hydra', 'Frost Marsh', 'Cabal Therapist', 'Slip Out the Back', 'Snow-Covered Forest', 'Needle Spires', 'Arc-Slogger', 'Orgg', 'Argentum Armor', 'Flame Slash', 'Goblin Electromancer', 'Ensoul Artifact', 'Thaumatic Compass', 'Mortarpod', 'Mystic Snake', 'Kopala, Warden of Waves', 'Rabbit Battery', 'Forbid', 'Falkenrath Aristocrat', 'Wild Pair', 'Otherworldly Gaze', 'Cloudstone Curio', 'Counterflux', 'Abrade', 'Sigrid, God-Favored'))) 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, 64.1, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (71.5 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Essence Flux', 'Memory''s Journey', 'Blightning', 'Endless One', 'Tyrant''s Scorn', 'Coastal Tower', 'Ghirapur Aether Grid', 'Crux of Fate', 'Tendrils of Agony', 'Sylvan Anthem', 'Uncharted Haven', 'Treasure Cruise', 'Yarok''s Fenlurker', 'Hidden Strings', 'Connive // Concoct', 'Barrin, Tolarian Archmage', 'Cathartic Pyre', 'Game Trail', 'Phantasmal Form', 'Retreat to Kazandu', 'Ugin''s Conjurant', 'Delirium Skeins', 'Wavesifter', 'Pull from Tomorrow', 'Gaea''s Will', 'Izzet Signet', 'Guild Globe', 'Specter''s Shroud', 'Snowfield Sinkhole', 'Radiant Fountain', 'Temple of Epiphany', 'Rakdos Signet', 'Incinerate', 'Mycosynth Wellspring', 'Elixir of Immortality', 'Early Frost', 'Sandwurm Convergence', 'Fodder Tosser', 'Expedition Envoy', 'Magistrate''s Scepter', 'Cosima, God of the Voyage', 'Inscription of Ruin', 'Kira, Great Glass-Spinner', 'Liliana''s Specter', 'Nicol Bolas, Planeswalker', 'Kher Keep', 'Harabaz Druid', 'Mist-Syndicate Naga', 'Mirrodin Besieged', 'Artful Dodge', 'Become Immense', 'Cloudpost', 'Signal Pest', 'Caves of Koilos', 'Secluded Steppe', 'Thaumatic Compass', 'Izoni, Thousand-Eyed', 'Akroma''s Blessing', 'Tooth and Nail', 'Champion of the Parish', 'Burst Lightning', 'Vampire Socialite', 'Umara Raptor', 'Temple of Malice', 'Proclamation of Rebirth', 'Base Camp', 'Dead Weight', 'Cryptic Caves', 'Grindclock', 'Genesis Wave', 'Renewed Faith', 'Rishadan Dockhand', 'Pooling Venom', 'Auspicious Starrix', 'Veteran Adventurer', 'Captivating Vampire', 'Future Sight', 'Soulherder', 'Stasis Snare', 'Vampire Nighthawk', 'Liege of the Tangle', 'Crack the Earth', 'Vindicate', 'Battle of Wits', 'Cordial Vampire', 'Sickening Shoal', 'Geist-Honored Monk', 'Turn Aside', 'Silvergill Adept', 'Spawning Pool', 'Elspeth''s Nightmare', 'Sorin Markov', 'Hieroglyphic Illumination', 'Flame-Blessed Bolt', 'Garruk Wildspeaker', 'Weathered Wayfarer', 'Haven of the Spirit Dragon', 'Oblivion Ring', 'Fieldmist Borderpost', 'Hissing Quagmire', 'Join the Dance', 'Trace of Abundance', 'Tempest Djinn', 'Wrench Mind', 'Negate', 'Dimir Signet', 'Hagra Mauling', 'Azorius Charm', 'Mire Triton', 'Sylvan Scrying', 'Talisman of Impulse', 'Dimir Aqueduct', 'Safewright Quest', 'Ethersworn Canonist', 'Oyobi, Who Split the Heavens', 'Ornithopter of Paradise', 'Counterflux', 'Evangel of Heliod', 'Blossoming Calm', 'Invigorate', 'Arc-Slogger', 'Swans of Bryn Argoll', 'Dark Salvation', 'Tidespout Tyrant', 'Illuminator Virtuoso', 'Call of the Herd', 'Coalition Relic', 'Obstinate Baloth', 'Blackbloom Rogue', 'Omen of the Forge', 'Fireball', 'Quiet Speculation', 'Riptide Laboratory', 'Moment of Craving', 'Mizzium Skin', 'Tangled Florahedron', 'Thrumming Stone', 'Resurgent Belief', 'Slip Out the Back', 'Nissa''s Pilgrimage', 'Nested Shambler', 'Akoum Battlesinger', 'Death Baron', 'Shardless Agent', 'Sylvan Primordial', 'Endbringer', 'First-Sphere Gargantua', 'Radiant Flames', 'Terramorphic Expanse', 'Karn''s Bastion', 'Goblin Electromancer', 'Chandra, Fire Artisan', 'Devouring Light', 'Firewild Borderpost', 'That Which Was Taken', 'Vigor', 'Aphemia, the Cacophony', 'Masked Bandits', 'Transmogrify', 'Squadron Hawk', 'Expansion // Explosion', 'Lavaclaw Reaches', 'Hushwing Gryff', 'You Are Already Dead', 'Boon of Safety', 'Moon-Circuit Hacker', 'Wild Pair', 'Sokenzan Smelter', 'Kuldotha Forgemaster', 'Ondu Cleric', 'Marauding Raptor', 'Sram''s Expertise', 'Runechanter''s Pike', 'Shivan Dragon', 'Eternal Dragon', 'Ancient Grudge', 'Warstorm Surge', 'Drift of Phantasms', 'Myr Incubator', 'Bala Ged Recovery', 'Drossforge Bridge', 'Kunoros, Hound of Athreos', 'Mesmeric Fiend', 'Maul of the Skyclaves', 'March from the Tomb', 'Weaver of Harmony', 'General Ferrous Rokiric', 'Tranquil Cove', 'Altered Ego', 'Endless Sands', 'Into the Story', 'Glimmer Bairn', 'Bontu''s Last Reckoning', 'Blossoming Sands', 'Jolrael, Mwonvuli Recluse', 'Tymaret Calls the Dead', 'Midnight Clock', 'Daru Spiritualist', 'Riot Control', 'Mistvault Bridge', 'Infinite Obliteration', 'White Sun''s Zenith', 'Sigrid, God-Favored', 'Malakir Rebirth', 'Nightveil Specter', 'Dirge Bat', 'Rampant Growth', 'Strength of Solidarity', 'Stony Strength', 'Shelter', 'Skyclave Shade', 'Cloud Key', 'Dreadhorde Invasion', 'Astral Slide', 'Master of Death', 'Honored Hydra', 'Cosmos Elixir', 'Prophet of Kruphix', 'Bloodline Keeper', 'Sorcerer Class', 'Merrow Reejerey', 'Goldmire Bridge', 'Overwhelming Denial', 'Cleansing Wildfire', 'Steel Sabotage', 'Primal Amulet', 'Commit // Memory', 'Insatiable Hemophage', 'Horrifying Revelation', 'Dovescape', 'Witching Well', 'Tendo Ice Bridge', 'Frantic Inventory', 'Seething Song', 'Oath of Liliana', 'Curse of Echoes', 'Evermind', 'Bone Splinters', 'Mind''s Desire', 'Planar Outburst', 'Coiling Oracle', 'Barren Moor', 'Gone Missing', 'Lantern Scout', 'Bump in the Night', 'Black Sun''s Zenith', 'Deadly Alliance', 'Not of This World', 'Fauna Shaman', 'Mirror Entity', 'Falkenrath Pit Fighter', 'Curse of the Cabal', 'Figure of Destiny', 'Rabbit Battery', 'Desolation Twin', 'Lochmere Serpent', 'Explore', 'Carth the Lion', 'Distended Mindbender', 'Dovin Baan', 'Mire''s Grasp', 'Mutilate', 'Stonework Packbeast', 'Murmuring Mystic', 'Chandra, Pyromaster', 'Erdwal Illuminator', 'Akroma, Angel of Fury', 'Metalwork Colossus', 'Sleight of Hand', 'Grixis Charm', 'Battlefield Thaumaturge', 'Seize the Storm', 'Vivid Creek', 'Spikefield Hazard', 'Calciform Pools', 'Sylvan Library', 'Lost Legacy', 'Coralhelm Guide', 'Gossamer Chains', 'Ophidian Eye', 'Distortion Strike', 'Snow-Covered Plains', 'Mirrodin''s Core', 'Tormenting Voice', 'Satyr Hoplite', 'Braids, Cabal Minion', 'Solfatara', 'Temple of Deceit', 'Underworld Dreams', 'Fiery Temper', 'Zombie Infestation', 'Abiding Grace', 'Grim Lavamancer', 'Circle of Confinement', 'Court Homunculus', 'Gatekeeper of Malakir', 'Exclude', 'Howltooth Hollow', 'Experimental Synthesizer', 'Seal of Cleansing', 'Claws of Gix', 'Blood for Bones', 'Migratory Greathorn', 'Bond of Revival', 'Reap the Past', 'Stromkirk Captain', 'Primal Command', 'Abrade', 'Jokulhaups', 'Dread Return', 'Pillage', 'Hatching Plans', 'Shrine of Burning Rage', 'Asmodeus the Archfiend', 'Egon, God of Death', 'Conclave Mentor', 'Earthquake', 'Improbable Alliance', 'Sanguine Statuette', 'Arcane Sanctum', 'Buried Alive', 'Make Disappear', 'Edric, Spymaster of Trest', 'Divert', 'Stromkirk Noble', 'Ignite Memories', 'Saw It Coming', 'Wingcrafter', 'Eidolon of Countless Battles', 'Izzet Charm', 'Magmatic Sinkhole', 'Slagwoods Bridge', 'Bloodvial Purveyor', 'Waterfront District', 'Dragon''s Hoard', 'Lashwrithe', 'Izzet Boilerworks', 'Hotshot Mechanic', 'Trickbind', 'Tanglepool Bridge', 'Bone Shards', 'Ajani, Caller of the Pride', 'Ponder', 'Clattering Augur', 'Ramunap Excavator', 'Niveous Wisps', 'Llanowar Elves', 'Pouncing Shoreshark', 'Gods Willing', 'Graveyard Marshal', 'Conflagrate', 'Niambi, Esteemed Speaker', 'Emmara, Soul of the Accord', 'Astral Drift', 'Blight Mamba', 'Dismal Backwater', 'Summer Bloom', 'Orb of Dragonkind', 'Hero of Precinct One', 'Crystallization', 'Acidic Slime', 'Arcbound Ravager', 'Worst Fears', 'Ghost Quarter', 'Iname, Life Aspect', 'End-Raze Forerunners', 'Clifftop Retreat', 'Reassembling Skeleton', 'Season of Growth', 'Failure // Comply', 'Dennick, Pious Apprentice', 'Rune Snag', 'Arcbound Mouser', 'Incandescent Aria', 'Golgari Rot Farm', 'Augur of Bolas', 'Kin-Tree Invocation', 'Frantic Search', 'Manabarbs', 'Defy Gravity', 'Umara Entangler', 'Pulse of the Grid', 'Retreat to Hagra', 'Soulflayer', 'Dragonspark Reactor', 'Arbor Elf', 'Storm Herald', 'Ravenous Chupacabra', 'Kor Duelist', 'Anchor to Reality', 'Lodestone Golem', 'Gods'' Eye, Gate to the Reikai', 'Spinerock Knoll', 'Disenchant', 'Lay of the Land', 'Prophetic Bolt', 'Servo Exhibition', 'Kaya, Ghost Assassin', 'Stern Dismissal', 'Approach of the Second Sun', 'Perilous Research', 'Security Bypass', 'Austere Command', 'Ondu Inversion', 'Whispers of the Muse', 'Devious Cover-Up', 'Dual Strike', 'Jace, the Living Guildpact', 'Platinum Angel', 'Kolaghan, the Storm''s Fury', 'Incubation Druid', 'Fatal Grudge', 'Mana Flare', 'Ranger''s Guile', 'Filigree Angel', 'Lich''s Mastery', 'Sacred Fire', 'Graf Mole', 'Mirrorshell Crab', 'Dramatic Finale', 'Essence Capture', 'Sylvan Advocate', 'Curiosity', 'Grotag Bug-Catcher', 'Gitaxian Probe', 'Thought Scour', 'Dragon Tempest', 'Contagion Clasp', 'Balustrade Spy', 'Arrogant Wurm', 'Ground Rift', 'Inscription of Insight', 'Desecration Demon', 'Sylvan Awakening', 'Temple of Mystery', 'Electrolyze', 'Savra, Queen of the Golgari', 'Restore Balance', 'Gateway Plaza', 'Sylvan Ranger', 'Thermo-Alchemist', 'Think Twice', 'Urza''s Factory', 'Planar Bridge', 'Jaya Ballard', 'Beastcaller Savant', 'Sun Droplet', 'Gigadrowse', 'Realm Razer', 'Shriekmaw', 'Phyrexian Revoker', 'Out of Time', 'Gruul Turf', 'Unsubstantiate', 'Mentor of the Meek', 'Permeating Mass', 'Azorius Signet', 'Genesis Hydra', 'Fumigate', 'Reckless Fireweaver', 'Laboratory Maniac', 'Angel of Despair', 'Glint-Horn Buccaneer', 'Voldaren Stinger', 'Thundering Raiju', 'Spectral Procession', 'Vampire Lacerator', 'Blue Sun''s Zenith', 'Deep Forest Hermit', 'Moss-Pit Skeleton', 'Jungle Shrine', 'Drowned Catacomb', 'Bygone Bishop', 'Jwari Shapeshifter', 'Chasm Skulker', 'Yahenni''s Expertise', 'Vault Skirge', 'Enter the God-Eternals', 'Vision Skeins', 'Talisman of Unity', 'Diregraf Colossus', 'Queza, Augur of Agonies', 'Vivid Marsh', 'Sanguine Sacrament', 'Foreboding Ruins', 'Vivid Crag', 'Adventuring Gear', 'Etherium Sculptor', 'Glimmerpost', 'Axgard Armory', 'Cabal Therapist', 'Liliana Vess', 'Power Depot', 'Mangara of Corondor', 'Sol Talisman', 'Regrowth', 'Colossal Skyturtle', 'Ethersworn Sphinx', 'Swallow Whole', 'Prognostic Sphinx', 'Decree of Justice', 'Skylasher', 'Curse of Exhaustion', 'Salvage Titan', 'Wedding Invitation', 'Bile Blight', 'Secluded Glen', 'Elvish Clancaller', 'Watcher for Tomorrow', 'Jace Beleren', 'Eldrazi Conscription', 'Cursed Totem', 'Oracle of Mul Daya', 'Nature''s Lore', 'Victim of Night', 'Auratouched Mage', 'Wight', 'Cleansing Nova', 'Ancient Stirrings', 'Living Lore', 'Raise the Alarm', 'Kaleidoscorch', 'Shalai, Voice of Plenty', 'Temple of Silence', 'The Mirari Conjecture', 'Glass Casket', 'Impostor of the Sixth Pride', 'Stream of Thought', 'Iname, Death Aspect', 'Firemantle Mage', 'Esper Charm', 'Aqueous Form', 'Orim''s Chant', 'Sarkhan the Mad', 'Dreg Mangler', 'Walk the Aeons', 'Terminus', 'Circular Logic', 'Dragonsguard Elite', 'Hindering Light', 'Azorius Guildgate', 'Jhoira, Weatherlight Captain', 'Searing Spear', 'Edge of Autumn', 'Aeve, Progenitor Ooze', 'Angel of Sanctions', 'Psychatog', 'Cultivator of Blades', 'Fact or Fiction', 'Karn, Silver Golem', 'Boonweaver Giant', 'Sterling Grove', 'Prohibit', 'Mephidross Vampire', 'Oni-Cult Anvil', 'Consume the Meek', 'Deliberate', 'Nomad Outpost', 'Cruel Ultimatum', 'Scoured Barrens', 'Urza''s Ruinous Blast', 'Bogardan Hellkite', 'Swiftwater Cliffs', 'Necroplasm', 'Forbid', 'Harmonize', 'Reckoner''s Bargain', 'Ravager''s Mace', 'End Hostilities', 'Invert // Invent', 'Undercity Informer', 'Gideon Jura', 'Buried Ruin', 'Novice Occultist', 'Gaea''s Revenge', 'Sprouting Thrinax', 'Forsake the Worldly', 'Hagra Diabolist', 'Force of Rage', 'Selesnya Charm', 'Fireblade Charger', 'Keruga, the Macrosage', 'Suture Priest', 'Heartless Act', 'Eerie Interlude', 'Karn''s Temporal Sundering', 'Galvanic Relay', 'Arcanis the Omnipotent', 'Kor Bladewhirl', 'Fabricate', 'Goblin Anarchomancer', 'Kumano Faces Kakkazan', 'Prowling Serpopard', 'Demonic Dread', 'Lead the Stampede', 'Genesis', 'Viscera Seer', 'Ally Encampment', 'Teachings of the Kirin', 'Altar of the Brood', 'Fossil Find', 'Form of the Dragon', 'Firespout', 'Judith, the Scourge Diva', 'Boros Reckoner', 'Rise and Shine', 'Demigod of Revenge', 'Icehide Golem', 'Mikokoro, Center of the Sea', 'Colossification', 'Cartographer''s Survey', 'The Raven''s Warning', 'Boomerang', 'Michiko''s Reign of Truth', 'Traxos, Scourge of Kroog', 'Semblance Anvil', 'Embodiment of Agonies', 'Vapor Snag', 'Master of the Pearl Trident', 'Zhalfirin Void', 'Daxos of Meletis', 'Nightveil Predator', 'Argent Sphinx', 'Champion of Wits', 'Batterbone', 'Claim the Firstborn', 'Fatestitcher', 'Fae Offering', 'Commence the Endgame', 'Kuldotha Rebirth', 'Chromatic Lantern', 'Experimental Overload', 'Kabira Takedown', 'Fblthp, the Lost', 'Quest for the Nihil Stone', 'Jack-o''-Lantern', 'Irregular Cohort', 'Bad River', 'Behold the Multiverse', 'Liquimetal Torque', 'Flame-Kin Zealot', 'Lupine Prototype', 'Secluded Courtyard', 'Outland Liberator', 'Treacherous Blessing', 'Chain Lightning', 'Mission Briefing', 'Patch Up', 'Universal Automaton', 'Raze the Effigy', 'Flood of Recollection', 'Hostage Taker', 'Alchemist''s Vial', 'Kefnet the Mindful', 'Brokkos, Apex of Forever', 'Pyroclasm', 'Gavony Township', 'Dimir Charm', 'Blood Fountain', 'Thraben Inspector', 'Bloodtithe Harvester', 'Flood Plain', 'Spectra Ward', 'Spare Supplies', 'Collected Conjuring', 'Vivid Meadow', 'Frost Marsh', 'Nirkana Assassin', 'Wild Mongrel', 'Harbinger of the Tides', 'Fertile Ground', 'Khalni Ambush', 'Haunted Fengraf', 'Oversoul of Dusk', 'Deploy the Gatewatch', 'Vedalken Shackles', 'Vault of the Archangel', 'Ral Zarek', 'Revoke Existence', 'Bedevil', 'Immortal Servitude', 'Mouth // Feed', 'Cultivate', 'Nullpriest of Oblivion', 'Wrath of God', 'Kambal, Consul of Allocation', 'Viashino Pyromancer', 'Experimental Frenzy', 'Tyrant''s Choice', 'Zhur-Taa Goblin', 'Ingenious Infiltrator', 'Possibility Storm', 'Moonhold', 'Shard Volley', 'Gilded Lotus', 'Groundswell', 'Flame Jab', 'Glen Elendra Archmage', 'Kessig Flamebreather', 'Slaughter Pact', 'Acolyte of Affliction', 'Torrent Sculptor', 'Riveteers Overlook', 'Elderfang Ritualist', 'Riveteers Charm', 'Orzhov Basilica', 'Mind Rake', 'Mwonvuli Acid-Moss', 'Mystifying Maze', 'Brokers Hideout', 'Condemn', 'Bojuka Brigand', 'Howling Mine', 'Diabolic Revelation', 'Selesnya Sanctuary', 'Polymorph', 'Duress', 'Tombstalker', 'Memorial to War', 'Pieces of the Puzzle', 'Nylea''s Presence', 'Wonder', 'Staggering Insight', 'Kami''s Flare', 'Timely Reinforcements', 'Erebos''s Intervention', 'Shigeki, Jukai Visionary', 'Desperate Ritual', 'Contagion Engine', 'See the Truth', 'Opt', 'Animist''s Awakening', 'Blade Splicer', 'Concerted Defense', 'Ivy Lane Denizen', 'Desperate Ravings', 'Dictate of Kruphix', 'Tymaret, Chosen from Death', 'Kessig Wolf Run', 'Woodfall Primus', 'Kabira Evangel', 'Maestros Charm', 'Quarantine Field', 'Fire-Lit Thicket', 'Dire-Strain Rampage', 'Rustvale Bridge', 'Kjeldoran Outpost', 'Take Inventory', 'Archway Commons', 'Infernal Grasp', 'Triskelion', 'Rakdos Charm', 'Grapeshot', 'Mindslaver', 'Mystical Teachings', 'Never // Return', 'Lena, Selfless Champion', 'Ranger of Eos', 'Day of Judgment', 'Commune with the Gods', 'Conqueror''s Pledge', 'Braingeyser', 'Act of Aggression', 'Alms of the Vein', 'Azami, Lady of Scrolls', 'Nivmagus Elemental', 'Piper of the Swarm', 'Maelstrom Nexus', 'War''s Toll', 'Meteor Golem', 'Trostani''s Summoner', 'Ixalan''s Binding', 'Barbed Sextant', 'Phyrexian Dreadnought', 'Sunblade Samurai', 'Dryad''s Revival', 'Gigantomancer', 'Thunderbreak Regent', 'Otherworldly Gaze', 'Slagstorm', 'Fiery Justice', 'Lose Focus', 'Obsessive Search', 'Crumbling Necropolis', 'Dragonlord''s Servant', 'Elemental Bond', 'Vizier of the Menagerie', 'Cliffhaven Kitesail', 'Thirst for Discovery', 'Temple of Plenty', 'Dark Ritual', 'Costly Plunder', 'Eldrazi Mimic', 'Dread Fugue', 'Bond of Insight', 'Tolsimir Wolfblood', 'Discovery // Dispersal', 'Fading Hope', 'Jwari Disruption', 'Merfolk Looter', 'Blazing Specter', 'Shrapnel Blast', 'Stone Rain', 'Altar''s Reap', 'Read the Bones', 'Wild Cantor', 'Anoint', 'Vilis, Broker of Blood', 'Ancestral Anger', 'Skirge Familiar', 'Lumbering Falls', 'Whip of Erebos', 'Homestead Courage', 'Asylum Visitor', 'Spirited Companion', 'Furyblade Vampire', 'It That Betrays', 'Shrieking Affliction', 'Battlefield Forge', 'Wall of Omens', 'Fusion Elemental', 'Captain''s Claws', 'Farseek', 'Sire of Insanity', 'Wilt-Leaf Liege', 'Power Conduit', 'Curse of the Pierced Heart', 'Chief of the Foundry', 'Double Vision', 'Powerstone Shard', 'Slumbering Tora', 'Ironroot Warlord', 'Demanding Dragon', 'Sejiri Refuge', 'Muddle the Mixture', 'Putrid Imp', 'Memory Lapse', 'Carnophage', 'Myojin of Life''s Web', 'Valorous Stance', 'Cursecatcher', 'Silundi Vision', 'Cragplate Baloth', 'Woodland Champion', 'Favored Hoplite', 'Cartel Aristocrat', 'Shaman en-Kor', 'Earthshaker Khenra', 'Hinata, Dawn-Crowned', 'Sigil Blessing', 'Vedalken Archmage', 'Sphere of Safety', 'Tamiyo''s Safekeeping', 'Nevermaker', 'Cathar Commando', 'Ral, Storm Conduit', 'Kalastria Healer', 'Renegade Map', 'Hypnotic Sprite', 'Bloodchief''s Thirst', 'Kitchen Imp', 'Disrupting Scepter', 'Obscura Charm', 'Sign in Blood', 'Massive Might', 'Patchwork Automaton', 'Strike It Rich', 'Reality Ripple', 'Regal Force', 'Tomb of Urami', 'Goblin Dark-Dwellers', 'Porphyry Nodes', 'Larger Than Life', 'Meishin, the Mind Cage', 'Frostwalk Bastion', 'Stubborn Denial', 'Midnight Reaper', 'Llanowar Wastes', 'Cloudstone Curio', 'Tolsimir, Friend to Wolves', 'Martyr of Sands', 'Lantern of the Lost', 'Gladecover Scout', 'Purphoros''s Intervention', 'Gargoyle Castle', 'Sea Gate Colossus', 'Mobilized District', 'Call of the Conclave', 'Sungold Sentinel', 'Knight of the White Orchid', 'Strategic Planning', 'Unburial Rites', 'Putrid Goblin', 'Boros Signet', 'Mystic Retrieval', 'Retraction Helix', 'Tidal Warrior', 'Declaration in Stone', 'Warleader''s Helix', 'Consign // Oblivion', 'Riftwing Cloudskate', 'Skybridge Towers', 'Hour of Promise', 'Invisible Stalker', 'Gather the Townsfolk', 'Dihada''s Ploy', 'Footfall Crater', 'Satyr Wayfinder', 'Spear of Heliod', 'Feed the Swarm', 'Necrogoyf', 'Epic Experiment', 'Razortide Bridge', 'Archaeomancer', 'Obscura Storefront', 'Veteran Warleader', 'Hypergenesis', 'Winterthorn Blessing', 'Deep Analysis', 'Wildfield Borderpost', 'Disciple of the Vault', 'Forbidden Alchemy', 'Myr Servitor', 'Blighted Agent', 'Pyromancer''s Swath', 'Azor''s Gateway', 'Asceticism', 'Tezzeret''s Gambit', 'Blackmail', 'Herbal Poultice', 'Overwhelming Splendor', 'Ichorclaw Myr', 'Touch the Spirit Realm', 'Warriors'' Lesson', 'Wirewood Herald', 'Tocatli Honor Guard', 'Expedite', 'Orzhov Signet', 'Arrogant Bloodlord', 'Dawn of Hope', 'Wayward Swordtooth', 'Terastodon', 'Briarbridge Patrol', 'Angel of Glory''s Rise', 'Jace, Memory Adept', 'Dread', 'The Modern Age', 'Neutralize', 'Contaminated Ground', 'Caravan Vigil', 'Momentary Blink', 'Zof Consumption', 'Murderous Cut', 'Titanic Brawl', 'Shatterskull Minotaur', 'Alchemist''s Refuge', 'Prophetic Prism', 'Ransack the Lab', 'Skyship Stalker', 'Temple of Abandon', 'Champion of Dusk', 'Talisman of Resilience', 'Fling', 'Chamber Sentry', 'Ecstatic Awakener', 'Meandering River', 'Relentless Rats', 'Nevermore', 'Gideon''s Intervention', 'Mogg War Marshal', 'Judge''s Familiar', 'Voldaren Epicure', 'Starlit Sanctum', 'Vivien''s Arkbow', 'Delver of Secrets', 'Rotten Reunion', 'Stirring Wildwood', 'Labyrinth of Skophos', 'Verdant Command', 'Odds // Ends', 'Phylactery Lich', 'Hada Freeblade', 'Curse of Misfortunes', 'Dusk Legion Zealot', 'Darkmoss Bridge', 'Snow-Covered Forest', 'Revitalize', 'Rootbound Crag', 'Akroma''s Memorial', 'Lord of the Undead', 'Elvish Piper', 'Kazuul''s Fury', 'Palace Siege', 'Rise of the Hobgoblins', 'Kirtar''s Desire', 'Mistveil Plains', 'Far // Away', 'Pack Rat', 'Loxodon Smiter', 'Rift Sower', 'Frontier Bivouac', 'Woodland Cemetery', 'Hateful Eidolon', 'Evolving Wilds', 'Debtors'' Knell', 'Sprite Dragon', 'Generous Visitor', 'Ornithopter', 'Lonis, Cryptozoologist', 'Flame Rift', 'Thought Erasure', 'Magister Sphinx', 'Blood Operative', 'Dryad Militant', 'Rite of Oblivion', 'Abundant Harvest', 'Skyclave Cleric', 'Prahv, Spires of Order', 'Teferi, Mage of Zhalfir', 'Brain Freeze', 'Kopala, Warden of Waves', 'Runed Halo', 'Grisly Salvage', 'Thief of Sanity', 'Rally the Ancestors', 'Eye of Nowhere', 'Surgespanner', 'Fire Covenant', 'Mouth of Ronom', 'Sinister Sabotage', 'Memnarch', 'Astral Cornucopia', 'Maestros Theater', 'Veinfire Borderpost', 'The Underworld Cookbook', 'Goblin Bombardment', 'Cruel Reality', 'Cloudblazer', 'Exhaustion', 'Zur''s Weirding', 'Lux Cannon', 'Breya''s Apprentice', 'Rule of Law', 'Dominating Vampire', 'Dakmor Salvage', 'Broodmate Dragon', 'Grand Arbiter Augustin IV', 'Invoke Calamity', 'Grixis Panorama', 'Malakir Blood-Priest', 'Tatsunari, Toad Rider', 'Damping Engine', 'Slag Strider', 'Undead Butler', 'Bloodbraid Elf', 'Necrotic Ooze', 'Nyxathid', 'Mystic Snake', 'Basking Rootwalla', 'Life''s Finale', 'Vivid Grove', 'Torment of Scarabs', 'Acquisitions Expert', 'Atris, Oracle of Half-Truths', 'Pirate''s Pillage', 'Mistvein Borderpost', 'Wing Shards', 'Eiganjo Uprising', 'Linvala, the Preserver', 'Elvish Mystic', 'High-Speed Hoverbike', 'Merfolk Mistbinder', 'Lavinia of the Tenth', 'Barbarian Ring', 'Hydra Broodmaster', 'Spellweaver Helix', 'Glacial Fortress', 'Temple of Malady', 'Search for Tomorrow', 'Abzan Charm', 'Ritual of Soot', 'Animate Dead', 'Curse of Death''s Hold', 'Dissolve', 'Scurry Oak', 'Intangible Virtue', 'Timeless Witness', 'Voltaic Key', 'Silverbluff Bridge', 'Gloomshrieker', 'Sky Hussar', 'Chain of Plasma', 'Elves of Deep Shadow', 'Repeal', 'Everdream', 'Paralyze', 'Blacklance Paragon', 'Pollywog Symbiote', 'Molten Slagheap', 'Desolate Lighthouse', 'Darksteel Colossus', 'Might of Old Krosa', 'Demon Bolt', 'Curse of Thirst', 'Lava Dart', 'Sandsteppe Citadel', 'Force of Nature', 'Needle Spires', 'Greater Gargadon', 'Brainstone', 'Orcish Lumberjack', 'Diregraf Ghoul', 'Spell Pierce', 'Barrenton Medic', 'Fiend Hunter', 'Nether Spirit', 'Ajani''s Presence', 'Mina and Denn, Wildborn', 'Riddlesmith', 'Blasphemous Act', 'Crystal Shard', 'Bag of Holding', 'Temple of Enlightenment', 'Zulaport Cutthroat', 'Morselhoarder', 'Hinterland Harbor', 'Dripping-Tongue Zubera', 'Castigate', 'Lightning Strike', 'Geomancer''s Gambit', 'Voltage Surge', 'Faerie Miscreant', 'Drownyard Temple', 'Ensoul Artifact', 'Falkenrath Forebear', 'Snow-Covered Swamp', 'Ram Through', 'Nicol Bolas', 'Thawing Glaciers', 'Blessed Alliance', 'Orgg', 'Myth Realized', 'Scrabbling Claws', 'Wandering Mind', 'Banisher Priest', 'Ghostly Flicker', 'Skeletal Swarming', 'Phylath, World Sculptor', 'Ulvenwald Mysteries', 'Energy Arc', 'Thirst for Meaning', 'Vampire''s Kiss', 'Hanweir Garrison', 'Smallpox', 'Logic Knot', 'Demonic Embrace', 'Sea Gate Wreckage', 'Lost Auramancers', 'Chief Engineer', 'Arch of Orazca', 'Quicken', 'Rend Flesh', 'Hurricane', 'Biting-Palm Ninja', 'Pelakka Predation', 'Tectonic Giant', 'Pyretic Ritual', 'Dead // Gone', 'Raging Ravine', 'Lonely Sandbar', 'Ghitu Encampment', 'Angel''s Grace', 'Myojin of Infinite Rage', 'Canyon Slough', 'Zealous Persecution', 'Kazandu Blademaster', 'Mortarpod', 'Glorybringer', 'Magister of Worth', 'Jalira, Master Polymorphist', 'Din of the Fireherd', 'The Birth of Meletis', 'Ash Zealot', 'Nimble Larcenist', 'Chamber of Manipulation', 'Seaside Citadel', 'Shenanigans', 'Elvish Visionary', 'Intervention Pact', 'Quirion Dryad', 'Inevitable Betrayal', 'Field of Ruin', 'Ilysian Caryatid', 'Primal Surge', 'Grim Haruspex', 'Solitary Confinement', 'Hive Mind', 'Tradewind Rider', 'Dive Down', 'Hymn to Tourach', 'Shuko', 'Shriekhorn', 'Sarcomancy', 'Smokestack', 'Gadwick, the Wizened', 'Birds of Paradise', 'Dragonskull Summit', 'Rishkar, Peema Renegade', 'Gruul Signet', 'Epochrasite', 'Ajani Unyielding', 'Talisman of Conviction', 'Quest for Pure Flame', 'Mishra''s Factory', 'Wooded Bastion', 'Diabolic Edict', 'Electrostatic Field', 'Oust', 'Assault Strobe', 'Faithful Mending', 'Disciple of Bolas', 'Flame Slash', 'Temple of Triumph', 'Jace, Cunning Castaway', 'Falkenrath Aristocrat', 'Mana Leak', 'Drakuseth, Maw of Flames', 'Vampire Opportunist', 'Horde of Notions', 'Surge Node', 'Tempered Steel', 'Thornglint Bridge', 'Reinforced Ronin', 'Mirrorpool', 'Scrapheap Scrounger', 'Tide Shaper', 'Reverent Hoplite', 'Conclave Tribunal', 'Archfiend''s Vessel', 'Restoration Angel', 'Coralhelm Commander', 'Hypnotic Specter', 'Dragon Mantle', 'Faithless Salvaging', 'Oath of Gideon', 'Savage Lands', 'Hunted Nightmare', 'Prey''s Vengeance', 'Chandra Ablaze', 'Consuming Vapors', 'Tyrant of Discord', 'Growth-Chamber Guardian', 'Kami of False Hope', 'He Who Hungers', 'Den Protector', 'Burning of Xinye', 'Sejiri Shelter', 'Thoughtpicker Witch', 'Terrarion', 'Kazandu Mammoth', 'Myr Battlesphere', 'Jhoira''s Familiar', 'Noose Constrictor', 'Armament Master', 'Rebuild', 'Enduring Ideal', 'Hornet Queen', 'Persistent Specimen', 'Scab-Clan Berserker', 'Pyrite Spellbomb', 'Shatter the Sky', 'Dire Tactics', 'Endless Horizons', 'Gift of Estates', 'Nether Traitor', 'Insolent Neonate', 'Phantasmagorian', 'Westvale Abbey', 'Skymarcher Aspirant', 'Saproling Migration', 'Raven''s Crime', 'Mystic Monastery', 'Mistcutter Hydra', 'Liquimetal Coating', 'Halimar Excavator', 'Faerie Vandal', 'Everflowing Chalice', 'Thassa''s Intervention', 'Tranquil Thicket', 'Radha, Heart of Keld', 'Vengeful Strangler', 'Detention Sphere', 'Falkenrath Gorger', 'Hard Evidence', 'Tidehollow Strix', 'Knowledge Pool', 'Artisan of Forms', 'Slitherhead', 'Stormchaser Drake', 'Plea for Guidance', 'Metallic Rebuke', 'Mindlink Mech', 'Vampiric Fury', 'Jeskai Ascendancy', 'Grimdancer', 'Butcher Ghoul', 'Brushfire Elemental', 'Vampire Envoy', 'Lifespinner', 'Clan Defiance', 'Postmortem Lunge', 'Nezahal, Primal Tide', 'Dream Trawler', 'Synchronized Spellcraft', 'Noxious Vapors', 'Blazing Rootwalla', 'Nissa, Worldwaker'))) 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, 71.5, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (69.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Azorius Guildgate', 'Logic Knot', 'Expansion // Explosion', 'Chain Lightning', 'Detention Sphere', 'Champion of Wits', 'Dragonskull Summit', 'Flood Plain', 'Transmogrify', 'Student of Warfare', 'Myr Battlesphere', 'Act of Aggression', 'Abrade', 'Atris, Oracle of Half-Truths', 'Swiftwater Cliffs', 'Quicken', 'Barbarian Ring', 'Viashino Pyromancer', 'Kaya, Ghost Assassin', 'Pillage', 'Mana Leak', 'Ajani, the Greathearted', 'Fact or Fiction', 'Midnight Reaper', 'Seal of Cleansing', 'Timeless Witness', 'Chandra, the Firebrand', 'The Modern Age', 'Venerable Knight', 'Outland Liberator', 'Tranquil Cove', 'Asylum Visitor', 'Thrill of Possibility', 'Hymn to Tourach', 'Dead Weight', 'Claws of Gix', 'Satyr Wayfinder', 'Birds of Paradise', 'Forgotten Creation', 'Benalish Marshal', 'Wall of Omens', 'Bloodchief''s Thirst', 'Wastes', 'Lavaclaw Reaches', 'Moorland Haunt', 'Arch of Orazca', 'Tectonic Giant', 'Repeal', 'Verdant Command', 'Zhalfirin Void', 'Dismal Backwater', 'Infernal Grasp', 'Debt to the Kami', 'Shardless Agent', 'Saw It Coming', 'Fading Hope', 'Watcher for Tomorrow', 'Radha, Heart of Keld', 'See the Truth', 'Tragic Slip', 'Fire-Lit Thicket', 'Eldrazi Mimic', 'Painful Truths', 'Plaguecrafter', 'Growth-Chamber Guardian', 'Treasure Cruise', 'Duress', 'Sandsteppe Citadel', 'Buried Alive', 'Desperate Ritual', 'Evolving Wilds', 'Origin Spellbomb', 'Advent of the Wurm', 'Far // Away', 'Lonely Sandbar', 'Wooded Bastion', 'Izzet Boilerworks', 'Temple of Epiphany', 'Cathartic Reunion', 'Shreds of Sanity', 'Reckless Waif', 'Elvish Mystic', 'Ruination Guide', 'Blood Fountain', 'Battle of Wits', 'Tymaret Calls the Dead', 'Sylvan Library', 'Butcher of the Horde', 'Mycosynth Wellspring', 'Liliana Vess', 'Conduit of Ruin', 'Doomed Traveler', 'Honor of the Pure', 'Lightning Strike', 'Wasteland Strangler', 'Nomad Outpost', 'Seasons Past', 'Terramorphic Expanse', 'Cloudpost', 'Thornglint Bridge', 'Mind''s Desire', 'Qasali Pridemage', 'Strike It Rich', 'Hieroglyphic Illumination', 'Desolate Lighthouse', 'Rule of Law', 'Wash Away', 'Terrarion', 'Champion of Lambholt', 'Battle Screech', 'Orim''s Chant', 'Vampires'' Vengeance', 'Brokers Hideout', 'Erebos''s Intervention', 'Enduring Ideal', 'Stone Rain', 'Lodestone Golem', 'Cormela, Glamour Thief', 'Gideon Jura', 'Counterflux', 'Perilous Research', 'Flame Slash', 'Fatal Grudge', 'Kuldotha Forgemaster', 'Shatter the Sky', 'Zombify', 'Porphyry Nodes', 'Squadron Hawk', 'Talisman of Conviction', 'Traxos, Scourge of Kroog', 'Judith, the Scourge Diva', 'Neutralize', 'Opulent Palace', 'Walker of the Wastes', 'Gatekeeper of Malakir', 'Woodland Cemetery', 'Black Sun''s Zenith', 'Nevermore', 'Gargoyle Castle', 'Linvala, the Preserver', 'Ghitu Lavarunner', 'Inspiring Veteran', 'Maestros Theater', 'Brainstone', 'Selesnya Charm', 'Prophetic Prism', 'Blight Herder', 'Behold the Multiverse', 'Dream Trawler', 'Patient Rebuilding', 'Weaver of Harmony', 'Calciform Pools', 'Secluded Steppe', 'Silundi Vision', 'Thirst for Discovery', 'Dennick, Pious Apprentice', 'Deepfathom Skulker', 'Vault of the Archangel', 'Boreal Shelf', 'Llanowar Wastes', 'Ghitu Encampment', 'Generous Visitor', 'Skybridge Towers', 'Plumeveil', 'Foundry Helix', 'Teachings of the Kirin', 'Hanweir Garrison', 'Aetherspouts', 'Diabolic Edict', 'Secluded Courtyard', 'Firebrand Archer', 'Vedalken Shackles', 'Mist Intruder', 'Mishra''s Factory', 'Glorybringer', 'Jaya Ballard, Task Mage', 'Kjeldoran Outpost', 'Jace Beleren', 'Obscura Storefront', 'Condemn', 'Ral''s Outburst', 'The Biblioplex', 'Tendrils of Agony', 'Field of Ruin', 'Xathrid Necromancer', 'Sleight of Hand', 'Chandra''s Phoenix', 'Knight of the White Orchid', 'Animate Dead', 'Ethersworn Canonist', 'Lochmere Serpent', 'Horribly Awry', 'Putrid Goblin', 'Hateful Eidolon', 'Temple of Mystery', 'Symbiotic Wurm', 'Lose Focus', 'Michonne, Ruthless Survivor', 'Conclave Mentor', 'Goblin Dark-Dwellers', 'Omen of the Sun', 'Disfigure', 'Unlucky Witness', 'Tempest Djinn', 'Cremate', 'Burst Lightning', 'Silverbluff Bridge', 'Flame Rift', 'Reinforced Ronin', 'Viscera Seer', 'Cartel Aristocrat', 'Ensoul Artifact', 'The Raven''s Warning', 'Lumbering Falls', 'Talisman of Resilience', 'Meteor Golem', 'Shard Volley', 'Visara the Dreadful', 'Eternal Dragon', 'Tomb of the Spirit Dragon', 'Spatial Contortion', 'Ghostfire Blade', 'Flood of Recollection', 'Dark Ritual', 'Depart the Realm', 'Heartless Act', 'Temple of Plenty', 'Deep Forest Hermit', 'Falkenrath Aristocrat', 'Sphinx''s Tutelage', 'Dark Salvation', 'Korlash, Heir to Blackblade', 'Goblin Bombardment', 'Titan''s Presence', 'Battlefield Forge', 'Yidaro, Wandering Monster', 'Gavony Township', 'Darksteel Colossus', 'Kher Keep', 'Acclaimed Contender', 'Brave the Elements', 'Temple of Enlightenment', 'Dawn of Hope', 'Mogg War Marshal', 'Sorin Markov', 'Flame Javelin', 'Jace, Memory Adept', 'Pull from Tomorrow', 'Ponder', 'Gitaxian Probe', 'Crackling Drake', 'Drowned Catacomb', 'Dimir Signet', 'Panharmonicon', 'Commune with the Gods', 'Chandra, Pyromaster', 'Reckless Impulse', 'Dread Fugue', 'Faithful Mending', 'Oust', 'Electrolyze', 'Outlaws'' Merriment', 'Forbid', 'Demonic Embrace', 'Ritual of Soot', 'Raging Ravine', 'Zulaport Cutthroat', 'Silverblade Paladin', 'Stern Dismissal', 'Laquatus''s Creativity', 'Realm Razer', 'Tymaret, Chosen from Death', 'Game Trail', 'Shriekmaw', 'Emmara, Soul of the Accord', 'Garruk Wildspeaker', 'Archetype of Endurance', 'Abbot of Keral Keep', 'Rustvale Bridge', 'Hatching Plans', 'Oath of Gideon', 'Mesmeric Fiend', 'Take Inventory', 'Dread Presence', 'Raise the Alarm', 'Sea Gate Oracle', 'Tyrant''s Scorn', 'Desolation Twin', 'Dreg Mangler', 'Bone Shards', 'Dryad Militant', 'Esper Charm', 'Gonti, Lord of Luxury', 'Eternal Scourge', 'Nested Shambler', 'Crack the Earth', 'Abzan Charm', 'Sylvan Advocate', 'Slagwoods Bridge', 'Sterling Grove', 'Dire Fleet Daredevil', 'Dwarven Mine', 'Gather the Townsfolk', 'Holdout Settlement', 'Blessed Alliance', 'Snowfield Sinkhole', 'Erayo, Soratami Ascendant', 'Touch the Spirit Realm', 'Footfall Crater', 'Teferi''s Ageless Insight', 'Threads of Disloyalty', 'Myr Incubator', 'Jokulhaups', 'Delver of Secrets', 'Obliterate', 'Think Twice', 'Wrath of God', 'Mirrorpool', 'Foreboding Ruins', 'Ash Zealot', 'Razortide Bridge', 'The Birth of Meletis', 'Raze the Effigy', 'Ojutai''s Command', 'Pyretic Ritual', 'Mire''s Grasp', 'Glacial Fortress', 'Bastion of Remembrance', 'Invoke Calamity', 'Call of the Conclave', 'Corrupted Crossroads', 'Angelic Purge', 'Decree of Justice', 'Sire of Insanity', 'Frantic Search', 'Vindicate', 'Prophetic Bolt', 'Gods'' Eye, Gate to the Reikai', 'It That Betrays', 'Hesitation', 'Day of Judgment', 'Azorius Charm', 'Knight Exemplar', 'Myth Realized', 'Hunted Witness', 'Experimental Synthesizer', 'Memorial to Glory', 'Vile Entomber', 'Midnight Clock', 'Elixir of Immortality', 'Grim Lavamancer', 'Hostage Taker', 'Weirding Wood', 'Incinerate', 'Canyon Slough', 'Thought Scour', 'Hunted Nightmare', 'Rootbound Crag', 'Timely Reinforcements', 'Galvanic Relay', 'Witching Well', 'Oblivion Ring', 'Not of This World', 'Thought Erasure', 'Forgotten Cave', 'Psychic Strike', 'Intangible Virtue', 'Sol Talisman', 'Cleansing Wildfire', 'Chasm Skulker', 'Read the Bones', 'Rootborn Defenses', 'Tanglepool Bridge', 'Temple of Triumph', 'Witch''s Cottage', 'Easy Prey', 'Claim the Firstborn', 'Glyph Keeper', 'Kumano Faces Kakkazan', 'Goblin Electromancer', 'Glimmerpost', 'Slitherhead', 'Approach of the Second Sun', 'World Shaper', 'Runed Halo', 'Kessig Flamebreather', 'Endbringer', 'Mirrorshell Crab', 'Arcanis the Omnipotent', 'Purphoros''s Intervention', 'Consume the Meek', 'Catch // Release', 'Caves of Koilos', 'Clifftop Retreat', 'Sprite Dragon', 'Costly Plunder', 'Diabolic Revelation', 'Dual Strike', 'Thraben Inspector', 'Feed the Swarm', 'Collected Conjuring', 'Yahenni''s Expertise', 'Hero of Oxid Ridge', 'Hooting Mandrills', 'Keep Safe', 'Master of Death', 'Hallowed Burial', 'Thassa''s Intervention', 'Urza''s Factory', 'Radiant Flames', 'Hour of Reckoning', 'Ominous Seas', 'Seething Song', 'Cruel Ultimatum', 'Demigod of Revenge', 'Omen of the Forge', 'Hypnotic Specter', 'Westvale Abbey', 'Agonizing Remorse', 'Temple of Malady', 'Sign in Blood', 'Cosmos Elixir', 'Hissing Quagmire', 'Rishkar, Peema Renegade', 'Kazuul''s Fury', 'Gloomshrieker', 'Lava Dart', 'Jwari Disruption', 'Stirring Wildwood', 'Ghost Quarter', 'Orzhov Signet', 'Into the Roil', 'Lantern of the Lost', 'Genju of the Spires', 'Devious Cover-Up', 'Shrine of the Forsaken Gods', 'Fathom Feeder', 'Ulamog''s Nullifier', 'Platinum Angel', 'Rise and Shine', 'Sejiri Refuge', 'Village Messenger', 'Bloodbraid Elf', 'Den Protector', 'Sludge Crawler', 'Thaumatic Compass', 'Nissa, Worldwaker', 'Tatsunari, Toad Rider', 'Windbrisk Heights', 'Memory Lapse', 'Wandering Mind', 'Terminus', 'Chandra Nalaar', 'Aphemia, the Cacophony', 'Crumbling Necropolis', 'Hagra Mauling'))) 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, 69.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (81.5 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Temple of Epiphany', 'Inevitable Betrayal', 'Dark Ritual', 'Possibility Storm', 'Goblin Bombardment', 'Glorybringer', 'Drannith Stinger', 'Death Cultist', 'Condemn', 'Quakefoot Cyclops', 'Animate Dead', 'Primal Command', 'Skyclave Cleric', 'Dovin Baan', 'Knight of the White Orchid', 'Moritte of the Frost', 'Go for Blood', 'Orcish Lumberjack', 'Gargoyle Castle', 'Thirst for Discovery', 'Ramunap Excavator', 'Repeal', 'Summer Bloom', 'An Offer You Can''t Refuse', 'Spark Spray', 'Mouth of Ronom', 'Riftwing Cloudskate', 'Lavaclaw Reaches', 'Arch of Orazca', 'Avaricious Dragon', 'Silverbluff Bridge', 'Hour of Promise', 'Witch''s Cottage', 'Sylvan Advocate', 'Planar Bridge', 'Bogardan Hellkite', 'Irencrag Feat', 'Piranha Marsh', 'Mystifying Maze', 'Viscera Seer', 'Acclaimed Contender', 'Ethersworn Canonist', 'Cloudpost', 'Sea Gate Wreckage', 'Alchemist''s Gambit', 'Sundial of the Infinite', 'Dragonstorm', 'Soulherder', 'Sleeper Agent', 'Falkenrath Aristocrat', 'Dread Presence', 'Bloodbraid Elf', 'Glorious End', 'Woodland Cemetery', 'Phyrexian Dreadnought', 'Fire Covenant', 'Deep Forest Hermit', 'Outland Liberator', 'Tectonic Reformation', 'Glimmerpost', 'Ancient Stirrings', 'Venerable Knight', 'Lose Focus', 'Chain Lightning', 'Snow-Covered Forest', 'Virulent Sliver', 'Darkheart Sliver', 'Bonescythe Sliver', 'First Sliver''s Chosen', 'Timeless Witness', 'Flourishing Fox', 'Watcher for Tomorrow', 'Gemhide Sliver', 'Tempered Sliver', 'Frenetic Sliver', 'Demigod of Revenge', 'Sarkhan the Masterless', 'Lavabelly Sliver', 'Knight Exemplar', 'Stone Rain', 'Hero of Oxid Ridge', 'Glacial Fortress', 'Grasp of Darkness', 'Necrotic Sliver', 'Sylvan Scrying', 'Mephidross Vampire', 'Erebos''s Intervention', 'Gatekeeper of Malakir', 'Brimstone Dragon', 'Game Trail', 'Astral Slide', 'Goblin Dark-Dwellers', 'Feed the Swarm', 'Pyromancer Ascension', 'Seething Song', 'Torrent Sculptor', 'Judith, the Scourge Diva', 'Urza''s Factory', 'Valiant Rescuer', 'Flood Plain', 'Scab-Clan Berserker', 'Tyrant of Discord', 'Jokulhaups', 'Gruul Turf', 'Wall of Omens', 'Essence Flux', 'March of Reckless Joy', 'Dread Fugue', 'Twinflame', 'Cartographer''s Survey', 'Canyon Slough', 'Akroma, Angel of Fury', 'Secluded Courtyard', 'Snow-Covered Plains', 'Bloodtithe Harvester', 'Hypnotic Specter', 'Selesnya Sanctuary', 'Honor of the Pure', 'Strike It Rich', 'Abrade', 'Tooth and Nail', 'Inspiring Veteran', 'Austere Command', 'Soul Spike', 'Izzet Charm', 'Heartless Act', 'Spawning Pool', 'Tranquil Thicket', 'Triskelion', 'Renewed Faith', 'Astral Drift', 'Quarantine Field', 'Abundant Harvest', 'Fact or Fiction', 'Invoke Calamity', 'Bloodchief''s Thirst', 'Rootbound Crag', 'Burst Lightning', 'Chancellor of the Dross', 'Clifftop Retreat', 'Malakir Blood-Priest', 'Frantic Search', 'Realm Razer', 'Ethersworn Sphinx', 'Zenith Flare', 'Mind''s Desire', 'Venom Sliver', 'Dragonskull Summit', 'Alesha, Who Smiles at Death', 'Raging Ravine', 'Zulaport Cutthroat', 'Dregscape Sliver', 'Brave the Elements', 'Fungus Sliver', 'Sunscorched Desert', 'Farseek', 'Stromkirk Noble', 'Buried Ruin', 'Hagra Mauling', 'Sliver Queen', 'Diffusion Sliver', 'Snow-Covered Mountain', 'Runed Halo', 'Izzet Boilerworks', 'Thought Scour', 'Skyclave Shade', 'Tempered in Solitude', 'Tanglepool Bridge', 'Mystic Snake', 'Talisman of Impulse', 'Bastion of Remembrance', 'Orim''s Chant', 'Forbid', 'Darigaaz Reincarnated', 'Dead // Gone', 'Memory Lapse', 'Foreboding Ruins', 'Prophetic Prism', 'Mesmeric Fiend', 'Vampire Nighthawk', 'Form of the Dragon', 'Terastodon', 'Secluded Steppe', 'Shardless Agent', 'Empty the Warrens', 'Vampire Cutthroat', 'Okiba Reckoner Raid', 'Lightning Rift', 'Jace, Memory Adept', 'Changeling Outcast', 'Tendrils of Agony', 'Kazuul''s Fury', 'Tyrant''s Choice', 'Birds of Paradise', 'Sleight of Hand', 'Chandra, Pyromaster', 'Drannith Healer', 'Coalition Relic', 'Bump in the Night', 'Mindslaver', 'Radha, Heart of Keld', 'Razortide Bridge', 'Explore', 'The Mending of Dominaria', 'Garruk Wildspeaker', 'Silverblade Paladin', 'Korlash, Heir to Blackblade', 'Jace, the Living Guildpact', 'Archaeomancer', 'It That Betrays', 'Ghitu Encampment', 'Battlefield Forge', 'Hive Stirrings', 'Nested Shambler', 'Opaline Sliver', 'Eternal Dragon', 'Blossoming Sands', 'Vampire''s Kiss', 'Desperate Ritual', 'Demonic Embrace', 'Bala Ged Recovery', 'Butcher Ghoul', 'Pillage', 'See the Truth', 'Stasis Snare', 'Treasure Cruise', 'Sygg, River Cutthroat', 'Decree of Justice', 'Oracle of Mul Daya', 'Dream Trawler', 'Midnight Reaper', 'Cryptic Caves', 'Haunted Fengraf', 'Avatar of Discord', 'Cleansing Wildfire', 'Gitaxian Probe', 'Ponder', 'Dual Strike', 'Flame Slash', 'Purphoros''s Intervention', 'Slagwoods Bridge', 'Cathartic Pyre', 'Slagstorm', 'Wrath of God', 'Temple of Enlightenment', 'Hinterland Harbor', 'Tectonic Giant', 'Leeching Sliver', 'Underworld Connections', 'Benalish Marshal', 'Galerider Sliver', 'Infernal Grasp', 'Shredded Sails', 'Curious Pair', 'Wild Cantor', 'Unlucky Witness', 'Akroma''s Blessing', 'Restoration Angel', 'Dormant Sliver', 'Student of Warfare', 'Fire-Lit Thicket', 'Tymaret, Chosen from Death', 'Pyretic Ritual', 'Hymn to Tourach', 'Shatterskull Charger', 'Splendor Mare', 'Rosethorn Acolyte'))) 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, 81.5, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (68.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Birds of Paradise', 'Triskelion', 'Jace, the Living Guildpact', 'Falkenrath Aristocrat', 'Hagra Mauling', 'Michiko''s Reign of Truth', 'Diffusion Sliver', 'Pyromancer Ascension', 'Avaricious Dragon', 'Spark Spray', 'Snow-Covered Mountain', 'Rise and Shine', 'Ethersworn Canonist', 'Abrade', 'Explore', 'Knight of the White Orchid', 'Foreboding Ruins', 'Sarkhan the Masterless', 'Splendor Mare', 'Ramunap Excavator', 'Mystic Snake', 'Forbid', 'Lightning Rift', 'Ornithopter', 'Cloudpost', 'Burst Lightning', 'Bogardan Hellkite', 'Butcher Ghoul', 'Avatar of Discord', 'Haunted Fengraf', 'Twinflame', 'Seasoned Hallowblade', 'Tectonic Reformation', 'Bloodbraid Elf', 'Alchemist''s Gambit', 'Ensoul Artifact', 'Sea Gate Wreckage', 'Desperate Ritual', 'Game Trail', 'Spawning Pool', 'Terastodon', 'Runed Halo', 'Drannith Stinger', 'Repeal', 'Tymaret, Chosen from Death', 'Opaline Sliver', 'Alesha, Who Smiles at Death', 'Darigaaz Reincarnated', 'Virulent Sliver', 'Ghitu Encampment', 'Shalai, Voice of Plenty', 'Signal Pest', 'Steel Overseer', 'Feed the Swarm', 'Oni-Cult Anvil', 'Servo Exhibition', 'Primal Command', 'Outland Liberator', 'Vampire Nighthawk', 'Sunscorched Desert', 'Fire-Lit Thicket', 'Gatekeeper of Malakir', 'First Sliver''s Chosen', 'Chandra, Pyromaster', 'Rootbound Crag', 'Akroma, Angel of Fury', 'Arcbound Mouser', 'Lavaclaw Reaches', 'Bloodchief''s Thirst', 'Temple of Epiphany', 'Memory Lapse', 'Icehide Golem', 'Orim''s Chant', 'Flood Plain', 'Selesnya Sanctuary', 'Infernal Grasp', 'Essence Flux', 'Ancient Stirrings', 'Goblin Dark-Dwellers', 'Sylvan Advocate', 'Cloudblazer', 'Prophetic Prism', 'Purphoros''s Intervention', 'Arch of Orazca', 'Malakir Blood-Priest', 'Empty the Warrens', 'Galerider Sliver', 'Moritte of the Frost', 'Venom Sliver', 'Mind''s Desire', 'Deep Forest Hermit', 'Shardless Agent', 'Dauntless Bodyguard', 'Snow-Covered Forest', 'Seething Song', 'March of Reckless Joy', 'Fungus Sliver', 'Leeching Sliver', 'Rustvale Bridge', 'Radha, Heart of Keld', 'Sleeper Agent', 'Frenetic Sliver', 'Demigod of Revenge', 'Go for Blood', 'Wild Cantor', 'Necrotic Sliver', 'Gruul Turf', 'Dregscape Sliver', 'See the Truth', 'Dragonstorm', 'Glacial Fortress', 'Sylvan Scrying', 'Ghost Quarter', 'Treasure Cruise', 'Thought Scour', 'Wooded Bastion', 'Gemhide Sliver', 'Tendrils of Agony', 'Dread Presence', 'Mishra''s Factory', 'Summer Bloom', 'Akroma''s Blessing', 'Hour of Promise', 'Animate Dead', 'Sliver Queen', 'Secluded Steppe', 'Giant Killer', 'Tanglepool Bridge', 'Kazuul''s Fury', 'Shredded Sails', 'Piranha Marsh', 'Mouth of Ronom', 'Wall of Omens', 'Zulaport Cutthroat', 'Shatterskull Charger', 'Dark Ritual', 'Tempered in Solitude', 'Knight Exemplar', 'Soul Spike', 'Bonescythe Sliver', 'Decree of Justice', 'Rosethorn Acolyte', 'Fatestitcher', 'Hymn to Tourach', 'Pyretic Ritual', 'Scab-Clan Berserker', 'Skyclave Shade', 'Arcbound Ravager', 'Cathar Commando', 'It That Betrays', 'Dual Strike', 'Cleansing Wildfire', 'Thirst for Discovery', 'Secluded Courtyard', 'Eternal Dragon', 'Judith, the Scourge Diva', 'Quakefoot Cyclops', 'Flame Slash', 'Riftwing Cloudskate', 'Possibility Storm', 'Death Cultist', 'The Mending of Dominaria', 'Momentary Blink', 'Vault Skirge', 'Grasp of Darkness', 'Brave the Elements', 'Fact or Fiction', 'Ethersworn Sphinx', 'Tyrant of Discord', 'Tempered Steel', 'Hive Stirrings', 'Orcish Lumberjack', 'Cartographer''s Survey', 'Tranquil Thicket', 'Changeling Outcast', 'Hero of Oxid Ridge', 'Gargoyle Castle', 'Dread Fugue', 'Thraben Inspector', 'Hypnotic Specter', 'Mindslaver', 'Sundial of the Infinite', 'Demonic Embrace', 'Sleight of Hand', 'Silverblade Paladin', 'Benalish Marshal', 'Chain Lightning', 'Goblin Bombardment', 'Okiba Reckoner Raid', 'Fiend Hunter', 'Urza''s Factory', 'Soulherder', 'Skyclave Cleric', 'Renewed Faith', 'Quarantine Field', 'Oracle of Mul Daya', 'Farseek', 'Razortide Bridge', 'Eiganjo Castle', 'Mesmeric Fiend', 'Stirring Wildwood', 'Dead // Gone', 'Smokestack', 'Strike It Rich', 'Temple of Enlightenment', 'Tithe Taker', 'Irencrag Feat', 'Pillage', 'An Offer You Can''t Refuse', 'Woodland Cemetery', 'Midnight Reaper', 'Bala Ged Recovery', 'Valiant Rescuer', 'Dream Trawler', 'Clifftop Retreat', 'Blood Fountain', 'Viscera Seer', 'Inevitable Betrayal', 'Abundant Harvest', 'Bastion of Remembrance', 'Honor of the Pure', 'Tooth and Nail', 'Heartless Act', 'Astral Slide', 'Sejiri Refuge', 'Gideon''s Lawkeeper', 'Tempered Sliver', 'Unlucky Witness', 'Vampire''s Kiss', 'Lavabelly Sliver', 'Dormant Sliver', 'Phyrexian Dreadnought', 'Jeskai Ascendancy', 'Inspiring Veteran', 'Lose Focus', 'Archaeomancer', 'Champion of the Parish', 'Blade Splicer', 'Austere Command', 'Buried Ruin', 'Dragonskull Summit', 'Stasis Snare', 'Slagwoods Bridge', 'Ponder', 'Darkheart Sliver', 'Restoration Angel', 'Canyon Slough', 'Underworld Connections', 'Terrarion', 'Blossoming Sands', 'Bloodtithe Harvester', 'Mystifying Maze', 'Dovin Baan', 'Cathartic Pyre', 'Izzet Boilerworks', 'Zenith Flare', 'Gitaxian Probe', 'Realm Razer', 'Jace, Memory Adept', 'Student of Warfare', 'Benevolent Bodyguard', 'Frostwalk Bastion', 'Astral Drift', 'Talisman of Impulse', 'Curious Pair', 'Coalition Relic', 'Drannith Healer', 'Timeless Witness', 'Experimental Synthesizer', 'Silverbluff Bridge', 'Cryptic Caves', 'Glorious End', 'Brimstone Dragon', 'Stromkirk Noble', 'Torrent Sculptor', 'Hinterland Harbor', 'Bump in the Night', 'Erebos''s Intervention', 'Venerable Knight', 'Garruk Wildspeaker', 'Flourishing Fox', 'Shatter the Sky', 'Wrath of God', 'Condemn', 'Fire Covenant', 'Mephidross Vampire', 'Jokulhaups', 'Chancellor of the Dross', 'Vampire Cutthroat', 'Watcher for Tomorrow', 'Izzet Charm', 'Oust', 'Snow-Covered Plains', 'Battlefield Forge', 'Sungold Sentinel', 'Sygg, River Cutthroat', 'Frantic Search', 'Tectonic Giant', 'Glimmerpost', 'Kabira Takedown', 'Braids, Cabal Minion', 'Nested Shambler', 'Acclaimed Contender', 'Stone Rain', 'Raging Ravine', 'Declaration in Stone', 'Tyrant''s Choice', 'Nevermaker', 'Form of the Dragon', 'Glorybringer', 'Planar Bridge', 'Invoke Calamity', 'Witch''s Cottage', 'Korlash, Heir to Blackblade', 'Slagstorm'))) 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, 68.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (88.8 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Mirror March', 'Imposing Vantasaur', 'Secluded Steppe', 'Hypnotic Specter', 'Knight of Glory', 'Timeless Witness', 'Dwynen, Gilt-Leaf Daen', 'Sundial of the Infinite', 'Mistvault Bridge', 'Thirst for Discovery', 'Crumbling Vestige', 'Falkenrath Gorger', 'Tireless Provisioner', 'Maestros Charm', 'Mistvein Borderpost', 'Dark Ritual', 'Cathar Commando', 'Elvish Mystic', 'Temple of Malady', 'Changeling Outcast', 'Mind''s Desire', 'Galerider Sliver', 'Duskwielder', 'Tooth and Nail', 'Dread Presence', 'Lumbering Falls', 'Verdant Command', 'Riveteers Charm', 'Trading Post', 'Dizzy Spell', 'Darigaaz Reincarnated', 'Abbot of Keral Keep', 'Greater Gargadon', 'Talisman of Impulse', 'Metalwork Colossus', 'Glacial Fortress', 'Worldgorger Dragon', 'Hornet Queen', 'Reap the Past', 'Repeal', 'Behold the Multiverse', 'Kodama''s Reach', 'Claim the Firstborn', 'Hollowhead Sliver', 'Fungus Sliver', 'Thraben Inspector', 'Evolving Wilds', 'Blackbloom Rogue', 'Tendrils of Agony', 'Dryad Militant', 'Thornglint Bridge', 'Kumano Faces Kakkazan', 'Tempered Sliver', 'Sarkhan the Masterless', 'Grand Architect', 'Glorious End', 'Varragoth, Bloodsky Sire', 'Irencrag Feat', 'Bloodtithe Harvester', 'Vedalken Orrery', 'Glorybringer', 'Cloudthresher', 'Hour of Promise', 'Farseek', 'Heartless Act', 'Orbs of Warding', 'Hive Mind', 'Feed the Swarm', 'Cleansing Wildfire', 'Sultai Charm', 'Sunscorched Desert', 'Tymaret, Chosen from Death', 'Tendo Ice Bridge', 'Reckless Waif', 'Healer''s Hawk', 'Inkwell Leviathan', 'Stern Dismissal', 'Slagstorm', 'Primal Command', 'Magister of Worth', 'Canyon Slough', 'Condemn', 'Careful Cultivation', 'Kazuul''s Fury', 'Cathartic Reunion', 'Scab-Clan Berserker', 'Memory Lapse', 'Champion of the Parish', 'Homing Sliver', 'Tombstalker', 'Glimmerpost', 'Benevolent Bodyguard', 'Fire-Lit Thicket', 'Mirrorshell Crab', 'Staff of Domination', 'Animate Dead', 'Arbor Elf', 'Snow-Covered Plains', 'Elvish Champion', 'Nightmare Shepherd', 'Spawning Pool', 'Vivid Grove', 'Rosethorn Acolyte', 'Walking Atlas', 'Lodestone Golem', 'Putrid Imp', 'Dragonstorm', 'Stormtide Leviathan', 'Dead // Gone', 'Frenetic Sliver', 'Stubborn Denial', 'Tyrant''s Choice', 'Bloodchief''s Thirst', 'Celestial Kirin', 'Falkenrath Aristocrat', 'Rune-Scarred Demon', 'Treacherous Blessing', 'Tyrant of Discord', 'Hypergenesis', 'Temur Charm', 'Orcish Lumberjack', 'Sylvan Scrying', 'Silundi Vision', 'Treasure Cruise', 'Forbid', 'Sharuum the Hegemon', 'Knight of the White Orchid', 'The Bloodsky Massacre', 'Savage Lands', 'Birds of Paradise', 'Tempest Djinn', 'Rally the Peasants', 'Lavaclaw Reaches', 'Vampire Nighthawk', 'Arcane Sanctum', 'Gideon Jura', 'Empty the Warrens', 'Snowfield Sinkhole', 'Field of Ruin', 'Knight of Infamy', 'Insolent Neonate', 'Unwinding Clock', 'Voldaren Epicure', 'Raging Ravine', 'Coalition Relic', 'Lose Focus', 'Slip Out the Back', 'It That Betrays', 'Keruga, the Macrosage', 'Sovereign''s Bite', 'Blightning', 'Terramorphic Expanse', 'Okina, Temple to the Grandfathers', 'Chief Engineer', 'Path to the World Tree', 'Darkheart Sliver', 'Thaumatic Compass', 'Fact or Fiction', 'Garruk Wildspeaker', 'Brokers Hideout', 'Mishra''s Factory', 'Triskelion', 'Esper Charm', 'Restoration Angel', 'Mythos of Brokkos', 'Springbloom Druid', 'Smokestack', 'Brokers Charm', 'Woodland Cemetery', 'Avatar of Discord', 'Duty-Bound Dead', 'Flame Javelin', 'Pyretic Ritual', 'Snow-Covered Swamp', 'Touch the Spirit Realm', 'Realm Razer', 'Ancient Stirrings', 'Dovin Baan', 'Heartless Summoning', 'Frontier Bivouac', 'Dragonskull Summit', 'Blue Sun''s Zenith', 'Goblin Bombardment', 'Sylvan Library', 'The Mending of Dominaria', 'Azor''s Gateway', 'Signal Pest', 'Dread Return', 'Hagra Mauling', 'Nested Shambler', 'Gatekeeper of Malakir', 'Mythos of Nethroi', 'Mizzium Mortars', 'Myr Superion', 'Stirring Wildwood', 'Sleeper Agent', 'Aven Squire', 'Bogardan Hellkite', 'Lone Rider', 'Invoke Calamity', 'Might Sliver', 'Silverblade Paladin', 'Grimdancer', 'Approach of the Second Sun', 'Maul of the Skyclaves', 'Diregraf Ghoul', 'Colossal Skyturtle', 'Pelakka Predation', 'Eternal Dragon', 'Lavabelly Sliver', 'Venom Sliver', 'Arch of Orazca', 'Sands of Delirium', 'Skyclave Shade', 'Student of Warfare', 'Wavesifter', 'Ethersworn Sphinx', 'Strike It Rich', 'Flourishing Fox', 'Obstinate Baloth', 'Blade Splicer', 'Mask of the Mimic', 'Witch''s Cottage', 'Detention Sphere', 'Vindicate', 'Nezahal, Primal Tide', 'Elves of Deep Shadow', 'Arguel''s Blood Fast', 'Akrasan Squire', 'Animation Module', 'Coiling Oracle', 'Reality Ripple', 'Den Protector', 'Temple of Malice', 'Inevitable Betrayal', 'Gitaxian Probe', 'Reflex Sliver', 'Prophetic Prism', 'Zenith Flare', 'Midnight Clock', 'Virulent Sliver', 'Honor of the Pure', 'Frantic Search', 'Chandra, Pyromaster', 'Hissing Quagmire', 'Throne of Geth', 'Razortide Bridge', 'Chance Encounter', 'Power Depot', 'Snow-Covered Mountain', 'Barbarian Ring', 'Restore Balance', 'Bonescythe Sliver', 'Lonely Sandbar', 'Desecration Demon', 'Planar Bridge', 'Wooded Bastion', 'Sylvan Primordial', 'Opt', 'Counterflux', 'Korlash, Heir to Blackblade', 'Treasure Map', 'Battlefield Forge', 'Vivid Creek', 'Seasoned Hallowblade', 'Nicol Bolas, Planeswalker', 'Explore', 'Silverbluff Bridge', 'Zabaz, the Glimmerwasp', 'Unlucky Witness', 'Sliver Queen', 'Oust', 'Wall of Omens', 'Sejiri Steppe', 'Sigil of Valor', 'Drannith Healer', 'Harrow', 'Cathartic Pyre', 'Dawn of Hope', 'Jokulhaups', 'Ash Zealot', 'Terminus', 'Bastion of Remembrance', 'Flame-Kin Zealot', 'Kjeldoran Outpost', 'Abiding Grace', 'Mana Leak', 'Zetalpa, Primal Dawn', 'Decree of Justice', 'Vivid Meadow', 'Cloudpost', 'Thirst for Knowledge', 'Steel Overseer', 'Oblivion Ring', 'Liliana''s Contract', 'Sphinx of the Steel Wind', 'Pathrazer of Ulamog', 'Dormant Sliver', 'Sylvan Advocate', 'Arcbound Worker', 'Mesmeric Fiend', 'Foreboding Ruins', 'Elvish Archdruid', 'Tidespout Tyrant', 'Midnight Reaper', 'Azorius Charm', 'Fabricate', 'Alchemist''s Gambit', 'Wildfield Borderpost', 'Chaos Maw', 'Bala Ged Recovery', 'Eiganjo Castle', 'Wrath of God', 'Frantic Inventory', 'Hinterland Harbor', 'Curious Pair', 'Sphinx of Foresight', 'Drannith Stinger', 'Fauna Shaman', 'Stormblood Berserker', 'Terastodon', 'Chromatic Lantern', 'Wild Cantor', 'Dauntless Escort', 'Dread Fugue', 'Sire of Insanity', 'Go for Blood', 'Underworld Connections', 'Thought Scour', 'Patchwork Automaton', 'Crumbling Necropolis', 'Valiant Rescuer', 'Angel of Sanctions', 'Declaration in Stone', 'Elvish Visionary', 'Ugin''s Conjurant', 'Brimstone Dragon', 'Rift Sower', 'Shardless Agent', 'Gilded Lotus', 'Abrade', 'Kabira Takedown', 'Power Artifact', 'Izzet Boilerworks', 'Knight of the Reliquary', 'Deep Analysis', 'Hymn to Tourach', 'Snow-Covered Forest', 'Drowned Catacomb', 'Firewild Borderpost', 'Leyline of Anticipation', 'Mirran Crusader', 'Judith, the Scourge Diva', 'Asylum Visitor', 'Voidslime', 'Imperious Perfect', 'Avaricious Dragon', 'Fire Covenant', 'Pili-Pala', 'Possibility Storm', 'Day of Judgment', 'Kira, Great Glass-Spinner', 'Mystic Snake', 'Shredded Sails', 'Distended Mindbender', 'Dark-Dweller Oracle', 'Trickbind', 'Nylea''s Presence', 'Arcbound Ravager', 'Search for Tomorrow', 'Mephidross Vampire', 'Chain Lightning', 'Mirage Mirror', 'Spark Spray', 'Vivid Crag', 'Cosmos Elixir', 'Raze the Effigy', 'Kami of False Hope', 'Lightning Rift', 'Think Twice', 'Purphoros''s Intervention', 'Joraga Warcaller', 'Llanowar Wastes', 'Grapeshot', 'Sign in Blood', 'Discovery // Dispersal', 'Fieldmist Borderpost', 'Caves of Koilos', 'Blackmail', 'Slagwoods Bridge', 'The Birth of Meletis', 'Kefnet''s Monument', 'Mizzium Skin', 'Chancellor of the Dross', 'Needle Spires', 'Conduit of Ruin', 'Enigma Sphinx', 'Tectonic Reformation', 'Dauntless Bodyguard', 'Soul Spike', 'Desperate Ritual', 'Village Messenger', 'Thawing Glaciers', 'Splendor Mare', 'Ponder', 'Calciform Pools', 'Phyrexian Dreadnought', 'Gemhide Sliver', 'See the Truth', 'Fruit of Tizerus', 'Mystic Monastery', 'Spectral Procession', 'Clifftop Retreat', 'Lys Alana Huntmaster', 'Pyroclasm', 'Goldmire Bridge', 'Benalish Marshal', 'Demonic Dread', 'Elixir of Immortality', 'Temple of Epiphany', 'Moritte of the Frost', 'Izzet Charm', 'Dregscape Sliver', 'Goblin Cannon', 'Ammit Eternal', 'Doomed Traveler', 'Akroma''s Memorial', 'Dream Trawler', 'Diffusion Sliver', 'Tempered in Solitude', 'Dream Devourer', 'Nature''s Lore', 'Fyndhorn Elves', 'Vryn Wingmare', 'Astral Cornucopia', 'Fertile Ground', 'Okiba Reckoner Raid', 'Cosima, God of the Voyage', 'Vapor Snag', 'Hive Stirrings', 'The Underworld Cookbook', 'Painful Truths', 'Arcbound Javelineer', 'Piranha Marsh', 'Viashino Pyromancer', 'Glimpse of Tomorrow', 'Dwynen''s Elite', 'Jace, the Living Guildpact', 'Game Trail', 'Stromkirk Noble', 'Tanglepool Bridge', 'Mouth of Ronom', 'Mystifying Maze', 'Cultivate', 'Skyclave Cleric', 'Ethersworn Canonist', 'Primal Surge', 'March of Reckless Joy', 'Tectonic Giant', 'Secluded Courtyard', 'Sleight of Hand', 'Jace Beleren', 'Seething Song', 'Krark''s Thumb', 'Glen Elendra Archmage', 'Shriekmaw', 'Form of the Dragon', 'Burst Lightning', 'Lashwrithe', 'Rootbound Crag', 'Logic Knot', 'Skemfar Avenger', 'Fiend Hunter', 'Platinum Angel', 'Sungold Sentinel', 'Scrapheap Scrounger', 'Vampire Lacerator', 'Sword-Point Diplomacy', 'Bloodbraid Elf', 'Monoskelion', 'Shatterskull Charger', 'Erebos''s Intervention', 'Demigod of Revenge', 'Bump in the Night', 'Mogg War Marshal', 'Goblin Dark-Dwellers', 'Goblin Electromancer', 'Raven''s Crime', 'Dragonkin Berserker', 'Mission Briefing', 'Urza''s Factory', 'Temple of Mystery', 'Shred Memory', 'Zulaport Cutthroat', 'Brave the Elements', 'Vivid Marsh', 'Hunted Witness', 'Temple of Enlightenment', 'Veinfire Borderpost', 'Tithe Taker', 'All Suns'' Dawn', 'Staff of Nin', 'Deep Forest Hermit', 'Unesh, Criosphinx Sovereign', 'Arcbound Mouser', 'Delver of Secrets', 'Vampire''s Kiss'))) 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, 88.8, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (85.7 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Temple of Epiphany', 'Fatestitcher', 'Reckless Waif', 'Terrarion', 'Shard Volley', 'Sands of Delirium', 'Midnight Clock', 'Shriekmaw', 'Clifftop Retreat', 'Scrapheap Scrounger', 'Fact or Fiction', 'Chandra, Pyromaster', 'All Suns'' Dawn', 'Vampire Lacerator', 'Annex', 'Secluded Courtyard', 'Day of Judgment', 'Avaricious Dragon', 'Moritte of the Frost', 'Basking Rootwalla', 'Light from Within', 'Zabaz, the Glimmerwasp', 'Blood Fountain', 'Chief Engineer', 'Smokestack', 'Tempest Djinn', 'Arbor Elf', 'Brain Freeze', 'Path to the World Tree', 'Frenetic Sliver', 'Ancestral Anger', 'Temple of Abandon', 'Cathartic Pyre', 'Bloodbraid Elf', 'Fiery Justice', 'Falkenrath Gorger', 'Benalish Marshal', 'Oust', 'Qasali Pridemage', 'Thirst for Discovery', 'Fiend Hunter', 'Barbarian Ring', 'Sacred Fire', 'Sharuum the Hegemon', 'Goblin Dark-Dwellers', 'Faerie Vandal', 'Abrade', 'Karn, Silver Golem', 'Treacherous Blessing', 'Barren Moor', 'Elemental Masterpiece', 'Mistveil Plains', 'Thirst for Meaning', 'Lose Focus', 'Steel Overseer', 'Skyclave Shade', 'It That Betrays', 'Disenchant', 'Arcbound Javelineer', 'Geomancer''s Gambit', 'Mizzium Mortars', 'Dire Fleet Daredevil', 'Verdant Command', 'Cursecatcher', 'Resurgent Belief', 'Frantic Inventory', 'Honored Hydra', 'Oblivion Ring', 'Village Messenger', 'Calciform Pools', 'Llanowar Wastes', 'Sign in Blood', 'Repeal', 'Easy Prey', 'Falkenrath Aristocrat', 'Tombstalker', 'Fieldmist Borderpost', 'Patchwork Automaton', 'Conduit of Ruin', 'Careful Cultivation', 'Avatar of Discord', 'Battlefield Forge', 'Unwinding Clock', 'Curiosity', 'Declaration in Stone', 'Lochmere Serpent', 'Walking Atlas', 'Veinfire Borderpost', 'Mission Briefing', 'Sleeper Agent', 'Sigil of Valor', 'Hostage Taker', 'Merfolk Mistbinder', 'Sanctum of Stone Fangs', 'Prosperous Thief', 'Into the Roil', 'Gatekeeper of Malakir', 'Feed the Swarm', 'Woodland Cemetery', 'Esper Charm', 'Arcbound Mouser', 'Blade Splicer', 'Aven Squire', 'Embereth Shieldbreaker', 'Treasure Cruise', 'Vampire''s Kiss', 'Wrench Mind', 'Restore Balance', 'Slagstorm', 'Wildfield Borderpost', 'Goblin Electromancer', 'Hollowhead Sliver', 'Azor''s Gateway', 'Mizzium Skin', 'Malakir Rebirth', 'Skemfar Avenger', 'Vedalken Orrery', 'Temple of Malady', 'Zulaport Cutthroat', 'Unravel the Aether', 'Braids, Cabal Minion', 'Tempered Sliver', 'Upheaval', 'Wandering Mind', 'Wayward Guide-Beast', 'Behold the Multiverse', 'Delver of Secrets', 'Sire of Insanity', 'Obstinate Baloth', 'Thaumatic Compass', 'Boomerang', 'Flame Javelin', 'Kolvori, God of Kinship', 'Guild Globe', 'Throne of Geth', 'Flame Rift', 'Fabricate', 'Metalwork Colossus', 'Ensoul Artifact', 'Opt', 'Mythos of Nethroi', 'Spikefield Hazard', 'Brainstone', 'Cosima, God of the Voyage', 'Unesh, Criosphinx Sovereign', 'Dregscape Sliver', 'Brimstone Dragon', 'March of Reckless Joy', 'Experimental Synthesizer', 'Diabolic Edict', 'Captured Sunlight', 'Saw It Coming', 'Ancient Grudge', 'Judith, the Scourge Diva', 'Silverblade Paladin', 'Silvergill Adept', 'Chancellor of the Dross', 'Forked Bolt', 'Ghitu Lavarunner', 'Glimmerpoint Stag', 'Gitaxian Probe', 'Healer''s Hawk', 'The Underworld Cookbook', 'Nether Spirit', 'Ammit Eternal', 'Temple of Silence', 'Staff of Domination', 'Glacial Fortress', 'Myr Superion', 'Battle Screech', 'Ambitious Farmhand', 'Staff of Nin', 'Pathrazer of Ulamog', 'Maestros Theater', 'The First Iroan Games', 'The Mending of Dominaria', 'Collateral Damage', 'Undercity Informer', 'Mesmeric Fiend', 'Rune-Scarred Demon', 'Knight of the White Orchid', 'Wild Mongrel', 'Soul Spike', 'Restoration Angel', 'Mistvein Borderpost', 'Cabaretti Courtyard', 'Waterfront District', 'Kessig Flamebreather', 'Desecration Demon', 'Dauntless Escort', 'Wrath of God', 'Sphinx of Foresight', 'Tymaret, Chosen from Death', 'Firebrand Archer', 'Asylum Visitor', 'Tendrils of Agony', 'Runed Halo', 'Tempered in Solitude', 'Buried Ruin', 'Treasure Map', 'Glorybringer', 'Dark Ritual', 'Izzet Signet', 'Castigate', 'Thousand-Faced Shadow', 'Commit // Memory', 'Reflex Sliver', 'Knight of Glory', 'Thraben Inspector', 'Terminus', 'Dennick, Pious Apprentice', 'Diffusion Sliver', 'Emmara, Soul of the Accord', 'Honor of the Pure', 'Hypnotic Specter', 'Greater Good', 'Piranha Marsh', 'Pillage', 'Putrid Imp', 'Strike It Rich', 'Labyrinth of Skophos', 'Angel of Glory''s Rise', 'Heartless Summoning', 'Frantic Search', 'Bump in the Night', 'Goblin Bombardment', 'Neutralize', 'Brazen Upstart', 'Think Twice', 'Farseek', 'The Bloodsky Massacre', 'Judge''s Familiar', 'Gideon Jura', 'Darigaaz Reincarnated', 'Loxodon Smiter', 'Stirring Wildwood', 'Mirran Crusader', 'Fauna Shaman', 'Voldaren Epicure', 'Grim Lavamancer', 'Harrow', 'Rosethorn Acolyte', 'Jack-o''-Lantern', 'Tyrant''s Choice', 'Coalition Relic', 'Memory Lapse', 'Demonic Dread', 'Unlucky Witness', 'Cosmos Elixir', 'Lavabelly Sliver', 'Hymn to Tourach', 'Condemn', 'Firewild Borderpost', 'Mistblade Shinobi', 'Desperate Ritual', 'Garruk Wildspeaker', 'Viashino Pyromancer', 'Stormblood Berserker', 'Circular Logic', 'Yahenni''s Expertise', 'Field of Ruin', 'Obscura Storefront', 'Reap the Past', 'Dovin Baan', 'Ponder', 'Orcish Lumberjack', 'Secluded Steppe', 'Ojutai''s Command', 'Rustvale Bridge', 'Terastodon', 'Shardless Agent', 'Lotleth Giant', 'Fungus Sliver', 'Korlash, Heir to Blackblade', 'Dawn of Hope', 'Midnight Reaper', 'Painful Truths', 'Merrow Reejerey', 'Temur Charm', 'Pyretic Ritual', 'Dragonskull Summit', 'Selesnya Charm', 'Wild Nacatl', 'Master of the Pearl Trident', 'Oni-Cult Anvil', 'Animation Module', 'Grand Architect', 'Iron Apprentice', 'Jace, the Living Guildpact', 'Ionize', 'Porphyry Nodes', 'Slagwoods Bridge', 'Glorious End', 'Nylea''s Presence', 'Celestial Kirin', 'Springbloom Druid', 'Living Twister', 'Lavaclaw Reaches', 'Fire Prophecy', 'Chance Encounter', 'Fading Hope', 'Goldmire Bridge', 'See the Truth', 'Forgotten Cave', 'Of One Mind', 'Kefnet the Mindful', 'Coiling Oracle', 'Akroma''s Memorial', 'Archetype of Endurance', 'Brooding Saurian', 'Nature''s Lore', 'Vivid Marsh', 'Darkheart Sliver', 'Fyndhorn Elves', 'Illuminator Virtuoso', 'Falkenrath Pit Fighter', 'Glen Elendra Archmage', 'Darksteel Colossus', 'Nezahal, Primal Tide', 'Bloodtithe Harvester', 'Balustrade Spy', 'Snow-Covered Plains', 'Birds of Paradise', 'Benevolent Bodyguard', 'Precinct Captain', 'Urza''s Factory', 'Circle of Confinement', 'Rise and Shine', 'Mirage Mirror', 'Throes of Chaos', 'Sleight of Hand', 'Cruel Ultimatum', 'Azami, Lady of Scrolls', 'Wild Cantor', 'Enigma Sphinx', 'Arcbound Ravager', 'Kaya, Ghost Assassin', 'Suspend', 'Rootbound Crag', 'Eiganjo Castle', 'Abundant Harvest', 'Vedalken Shackles', 'Geist-Honored Monk', 'Voidslime', 'Mirrorshell Crab', 'Dread Presence', 'Mishra''s Factory', 'Unburial Rites', 'Brushfire Elemental', 'Ominous Seas', 'Seething Song', 'Leyline of Anticipation', 'Rootborn Defenses', 'Snow-Covered Forest', 'Faithful Mending', 'Bogardan Hellkite', 'Talisman of Curiosity', 'Touch the Spirit Realm', 'Duress', 'Ethersworn Sphinx', 'Kira, Great Glass-Spinner', 'Den Protector', 'Dryad Militant', 'Erebos''s Intervention', 'Dread Return', 'Iname as One', 'Wall of Omens', 'Search for Tomorrow', 'Astral Cornucopia', 'Vindicate', 'Planar Bridge', 'Harbinger of the Tides', 'Snow-Covered Swamp', 'Steppe Lynx', 'Wilt-Leaf Liege', 'Ritual of Soot', 'Mind''s Desire', 'Memorial to Glory', 'Mythos of Brokkos', 'Myth Realized', 'Atris, Oracle of Half-Truths', 'Arguel''s Blood Fast', 'Krark''s Thumb', 'Primal Surge', 'Seasoned Hallowblade', 'Varragoth, Bloodsky Sire', 'Ornithopter', 'Vampire Nighthawk', 'Lonely Sandbar', 'Centaur Garden', 'Elixir of Immortality', 'Dismal Backwater', 'Invoke Calamity', 'Hive Mind', 'Thought Erasure', 'Sliver Queen', 'Shatterskull Charger', 'Vapor Snag', 'Stern Dismissal', 'Angel of Sanctions', 'Magister of Worth', 'Malakir Blood-Priest', 'Knight of the Reliquary', 'Mana Leak', 'Whip of Erebos', 'Restless Bloodseeker', 'Kodama''s Reach', 'Champion of the Parish', 'Vivid Creek', 'Sprite Dragon', 'Skyclave Pick-Axe', 'Curious Pair', 'Colossal Skyturtle', 'Laboratory Maniac', 'Sultai Charm', 'Zetalpa, Primal Dawn', 'General Ferrous Rokiric', 'Silundi Vision', 'Arcane Sanctum', 'Fire-Lit Thicket', 'Nested Shambler', 'Mystic Snake', 'Grozoth', 'Dauntless Bodyguard', 'Akoum Hellhound', 'Advent of the Wurm', 'Far // Away', 'Sarkhan the Masterless', 'Shenanigans', 'Galerider Sliver', 'Call of the Conclave', 'Okina, Temple to the Grandfathers', 'Vryn Wingmare', 'Glimmerpost', 'Watcher for Tomorrow', 'Memory''s Journey', 'Sylvan Scrying', 'Lightning Strike', 'Trickbind', 'Needle Spires', 'Masterful Replication', 'Shrieking Affliction', 'Gemhide Sliver', 'Cloudpost', 'Noose Constrictor', 'Might Sliver', 'Nicol Bolas, Planeswalker', 'Stubborn Denial', 'Desperate Ravings', 'Lone Rider', 'Mirror March', 'Demon of Dark Schemes', 'Mask of the Mimic', 'Raise the Alarm', 'Ethersworn Canonist', 'Maestros Charm', 'Razortide Bridge', 'Duskwielder', 'Goblin Cannon', 'Dormant Sliver', 'Cathartic Reunion', 'Hypergenesis', 'Outland Liberator', 'Ugin''s Conjurant', 'Snow-Covered Mountain', 'Hero of Precinct One', 'Game Trail', 'Witch''s Cottage', 'Maul of the Skyclaves', 'Caves of Koilos', 'Terramorphic Expanse', 'Rootwater Depths', 'Thought Scour', 'Temple of Enlightenment', 'Logic Knot', 'Chromatic Lantern', 'Burning of Xinye', 'Underworld Connections', 'Sword-Point Diplomacy', 'Sovereign''s Bite', 'Polymorph', 'Kird Ape', 'Liliana''s Contract', 'Blackbloom Rogue', 'Liquimetal Torque', 'Evolving Wilds', 'Kefnet''s Monument', 'Alchemist''s Gambit', 'Smallpox', 'Deep Analysis', 'Ancient Stirrings', 'Tidespout Tyrant', 'Power Depot', 'Signal Pest', 'Phyrexian Dreadnought', 'Moon-Circuit Hacker', 'Izzet Charm', 'The Birth of Meletis', 'Karador, Ghost Chieftain', 'Sundial of the Infinite', 'Flame Slash', 'Inevitable Betrayal', 'Mirrorweave', 'Deep Forest Hermit', 'Prophetic Prism', 'Ghost Quarter', 'Sunscorched Desert', 'Kazuul''s Fury', 'Quest for the Nihil Stone', 'Tendo Ice Bridge', 'Temple of Mystery', 'Westvale Abbey', 'Dream Leash', 'Bastion of Remembrance', 'Spell Pierce', 'Gonti, Lord of Luxury', 'Alms of the Vein', 'Plated Geopede', 'Cleansing Wildfire', 'Coralhelm Commander', 'Kiln Fiend', 'Snowfield Sinkhole', 'Justice Strike', 'Shatter the Sky', 'Foreboding Ruins', 'Abbot of Keral Keep', 'Discovery // Dispersal', 'Mistvault Bridge', 'Master of Death', 'Inkwell Leviathan', 'Demigod of Revenge', 'Gilded Lotus', 'Decree of Justice', 'Nightmare Shepherd', 'Heartless Act', 'Arcbound Worker', 'Reality Ripple', 'Bedlam Reveler', 'Greater Gargadon', 'Hive Stirrings', 'Frontier Bivouac', 'Soul Snare', 'Izzet Boilerworks', 'Sphinx of the Steel Wind', 'Embodiment of Agonies', 'Hinterland Harbor', 'Mirrorpool', 'Psychic Strike', 'Stormtide Leviathan', 'Tidal Warrior', 'Renewed Faith', 'Possibility Storm', 'Keldon Marauders', 'Cormela, Glamour Thief', 'Temple of Malice', 'Grapeshot', 'Raven''s Crime', 'Ash Zealot', 'Vivid Grove', 'Vivid Meadow', 'Homing Sliver', 'Dream Trawler', 'Jeskai Ascendancy', 'Blackmail', 'Bonescythe Sliver', 'Avacyn''s Pilgrim', 'Sea Gate Oracle', 'Wonder', 'Thawing Glaciers', 'Bala Ged Recovery', 'Quest for Pure Flame', 'Explore', 'Raze the Effigy', 'Kabira Takedown', 'Doomed Traveler', 'Hieroglyphic Illumination', 'Cathar Commando', 'Knight of Infamy', 'Improbable Alliance', 'Lashwrithe', 'Student of Warfare', 'Bronzehide Lion', 'Kjeldoran Outpost', 'Thornglint Bridge', 'Tireless Provisioner', 'Vivid Crag', 'Wooded Bastion', 'Scab-Clan Berserker', 'Fire Covenant', 'Platinum Angel', 'Sylvan Advocate', 'Lumbering Falls', 'Thirst for Knowledge', 'Drowned Catacomb', 'Homestead Courage', 'Scythe Leopard', 'Nivmagus Elemental', 'Keruga, the Macrosage', 'Nephalia Academy', 'Figure of Destiny', 'Thornwood Falls', 'Talisman of Unity', 'Incinerate', 'Silverbluff Bridge', 'Okiba Reckoner Raid', 'Lava Dart', 'Tithe Taker', 'Approach of the Second Sun', 'Kathari Remnant', 'Slip Out the Back', 'Dubious Challenge', 'Akrasan Squire', 'Kopala, Warden of Waves', 'Diregraf Ghoul', 'Confiscate', 'Canyon Slough', 'Skyclave Cleric', 'Stromkirk Noble', 'Crumbling Necropolis', 'Sungold Sentinel', 'Fertile Ground', 'Mutilate', 'Faerie Miscreant', 'Consume the Meek', 'Dizzy Spell', 'Forbid', 'Ground Rift', 'Palace Siege', 'Temple of Deceit', 'Dragonstorm', 'Buried Alive', 'Vilis, Broker of Blood', 'Hypnotic Sprite', 'Intangible Virtue', 'Hour of Reckoning', 'Animate Dead', 'Jace Beleren', 'Jokulhaups', 'Revitalize', 'Trading Post', 'Chain Lightning', 'Gray Merchant of Asphodel', 'Elves of Deep Shadow', 'Virulent Sliver', 'Arch of Orazca', 'Raging Ravine', 'Transmogrify', 'Mystic Monastery', 'Eternal Dragon', 'Duty-Bound Dead', 'Arrogant Wurm', 'Brave the Elements', 'Gods Willing', 'Crackling Drake', 'Madcap Experiment', 'Courier''s Briefcase', 'Grimdancer', 'Brokers Hideout', 'Venom Sliver', 'Moorland Haunt', 'Bloodchief''s Thirst', 'White Sun''s Zenith', 'Dead // Gone', 'Lunar Force', 'Liquimetal Coating', 'Kazandu Mammoth', 'Swiftwater Cliffs', 'Dream Devourer', 'Changeling Outcast', 'Pelakka Predation', 'Negate', 'Brokers Charm', 'Tanglepool Bridge', 'Detention Sphere', 'Elvish Mystic', 'Kumano Faces Kakkazan', 'Tide Shaper', 'Spawning Pool', 'Rishadan Dockhand', 'Sejiri Steppe', 'Thassa''s Intervention', 'Hagra Mauling', 'Cruel Bargain', 'Burst Lightning', 'Disfigure', 'Hissing Quagmire', 'Purphoros''s Intervention', 'Tectonic Giant', 'Dragonkin Berserker', 'Cloudthresher', 'Twinshot Sniper', 'Tangled Florahedron', 'Azorius Charm', 'Simic Charm', 'Phantasmagorian', 'One with the Machine', 'Dread Fugue', 'Sylvan Library', 'Orbs of Warding', 'Cultivate', 'Hypnox', 'Lodestone Golem', 'Firespout', 'Promise of Bunrei'))) 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, 85.7, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (60.3 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Field of Ruin', 'Silundi Vision', 'Battle Screech', 'Lavabelly Sliver', 'Frantic Search', 'Renewed Faith', 'It That Betrays', 'Maul of the Skyclaves', 'Bonescythe Sliver', 'Judith, the Scourge Diva', 'Piranha Marsh', 'Mistveil Plains', 'Gitaxian Probe', 'Animate Dead', 'Secluded Steppe', 'Rune-Scarred Demon', 'Tide Shaper', 'Restore Balance', 'Feed the Swarm', 'Heartless Act', 'Okina, Temple to the Grandfathers', 'Healer''s Hawk', 'Dragonkin Berserker', 'Frontier Bivouac', 'Mythos of Nethroi', 'Nicol Bolas, Planeswalker', 'Bala Ged Recovery', 'Jokulhaups', 'Zetalpa, Primal Dawn', 'Cultivate', 'Obstinate Baloth', 'Doomed Traveler', 'Reckless Waif', 'Terminus', 'Sygg, River Cutthroat', 'Revitalize', 'Psychic Strike', 'Woodland Cemetery', 'Reap the Past', 'Hostage Taker', 'Cloudthresher', 'Unlucky Witness', 'Burning of Xinye', 'Vampire Cutthroat', 'Homestead Courage', 'Midnight Reaper', 'Mystic Snake', 'Hypnotic Specter', 'Hollowhead Sliver', 'Gonti, Lord of Luxury', 'Neutralize', 'Harrow', 'Zulaport Cutthroat', 'Skemfar Avenger', 'Detention Sphere', 'Llanowar Wastes', 'Myr Superion', 'Wall of Omens', 'Flame Javelin', 'Gilded Lotus', 'Firewild Borderpost', 'Disfigure', 'Rootborn Defenses', 'Living Twister', 'Touch the Spirit Realm', 'Thornglint Bridge', 'Cathar Commando', 'Dream Trawler', 'Mistvein Borderpost', 'Diabolic Edict', 'Ionize', 'Declaration in Stone', 'Hymn to Tourach', 'Duress', 'Azorius Charm', 'Ritual of Soot', 'Deep Forest Hermit', 'Restoration Angel', 'Yahenni''s Expertise', 'Mirran Crusader', 'Cruel Ultimatum', 'Cosima, God of the Voyage', 'Arcane Sanctum', 'Chromatic Lantern', 'Otherworldly Gaze', 'Wooded Bastion', 'Sharuum the Hegemon', 'Cosmos Elixir', 'Reflex Sliver', 'Oblivion Ring', 'Sunscorched Desert', 'Cabaretti Courtyard', 'Fabricate', 'First-Sphere Gargantua', 'Sungold Sentinel', 'Slagstorm', 'Eternal Dragon', 'Springbloom Druid', 'Dark Ritual', 'Chain Lightning', 'Angel of Sanctions', 'Nivmagus Elemental', 'Bastion of Remembrance', 'Phyrexian Dreadnought', 'Malakir Blood-Priest', 'Stormblood Berserker', 'Hour of Reckoning', 'Cormela, Glamour Thief', 'Thirst for Discovery', 'Aven Squire', 'Tempered Sliver', 'Tendrils of Agony', 'Fieldmist Borderpost', 'Selesnya Charm', 'Snow-Covered Mountain', 'Razortide Bridge', 'Izzet Charm', 'Consume the Meek', 'Farseek', 'Duskwielder', 'Magister of Worth', 'Tectonic Giant', 'Mesmeric Fiend', 'Temple of Epiphany', 'Nested Shambler', 'Enigma Sphinx', 'Vivid Marsh', 'Sundial of the Infinite', 'Death Cultist', 'Zombie Infestation', 'Westvale Abbey', 'Voidslime', 'Faithful Mending', 'All Suns'' Dawn', 'Dawn of Hope', 'Behold the Multiverse', 'Tireless Provisioner', 'Spell Pierce', 'Mystic Monastery', 'Wayward Guide-Beast', 'Forbid', 'Sovereign''s Bite', 'Circular Logic', 'Far // Away', 'Brokers Charm', 'Lone Rider', 'Memorial to Glory', 'Decree of Justice', 'Changeling Outcast', 'Dread Return', 'Waterfront District', 'Dread Fugue', 'Ancestral Anger', 'Gemhide Sliver', 'Drowned Catacomb', 'Promise of Bunrei', 'Spawning Pool', 'Dismal Backwater', 'Izzet Signet', 'Psychatog', 'Grimdancer', 'Logic Knot', 'Kodama''s Reach', 'Treasure Cruise', 'Maestros Charm', 'Mirrorshell Crab', 'Frenetic Sliver', 'Dovin Baan', 'Lochmere Serpent', 'Hagra Mauling', 'Flame Slash', 'Akoum Hellhound', 'Approach of the Second Sun', 'Vapor Snag', 'Dead // Gone', 'Mask of the Mimic', 'Sylvan Library', 'Ground Rift', 'Tyrant''s Choice', 'Watcher for Tomorrow', 'Platinum Angel', 'Cathartic Reunion', 'Tithe Taker', 'Village Messenger', 'Castigate', 'Kird Ape', 'Captured Sunlight', 'Mistvault Bridge', 'Outland Liberator', 'Discovery // Dispersal', 'Scab-Clan Berserker', 'Treacherous Blessing', 'Porphyry Nodes', 'Homing Sliver', 'Knight of Glory', 'Scrapheap Scrounger', 'Call of the Conclave', 'Conduit of Ruin', 'Celestial Kirin', 'Sylvan Advocate', 'Ponder', 'Raise the Alarm', 'Condemn', 'White Sun''s Zenith', 'Metalwork Colossus', 'Slagwoods Bridge', 'Dauntless Escort', 'Korlash, Heir to Blackblade', 'Purphoros''s Intervention', 'Mishra''s Factory', 'Izzet Boilerworks', 'Bump in the Night', 'Snow-Covered Plains', 'Kitchen Imp', 'Kjeldoran Outpost', 'Ugin''s Conjurant', 'Brushfire Elemental', 'Wild Nacatl', 'Emmara, Soul of the Accord', 'Sleeper Agent', 'Avacyn''s Pilgrim', 'Vivid Creek', 'Gideon Jura', 'Nature''s Lore', 'See the Truth', 'Silvergill Adept', 'Hissing Quagmire', 'Confiscate', 'Goldmire Bridge', 'March of Reckless Joy', 'Snow-Covered Forest', 'Dream Leash', 'Saw It Coming', 'Thraben Inspector', 'Okiba Reckoner Raid', 'Terramorphic Expanse', 'Vivid Crag', 'Brokers Hideout', 'Venom Sliver', 'Fire-Lit Thicket', 'Hinterland Harbor', 'Stromkirk Noble', 'Elemental Masterpiece', 'Hypergenesis', 'Snowfield Sinkhole', 'Lose Focus', 'Sea Gate Oracle', 'Think Twice', 'Thirst for Knowledge', 'Krark''s Thumb', 'Bone Shards', 'Shriekmaw', 'Raze the Effigy', 'Honor of the Pure', 'Pyretic Ritual', 'Sigil of Valor', 'Evolving Wilds', 'Myth Realized', 'Master of Death', 'Silverbluff Bridge', 'Dregscape Sliver', 'Hero of Precinct One', 'Merrow Reejerey', 'Kaya, Ghost Assassin', 'Sylvan Scrying', 'Ojutai''s Command', 'Gods Willing', 'Unesh, Criosphinx Sovereign', 'Stirring Wildwood', 'Rishadan Dockhand', 'Canyon Slough', 'Thaumatic Compass', 'Geomancer''s Gambit', 'Easy Prey', 'Sphinx of Foresight', 'Alchemist''s Gambit', 'Akrasan Squire', 'Galerider Sliver', 'Glorybringer', 'The Underworld Cookbook', 'Sire of Insanity', 'Buried Alive', 'Mission Briefing', 'Barbarian Ring', 'Birds of Paradise', 'Seething Song', 'Tempered in Solitude', 'Rootbound Crag', 'Fertile Ground', 'Wonder', 'Goblin Dark-Dwellers', 'Thassa''s Intervention', 'Hive Stirrings', 'Vivid Meadow', 'Grand Architect', 'Brainstone', 'Avatar of Discord', 'Primal Surge', 'Virulent Sliver', 'Tanglepool Bridge', 'Needle Spires', 'The Birth of Meletis', 'Vindicate', 'Nezahal, Primal Tide', 'Temple of Enlightenment', 'Gatekeeper of Malakir', 'Coiling Oracle', 'Advent of the Wurm', 'Elves of Deep Shadow', 'Coralhelm Commander', 'Kiln Fiend', 'Dragonskull Summit', 'Viashino Pyromancer', 'Silent Submersible', 'Tymaret, Chosen from Death', 'Goblin Electromancer', 'Fact or Fiction', 'Ghost Quarter', 'Justice Strike', 'Abrade', 'Temple of Malady', 'Jace, the Living Guildpact', 'Thought Scour', 'Hieroglyphic Illumination', 'Snow-Covered Swamp', 'Grapeshot', 'Invoke Calamity', 'Wrath of God', 'Glen Elendra Archmage', 'Mizzium Mortars', 'Eiganjo Castle', 'Shatterskull Charger', 'Scythe Leopard', 'Sejiri Steppe', 'Path to the World Tree', 'Crumbling Necropolis', 'Mind''s Desire', 'Avaricious Dragon', 'Temple of Mystery', 'Barren Moor', 'Skyclave Pick-Axe', 'Thought Erasure', 'Game Trail', 'Strike It Rich', 'Fiend Hunter', 'Chance Encounter', 'Duty-Bound Dead', 'Knight of the Reliquary', 'Oust', 'Dire Fleet Daredevil', 'Knight of Infamy', 'Desperate Ritual', 'Garruk Wildspeaker', 'Elvish Mystic', 'Witch''s Cottage', 'Burst Lightning', 'Obscura Storefront', 'Glorious End', 'Deep Analysis', 'Day of Judgment', 'Sleight of Hand', 'General Ferrous Rokiric', 'Dormant Sliver', 'Mirror March', 'Keruga, the Macrosage', 'Tidespout Tyrant', 'Goblin Bombardment', 'Dryad Militant', 'Ethersworn Canonist', 'Stormtide Leviathan', 'Vryn Wingmare', 'Master of the Pearl Trident', 'Erebos''s Intervention', 'Might Sliver', 'Repeal', 'Plated Geopede', 'Temple of Silence', 'Putrid Imp', 'The Bloodsky Massacre', 'Akroma''s Memorial', 'Colossal Skyturtle', 'Kazuul''s Fury', 'Judge''s Familiar', 'Arch of Orazca', 'Soul Spike', 'Annex', 'Clifftop Retreat', 'Harbinger of the Tides', 'Glacial Fortress', 'Runed Halo', 'Illuminator Virtuoso', 'Greater Gargadon', 'Mana Leak', 'Heartless Summoning', 'Vivid Grove', 'Mythos of Brokkos', 'Caves of Koilos', 'Bloodchief''s Thirst', 'Cursecatcher', 'Disenchant', 'Dread Presence', 'Cleansing Wildfire', 'Den Protector', 'Falkenrath Gorger', 'Painful Truths', 'Memory Lapse', 'Veinfire Borderpost', 'Opt', 'Secluded Courtyard', 'Explore', 'Sultai Charm', 'Ethersworn Sphinx', 'Battlefield Forge', 'Lumbering Falls', 'Fungus Sliver', 'Frantic Inventory', 'Kazandu Mammoth', 'Sphinx of the Steel Wind', 'Wildfield Borderpost', 'Search for Tomorrow', 'Masterful Replication', 'Resurgent Belief', 'Shardless Agent', 'Palace Siege', 'Lodestone Golem', 'Hive Mind', 'Ash Zealot', 'Demonic Dread', 'Fauna Shaman', 'Blade Splicer', 'Lavaclaw Reaches', 'Kumano Faces Kakkazan', 'Bloodbraid Elf', 'Darkheart Sliver', 'Moorland Haunt', 'Diffusion Sliver', 'Jace Beleren', 'Falkenrath Aristocrat', 'Maestros Theater', 'Chief Engineer', 'Vampire Nighthawk', 'Esper Charm', 'Intangible Virtue', 'Abbot of Keral Keep', 'Raven''s Crime', 'Steppe Lynx', 'Chancellor of the Dross', 'Circle of Confinement', 'Skyclave Cleric', 'Verdant Command', 'Pathrazer of Ulamog', 'Knight of the White Orchid', 'Demigod of Revenge', 'Temple of Malice', 'Arbor Elf', 'Wandering Mind', 'Thawing Glaciers', 'Temple of Deceit', 'Underworld Connections', 'Lava Dart', 'Chandra, Pyromaster', 'Into the Roil', 'Nylea''s Presence', 'Bedlam Reveler', 'Sliver 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, 60.3, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (76.5 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Riveteers Overlook', 'Reap the Past', 'Gaea''s Will', 'Sleeper Agent', 'Restore Balance', 'Strike It Rich', 'Temple of Deceit', 'Vault of the Archangel', 'Sunscorched Desert', 'Clifftop Retreat', 'Skyclave Pick-Axe', 'Demigod of Revenge', 'Silvergill Adept', 'Deep Analysis', 'Waterveil Cavern', 'Glorybringer', 'Varragoth, Bloodsky Sire', 'Cathar Commando', 'Den Protector', 'Flame Javelin', 'Honor of the Pure', 'Arcane Sanctum', 'Grimdancer', 'Stormtide Leviathan', 'Sundial of the Infinite', 'Tendrils of Agony', 'Buried Alive', 'Pyretic Ritual', 'Dismal Backwater', 'Akoum Hellhound', 'Woodland Cemetery', 'Sharuum the Hegemon', 'Cabaretti Courtyard', 'Glacial Fortress', 'Tectonic Reformation', 'Bone Shards', 'Suspend', 'Curious Pair', 'Cormela, Glamour Thief', 'Wall of Omens', 'Go for Blood', 'Izzet Signet', 'Rishkar, Peema Renegade', 'Lodestone Golem', 'Panharmonicon', 'Tendo Ice Bridge', 'Ethersworn Sphinx', 'Unburial Rites', 'Master of the Pearl Trident', 'Sword-Point Diplomacy', 'Vivid Meadow', 'Temur Charm', 'Commit // Memory', 'Faerie Vandal', 'Sungold Sentinel', 'Neutralize', 'Hinterland Harbor', 'Bloodtithe Harvester', 'Azorius Charm', 'Bear''s Companion', 'Nyx Lotus', 'Terastodon', 'Rootborn Defenses', 'Obscura Charm', 'Thought Erasure', 'Twinflame', 'Firewild Borderpost', 'Vivid Marsh', 'Behold the Multiverse', 'Dream Trawler', 'Bloodbraid Elf', 'Magister of Worth', 'Dread Fugue', 'Ancient Stirrings', 'Bloodbraid Marauder', 'Abundant Harvest', 'Memorial to Glory', 'Good-Fortune Unicorn', 'Dovin Baan', 'Wayward Guide-Beast', 'Hissing Quagmire', 'Needle Spires', 'Sylvan Advocate', 'Detention Sphere', 'Ulamog''s Nullifier', 'Soul Spike', 'Distended Mindbender', 'Sigil of Valor', 'Braids, Cabal Minion', 'Putrid Imp', 'Scythe Leopard', 'Hypnotic Specter', 'Explore', 'Psychic Spiral', 'Witch''s Cottage', 'Faithful Mending', 'River Serpent', 'Judith, the Scourge Diva', 'Myr Superion', 'Lotleth Troll', 'Battle Screech', 'Keruga, the Macrosage', 'Ethersworn Canonist', 'Vampire Nighthawk', 'Elixir of Immortality', 'Venom Sliver', 'Frantic Search', 'It That Betrays', 'Cabal Initiate', 'The Underworld Cookbook', 'The Birth of Meletis', 'Avacyn''s Pilgrim', 'Fertile Ground', 'Mizzium Mortars', 'Teferi, Mage of Zhalfir', 'Wild Cantor', 'Pathrazer of Ulamog', 'Galerider Sliver', 'Mistvault Bridge', 'Slip Out the Back', 'Sarkhan the Masterless', 'Arcus Acolyte', 'Razortide Bridge', 'Okina, Temple to the Grandfathers', 'Day of Judgment', 'Brushfire Elemental', 'Memory Leak', 'Merrow Reejerey', 'Treacherous Blessing', 'Disfigure', 'Diabolic Edict', 'Lose Focus', 'Merchant of the Vale', 'Sign in Blood', 'Lumbering Falls', 'Logic Knot', 'Runed Halo', 'Tempered Sliver', 'Hive Mind', 'Thassa''s Intervention', 'General Ferrous Rokiric', 'Tide Shaper', 'Doomskar Titan', 'Dire Fleet Daredevil', 'Mythos of Brokkos', 'Fungus Sliver', 'Stromkirk Noble', 'Soulherder', 'Chain Lightning', 'Urza''s Factory', 'Rotting Rats', 'Cloudpost', 'Bontu''s Last Reckoning', 'Psychic Strike', 'Glimpse of Tomorrow', 'Snow-Covered Mountain', 'Tyrant of Discord', 'Gods Willing', 'Brain Freeze', 'Watcher for Tomorrow', 'Wildfield Borderpost', 'Llanowar Tribe', 'Knight of the White Orchid', 'All Suns'' Dawn', 'Elvish Mystic', 'Temple of Epiphany', 'Diffusion Sliver', 'Sarulf, Realm Eater', 'Kodama''s Reach', 'Lavabelly Sliver', 'Hollowhead Sliver', 'Netherborn Phalanx', 'Mizzium Skin', 'Gilded Lotus', 'Flame Slash', 'Mirrorshell Crab', 'Splendor Mare', 'Silent Submersible', 'Pyrrhic Revival', 'Stone Rain', 'Elves of Deep Shadow', 'Tyrant''s Choice', 'Grave Scrabbler', 'Wooded Bastion', 'Temple of Silence', 'Boon of the Wish-Giver', 'Stubborn Denial', 'Kiln Fiend', 'Dread Return', 'Hostage Taker', 'Renewed Faith', 'Temple of Enlightenment', 'Tectonic Giant', 'Swarm Shambler', 'Verdant Command', 'Chromatic Lantern', 'Raging Ravine', 'Declaration in Stone', 'Bastion of Remembrance', 'Hymn to Tourach', 'Spikefield Hazard', 'Virulent Sliver', 'Possibility Storm', 'Sultai Charm', 'Pillage', 'Lashwrithe', 'Irencrag Pyromancer', 'Improbable Alliance', 'Master of Death', 'Castigate', 'Benalish Marshal', 'Qasali Pridemage', 'Ash Zealot', 'Plated Geopede', 'Chance Encounter', 'Primal Command', 'Emmara, Soul of the Accord', 'Sire of Insanity', 'Vampire Cutthroat', 'Bala Ged Recovery', 'Maul of the Skyclaves', 'Arrogant Wurm', 'Knight of Glory', 'Anafenza, Kin-Tree Spirit', 'Irencrag Feat', 'Izzet Charm', 'Oona, Queen of the Fae', 'Veinfire Borderpost', 'Duskwielder', 'Setessan Petitioner', 'Vital Splicer', 'Tempered in Solitude', 'Cosmos Elixir', 'Homing Sliver', 'Healer''s Hawk', 'Duress', 'Darigaaz Reincarnated', 'Unesh, Criosphinx Sovereign', 'Hieroglyphic Illumination', 'Goblin Electromancer', 'Waterfront District', 'Goblin Bombardment', 'Mouth of Ronom', 'Memory Lapse', 'Giant Killer', 'Midnight Reaper', 'Bump in the Night', 'Dead // Gone', 'Dragonstorm', 'Izzet Boilerworks', 'Saw It Coming', 'Field of Ruin', 'Buried Ruin', 'Sensor Splicer', 'Mesmeric Fiend', 'Sandsteppe Citadel', 'Steppe Lynx', 'Blackmail', 'Glimmerpost', 'Thaumatic Compass', 'Village Messenger', 'Primal Surge', 'Archetype of Endurance', 'Tymaret, Chosen from Death', 'Metalwork Colossus', 'Oracle of Mul Daya', 'Cursecatcher', 'Porphyry Nodes', 'Cathartic Pyre', 'Tempest Djinn', 'Skyclave Shade', 'Monstrous Carabid', 'Esper Charm', 'Dawn of Hope', 'Advent of the Wurm', 'Grand Architect', 'Nature''s Lore', 'Ghostfire Blade', 'Dryad Militant', 'Crumbling Necropolis', 'Gargoyle Castle', 'Cathartic Reunion', 'Enigma Sphinx', 'Malakir Blood-Priest', 'Jace, the Living Guildpact', 'Evolving Wilds', 'Talrand, Sky Summoner', 'The Mending of Dominaria', 'Cleansing Wildfire', 'Bogardan Hellkite', 'See the Truth', 'Cultivate', 'Coiling Oracle', 'Drannith Stinger', 'Resurgent Belief', 'Captured Sunlight', 'Greater Gargadon', 'Dimir Signet', 'Realm Razer', 'Feed the Swarm', 'Raven''s Crime', 'Lurching Rotbeast', 'Hour of Promise', 'Asylum Visitor', 'Master Splicer', 'Tanglepool Bridge', 'Hour of Reckoning', 'Riftwing Cloudskate', 'Goldmire Bridge', 'Grapeshot', 'Grisly Salvage', 'Vindicate', 'Llanowar Elves', 'Dream Leash', 'Approach of the Second Sun', 'Knight of Infamy', 'Corrupted Crossroads', 'Justice Strike', 'Shatterskull Charger', 'Brokers Hideout', 'Vilis, Broker of Blood', 'Gideon''s Lawkeeper', 'Heartless Summoning', 'Snowfield Sinkhole', 'Vedalken Shackles', 'Cosima, God of the Voyage', 'Raise the Alarm', 'Talisman of Impulse', 'Glorious End', 'Desert Cerodon', 'Chandra, Pyromaster', 'Gavony Township', 'Champion of Wits', 'Twinshot Sniper', 'Stirring Wildwood', 'Fire Covenant', 'Knight of the Reliquary', 'Fabricate', 'Fact or Fiction', 'Temple of Mystery', 'Wasteland Strangler', 'Erayo, Soratami Ascendant', 'Inevitable Betrayal', 'Raze the Effigy', 'Maestros Charm', 'Dizzy Spell', 'Myth Realized', 'Call of the Conclave', 'Secluded Courtyard', 'Selesnya Charm', 'Sleight of Hand', 'Snow-Covered Forest', 'Korlash, Heir to Blackblade', 'Stormblood Berserker', 'Tithe Taker', 'Conclave Mentor', 'Platinum Angel', 'Temple of Abandon', 'Hagra Mauling', 'Kazuul''s Fury', 'Goblin Dark-Dwellers', 'Crypt of Agadeem', 'Mishra''s Factory', 'Frenetic Sliver', 'Frontier Bivouac', 'Consume the Meek', 'Empty the Warrens', 'Dregscape Sliver', 'Seasoned Hallowblade', 'Elvish Visionary', 'Timely Reinforcements', 'Palace Siege', 'Flourishing Fox', 'Jace Beleren', 'Drowned Catacomb', 'Ramunap Excavator', 'White Sun''s Zenith', 'Aven Squire', 'Yorvo, Lord of Garenbrig', 'Yahenni''s Expertise', 'Ancestral Anger', 'Think Twice', 'Caves of Koilos', 'Elder Deep-Fiend', 'Sovereign''s Bite', 'Nested Shambler', 'Search for Tomorrow', 'Annex', 'Thawing Glaciers', 'Sygg, River Cutthroat', 'Obscura Storefront', 'Hive Stirrings', 'Far // Away', 'Gideon Jura', 'Slitherhead', 'Haunted Fengraf', 'Spell Pierce', 'Forbid', 'Gonti, Lord of Luxury', 'Wandering Mind', 'Reality Ripple', 'Vivid Crag', 'Condemn', 'Sea Gate Wreckage', 'Mephidross Vampire', 'Timeless Witness', 'Scrapheap Scrounger', 'Burning of Xinye', 'Stern Dismissal', 'Mission Briefing', 'Basking Rootwalla', 'Erebos''s Intervention', 'Ponder', 'Vivid Grove', 'Farseek', 'Krark''s Thumb', 'Mistvein Borderpost', 'Darkheart Sliver', 'Sphinx of the Steel Wind', 'Force of Rage', 'Champion of the Parish', 'Changeling Outcast', 'Vapor Snag', 'Ajani, the Greathearted', 'Mystifying Maze', 'Invoke Calamity', 'Might Sliver', 'Doomed Traveler', 'Abbot of Keral Keep', 'Zulaport Cutthroat', 'Kjeldoran Outpost', 'Phantasmagorian', 'Riveteers Charm', 'Mausoleum Secrets', 'Zenith Flare', 'Fire-Lit Thicket', 'Rune-Scarred Demon', 'Dragonskull Summit', 'Sphinx of Foresight', 'Temple of Malady', 'Falkenrath Gorger', 'Summer Bloom', 'Viashino Pyromancer', 'Radha, Heart of Keld', 'Demonic Dread', 'Thornglint Bridge', 'Nezahal, Primal Tide', 'Shalai, Voice of Plenty', 'Cloudshift', 'Seething Song', 'Archaeomancer', 'Rootbound Crag', 'Ghost Quarter', 'Flood Plain', 'Skyclave Cleric', 'Zombie Infestation', 'Ob Nixilis, the Fallen', 'Ritual of Soot', 'Harbinger of the Tides', 'Secluded Steppe', 'Twisted Abomination', 'Elemental Bond', 'Hero of Precinct One', 'Colossal Skyturtle', 'Orcish Lumberjack', 'Harrow', 'Selesnya Sanctuary', 'Promise of Bunrei', 'Wrath of God', 'Kathari Remnant', 'Gatekeeper of Malakir', 'Nivmagus Elemental', 'Arch of Orazca', 'Brimstone Dragon', 'Conduit of Ruin', 'Scab-Clan Berserker', 'Brainstone', 'Game Trail', 'Silundi Vision', 'Skemfar Avenger', 'Flayer of the Hatebound', 'Edgewall Innkeeper', 'Psychatog', 'Horror of the Broken Lands', 'Voidslime', 'Smallpox', 'Lava Dart', 'Masterful Replication', 'Deep Forest Hermit', 'Bearer of Silence', 'Okiba Reckoner Raid', 'Future Sight', 'Chief Engineer', 'Electrolyze', 'Orchard Strider', 'Garruk Wildspeaker', 'Eiganjo Castle', 'Tireless Provisioner', 'Ugin''s Conjurant', 'Sprite Dragon', 'March of Reckless Joy', 'Spirited Companion', 'Mind''s Desire', 'Artisan of Kozilek', 'Sejiri Steppe', 'Mirrodin''s Core', 'Mythos of Nethroi', 'Otherworldly Gaze', 'Barbarian Ring', 'Drannith Healer', 'Kumano Faces Kakkazan', 'Vryn Wingmare', 'Heliod''s Pilgrim', 'Living Twister', 'Centaur Garden', 'Dakmor Salvage', 'Fiend Hunter', 'Oblivion Ring', 'Slagwoods Bridge', 'Dark Ritual', 'Cryptic Caves', 'Shriekmaw', 'Coralhelm Commander', 'Sire of Stagnation', 'Dread Presence', 'Orim''s Chant', 'Nylea''s Presence', 'Phyrexian Dreadnought', 'Intangible Virtue', 'Elemental Masterpiece', 'Sylvan Library', 'Touch the Spirit Realm', 'Circle of Confinement', 'Simic Charm', 'Spark Spray', 'Predator Ooze', 'Moorland Haunt', 'Lone Rider', 'Into the Roil', 'Hypergenesis', 'Deadshot Minotaur', 'Battlefield Forge', 'Death Cultist', 'Form of the Dragon', 'Underworld Connections', 'Path to the World Tree', 'Bloodchief''s Thirst', 'Shardless Agent', 'Desperate Ritual', 'Terminus', 'Lightning Rift', 'Kird Ape', 'Judge''s Familiar', 'Auramancer', 'Kolvori, God of Kinship', 'Coalition Relic', 'Falkenrath Aristocrat', 'Nicol Bolas, Planeswalker', 'Canyon Slough', 'Growth-Chamber Guardian', 'Planar Bridge', 'Lochmere Serpent', 'Lavaclaw Reaches', 'Restoration Angel', 'Avaricious Dragon', 'Disenchant', 'Decree of Justice', 'Avatar of Woe', 'Thirst for Knowledge', 'Ground Rift', 'Ornithopter', 'Kitchen Imp', 'Tooth and Nail', 'Circular Logic', 'Thirst for Discovery', 'Mask of the Mimic', 'Slagstorm', 'Tormod''s Cryptkeeper', 'Lantern of the Lost', 'Fauna Shaman', 'Throes of Chaos', 'Ghitu Encampment', 'Gemhide Sliver', 'Duty-Bound Dead', 'Zhur-Taa Goblin', 'Jokulhaups', 'Reverent Hunter', 'Mistveil Plains', 'Angel of Sanctions', 'Noose Constrictor', 'The Bloodsky Massacre', 'Pyxis of Pandemonium', 'Wild Mongrel', 'Genesis Wave', 'Mirror March', 'An Offer You Can''t Refuse', 'Brokers Charm', 'Tidespout Tyrant', 'Animate Dead', 'Celestial Kirin', 'Choking Sands', 'Alchemist''s Gambit', 'Discovery // Dispersal', 'Unlucky Witness', 'Arbor Elf', 'Imposing Vantasaur', 'Reflex Sliver', 'Spawning Pool', 'Rosethorn Acolyte', 'Springbloom Druid', 'Ionize', 'Prophetic Prism', 'Extractor Demon', 'Painful Truths', 'Chancellor of the Dross', 'Leatherback Baloth', 'Delver of Secrets', 'Foreboding Ruins', 'Ojutai''s Command', 'Reckless Waif', 'Cartographer''s Survey', 'Sea Gate Oracle', 'Illuminator Virtuoso', 'Unravel the Aether', 'Rootwater Depths', 'Easy Prey', 'Sliver Queen', 'Barren Moor', 'Thraben Inspector', 'Heartless Act', 'Gruul Turf', 'Confiscate', 'Mystic Snake', 'Sylvan Scrying', 'Vampire''s Kiss', 'Blade Splicer', 'Arguel''s Blood Fast', 'Akroma''s Memorial', 'Terramorphic Expanse', 'Westvale Abbey', 'Thought Scour', 'Eternal Dragon', 'Zetalpa, Primal Dawn', 'Wild Nacatl', 'Opt', 'Shredded Sails', 'Akrasan Squire', 'Captain of the Watch', 'Rishadan Dockhand', 'Snow-Covered Plains', 'Geomancer''s Gambit', 'Sinister Concoction', 'Treasure Cruise', 'Abrade', 'Oust', 'Moritte of the Frost', 'Obstinate Baloth', 'Dormant Sliver', 'Homestead Courage', 'Outland Liberator', 'Mindslaver', 'Vivid Creek', 'Triskelion', 'Revitalize', 'Temple of Malice', 'Piranha Marsh', 'Bedlam Reveler', 'Snow-Covered Swamp', 'Birds of Paradise', 'Fieldmist Borderpost', 'Dreg Mangler', 'Cloudthresher', 'Mirran Crusader', 'Glen Elendra Archmage', 'Karametra''s Acolyte', 'Hythonia the Cruel', 'Cruel Ultimatum', 'Collective Effort', 'Silverbluff Bridge', 'Kazandu Mammoth', 'Wonder', 'Burst Lightning', 'Bonescythe Sliver', 'Purphoros''s Intervention', 'Trickbind', 'Kaya, Ghost Assassin', 'Mystic Monastery', 'First-Sphere Gargantua', 'Torrent Sculptor', 'Honored Hydra', 'Avatar of Discord', 'Maestros Theater', 'Dauntless Escort', 'Mana Leak', 'Frantic Inventory', 'Repeal', 'Aspect of Hydra', 'Gitaxian Probe', 'Llanowar Wastes', 'Dragonkin Berserker'))) 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, 76.5, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (103.9 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Torrent Sculptor', 'Sarulf, Realm Eater', 'Firespout', 'Bonescythe Sliver', 'Vedalken Shackles', 'Tidespout Tyrant', 'Soul Spike', 'Den Protector', 'Dread Fugue', 'Hollowhead Sliver', 'Restoration Angel', 'Go for Blood', 'Birds of Paradise', 'Chancellor of the Dross', 'Dragonskull Summit', 'Kiln Fiend', 'Kjeldoran Outpost', 'Slip Out the Back', 'Kazandu Mammoth', 'Sinister Concoction', 'Sigil of Valor', 'Rootborn Defenses', 'Netherborn Phalanx', 'Shriekmaw', 'Ajani, the Greathearted', 'Kami of False Hope', 'Noose Constrictor', 'Memory Leak', 'Okina, Temple to the Grandfathers', 'White Sun''s Zenith', 'Sensor Splicer', 'Seething Song', 'Cabal Therapist', 'Psychic Strike', 'Steppe Lynx', 'Bloodtithe Harvester', 'Nezahal, Primal Tide', 'Eldrazi Mimic', 'Blackmail', 'Cleansing Wildfire', 'Myr Superion', 'Unburial Rites', 'Wild Cantor', 'Eiganjo Castle', 'Elvish Visionary', 'Crypt of Agadeem', 'Thought Scour', 'Mephidross Vampire', 'Maestros Charm', 'Hostage Taker', 'Vampire Cutthroat', 'Delver of Secrets', 'Fact or Fiction', 'Maestros Theater', 'Disenchant', 'Merchant of the Vale', 'Dizzy Spell', 'Goblin Bombardment', 'Crackling Drake', 'Intangible Virtue', 'Vindicate', 'Pyxis of Pandemonium', 'Mizzium Skin', 'Giant Killer', 'Wildfield Borderpost', 'Silent Submersible', 'Mind''s Desire', 'Plated Geopede', 'Cartographer''s Survey', 'Phantasmagorian', 'Garruk Wildspeaker', 'Oust', 'Tide Shaper', 'Cursecatcher', 'Lavaclaw Reaches', 'Resurgent Belief', 'Coralhelm Commander', 'Thawing Glaciers', 'Chandra, Pyromaster', 'Glorybringer', 'Cruel Bargain', 'Tendrils of Agony', 'Invoke Calamity', 'Sword-Point Diplomacy', 'Predator Ooze', 'Goblin Dark-Dwellers', 'Champion of Wits', 'Irencrag Feat', 'Grimdancer', 'Swarm Shambler', 'Mystic Snake', 'Westvale Abbey', 'Mouth of Ronom', 'Zulaport Cutthroat', 'Electrolyze', 'Wall of Omens', 'Temple of Enlightenment', 'Hagra Mauling', 'Avaricious Dragon', 'Spell Pierce', 'Burst Lightning', 'Mistvein Borderpost', 'Orchard Strider', 'Circular Logic', 'Abbot of Keral Keep', 'Master of Death', 'Tormod''s Cryptkeeper', 'Midnight Reaper', 'Brushfire Elemental', 'Veinfire Borderpost', 'Raise the Alarm', 'Sphinx of the Steel Wind', 'Lotleth Troll', 'Possibility Storm', 'Magister of Worth', 'Twinshot Sniper', 'Shredded Sails', 'Tempered Sliver', 'Teferi, Mage of Zhalfir', 'Elixir of Immortality', 'Game Trail', 'Thought Erasure', 'Intervention Pact', 'Painful Truths', 'Fertile Ground', 'Animation Module', 'Shardless Agent', 'Hive Stirrings', 'Bearer of Silence', 'Wayward Guide-Beast', 'Erayo, Soratami Ascendant', 'Flayer of the Hatebound', 'Oona, Queen of the Fae', 'Thirst for Discovery', 'Tectonic Giant', 'Mana Leak', 'Captured Sunlight', 'Glimpse of Tomorrow', 'Twinflame', 'Patchwork Automaton', 'Rishadan Dockhand', 'Vivid Meadow', 'Restore Balance', 'Llanowar Tribe', 'Rite of Oblivion', 'Sharuum the Hegemon', 'Azorius Charm', 'The Bloodsky Massacre', 'Skyclave Shade', 'Hinterland Harbor', 'Changeling Outcast', 'Gatekeeper of Malakir', 'Archetype of Endurance', 'Elves of Deep Shadow', 'Glacial Fortress', 'Village Messenger', 'Jace Beleren', 'Eternal Dragon', 'Dream Trawler', 'Arcbound Worker', 'Nylea''s Presence', 'Pyretic Ritual', 'Elemental Masterpiece', 'Dormant Sliver', 'Aspect of Hydra', 'Clifftop Retreat', 'Master of the Pearl Trident', 'Moorland Haunt', 'Raven''s Crime', 'Cruel Ultimatum', 'Hythonia the Cruel', 'Neutralize', 'Lone Rider', 'Zabaz, the Glimmerwasp', 'Confiscate', 'Venom Sliver', 'Stromkirk Noble', 'Slagwoods Bridge', 'Slaughter Pact', 'Brave the Elements', 'Snow-Covered Mountain', 'Splendor Mare', 'Cosmos Elixir', 'Battle Screech', 'Circle of Confinement', 'Silvergill Adept', 'Sundial of the Infinite', 'Zombie Infestation', 'Maul of the Skyclaves', 'Piranha Marsh', 'Cabal Initiate', 'Greater Gargadon', 'Hypergenesis', 'Steel Overseer', 'Oracle of Mul Daya', 'Lumbering Falls', 'Reckless Waif', 'Izzet Signet', 'Nested Shambler', 'Cultivate', 'See the Truth', 'Annex', 'Mission Briefing', 'Darkheart Sliver', 'Yahenni''s Expertise', 'Orcish Lumberjack', 'Sunscorched Desert', 'Fauna Shaman', 'Gitaxian Probe', 'Outland Liberator', 'Faithful Mending', 'Revitalize', 'Firewild Borderpost', 'Braids, Cabal Minion', 'Glen Elendra Archmage', 'Okiba Reckoner Raid', 'Squadron Hawk', 'Advent of the Wurm', 'Sleeper Agent', 'Avacyn''s Pilgrim', 'Vampire Nighthawk', 'Behold the Multiverse', 'Moritte of the Frost', 'Mythos of Nethroi', 'Lochmere Serpent', 'Purphoros''s Intervention', 'Nature''s Lore', 'An Offer You Can''t Refuse', 'Dakmor Salvage', 'Curious Pair', 'Heliod''s Pilgrim', 'Coiling Oracle', 'Elvish Mystic', 'Falkenrath Aristocrat', 'Razortide Bridge', 'Glimmerpost', 'Power Depot', 'Desperate Ritual', 'Primal Command', 'Form of the Dragon', 'Triskelion', 'Ghitu Encampment', 'Watcher for Tomorrow', 'Dregscape Sliver', 'Cathar Commando', 'Treacherous Blessing', 'Izzet Charm', 'Into the Roil', 'Seasoned Hallowblade', 'Brokers Hideout', 'Sire of Insanity', 'Foreboding Ruins', 'Duty-Bound Dead', 'Hissing Quagmire', 'Deep Analysis', 'Duress', 'Sylvan Library', 'Dead // Gone', 'Sea Gate Wreckage', 'Collective Effort', 'Obstinate Baloth', 'Smallpox', 'Temple of Mystery', 'Snow-Covered Forest', 'Akoum Hellhound', 'Thirst for Knowledge', 'Heartless Summoning', 'Ghost Quarter', 'Kird Ape', 'The Underworld Cookbook', 'Lavabelly Sliver', 'Thaumatic Compass', 'Tanglepool Bridge', 'Mythos of Brokkos', 'Colossal Skyturtle', 'Flood Plain', 'Dauntless Escort', 'Ghostly Flicker', 'Signal Pest', 'Llanowar Elves', 'Thraben Inspector', 'Bontu''s Last Reckoning', 'Omen of the Sun', 'Gideon Jura', 'Arcbound Mouser', 'Dark Ritual', 'Angel of Sanctions', 'Burning of Xinye', 'Kumano Faces Kakkazan', 'Force of Rage', 'Death Cultist', 'Abundant Harvest', 'Renewed Faith', 'Fabricate', 'Honor of the Pure', 'Auramancer', 'Healer''s Hawk', 'Boon of the Wish-Giver', 'Sovereign''s Bite', 'Woodland Cemetery', 'Thassa''s Intervention', 'March of Reckless Joy', 'Diabolic Edict', 'Duskwielder', 'Inevitable Betrayal', 'Kaya, Ghost Assassin', 'Snapback', 'Condemn', 'Orim''s Chant', 'Benevolent Bodyguard', 'Cormela, Glamour Thief', 'Snow-Covered Plains', 'Tyrant''s Scorn', 'Buried Ruin', 'Zetalpa, Primal Dawn', 'Lurching Rotbeast', 'Stormblood Berserker', 'Ojutai''s Command', 'Memorial to Glory', 'Mobilized District', 'The Birth of Meletis', 'Planar Bridge', 'Bear''s Companion', 'Farseek', 'Riveteers Charm', 'Sea Gate Oracle', 'Llanowar Wastes', 'Setessan Petitioner', 'Restless Bloodseeker', 'Summer Bloom', 'Grand Architect', 'Dovin Baan', 'Disfigure', 'Wild Mongrel', 'Sungold Sentinel', 'Justice Strike', 'Vivid Grove', 'Barren Moor', 'Glorious End', 'Gruul Turf', 'Ramunap Excavator', 'Sliver Queen', 'Choking Sands', 'Artisan of Kozilek', 'Underworld Connections', 'Enigma Sphinx', 'Explore', 'Myth Realized', 'Kodama''s Reach', 'Gaea''s Will', 'Path to the World Tree', 'Runed Halo', 'Heartless Act', 'Vault of the Archangel', 'Dragonkin Berserker', 'Sprite Dragon', 'Mystifying Maze', 'Martyr of Sands', 'Thornglint Bridge', 'Brokers Charm', 'Conclave Mentor', 'Rishkar, Peema Renegade', 'Judith, the Scourge Diva', 'Coalition Relic', 'Future Sight', 'Desert Cerodon', 'Sire of Stagnation', 'Promise of Bunrei', 'Easy Prey', 'Palace Siege', 'Dimir Signet', 'Terastodon', 'Castigate', 'Aven Squire', 'Ugin''s Conjurant', 'Edgewall Innkeeper', 'Ash Zealot', 'Repeal', 'Mystic Monastery', 'Knight of the Reliquary', 'Mirror March', 'Lightning Rift', 'Deep Forest Hermit', 'Commit // Memory', 'Doom Foretold', 'Gideon''s Lawkeeper', 'Harbinger of the Tides', 'Vivid Marsh', 'Blade Splicer', 'Reflex Sliver', 'Hero of Precinct One', 'Bala Ged Recovery', 'Stern Dismissal', 'Rootbound Crag', 'Lantern of the Lost', 'Ritual of Soot', 'Avatar of Discord', 'Spikefield Hazard', 'Call of the Conclave', 'Genesis Wave', 'Soulherder', 'Mistveil Plains', 'Canyon Slough', 'Raze the Effigy', 'Nivmagus Elemental', 'Temple of Malady', 'Sultai Charm', 'Erebos''s Intervention', 'Kitchen Imp', 'Tooth and Nail', 'Otherworldly Gaze', 'Dismal Backwater', 'Brain Freeze', 'Wonder', 'Stirring Wildwood', 'Ethersworn Sphinx', 'Cathartic Reunion', 'Irencrag Pyromancer', 'Bedlam Reveler', 'Bloodbraid Elf', 'Detention Sphere', 'Wandering Mind', 'Prophetic Prism', 'Shalai, Voice of Plenty', 'It That Betrays', 'Crumbling Necropolis', 'Vapor Snag', 'Saw It Coming', 'Homing Sliver', 'Tendo Ice Bridge', 'Centaur Garden', 'Korlash, Heir to Blackblade', 'Mizzium Mortars', 'Zhur-Taa Goblin', 'Grisly Salvage', 'Dream Leash', 'Champion of the Parish', 'Decree of Justice', 'Tyrant of Discord', 'Mausoleum Secrets', 'Radha, Heart of Keld', 'Sandsteppe Citadel', 'Sarkhan the Masterless', 'Doomed Traveler', 'Extractor Demon', 'Ulamog''s Nullifier', 'Rosethorn Acolyte', 'Tireless Provisioner', 'Stubborn Denial', 'Rootwater Depths', 'Lodestone Golem', 'Fling', 'Wasteland Strangler', 'Mindslaver', 'Caves of Koilos', 'Sign in Blood', 'Rune-Scarred Demon', 'Merrow Reejerey', 'Flame Javelin', 'Oblivion Ring', 'Secluded Steppe', 'Hour of Promise', 'Doomskar Titan', 'Might Sliver', 'Imposing Vantasaur', 'Ob Nixilis, the Fallen', 'Haunted Fengraf', 'River Serpent', 'Lashwrithe', 'Arcbound Ravager', 'Pyrrhic Revival', 'Bogardan Hellkite', 'Far // Away', 'Psychic Spiral', 'Judge''s Familiar', 'Anafenza, Kin-Tree Spirit', 'Cryptic Caves', 'Tyrant''s Choice', 'Cathartic Pyre', 'Temple of Silence', 'Qasali Pridemage', 'Buried Alive', 'Sylvan Scrying', 'Izzet Boilerworks', 'Skyclave Cleric', 'Barbarian Ring', 'Archaeomancer', 'Porphyry Nodes', 'Silverblade Paladin', 'Frenetic Sliver', 'Arrogant Wurm', 'Goblin Electromancer', 'Opt', 'Dread Presence', 'Mirrodin''s Core', 'Fieldmist Borderpost', 'Logic Knot', 'Treasure Cruise', 'Dread Return', 'Trickbind', 'Ethersworn Canonist', 'Vivid Crag', 'Springbloom Druid', 'Voidslime', 'Bone Shards', 'Fire-Lit Thicket', 'Stone Rain', 'Iron Apprentice', 'Ponder', 'Geomancer''s Gambit', 'Knight of the White Orchid', 'Gargoyle Castle', 'Grave Scrabbler', 'Dreg Mangler', 'Bile Blight', 'Dragonstorm', 'First-Sphere Gargantua', 'Silverbluff Bridge', 'Captain of the Watch', 'Timely Reinforcements', 'Cloudshift', 'Stormtide Leviathan', 'Hive Mind', 'Demonic Dread', 'Urza''s Factory', 'Esper Charm', 'Sygg, River Cutthroat', 'Gods Willing', 'Arbor Elf', 'Mask of the Mimic', 'Silundi Vision', 'Unesh, Criosphinx Sovereign', 'Cloudpost', 'Temple of Epiphany', 'Hieroglyphic Illumination', 'All Suns'' Dawn', 'Fungus Sliver', 'Improbable Alliance', 'Ghostfire Blade', 'Basking Rootwalla', 'Dawn of Hope', 'Vryn Wingmare', 'General Ferrous Rokiric', 'Vampire''s Kiss', 'Timeless Witness', 'Feed the Swarm', 'Drowned Catacomb', 'Shatterskull Charger', 'Keruga, the Macrosage', 'Homestead Courage', 'Elemental Bond', 'Benalish Marshal', 'Snowfield Sinkhole', 'Arch of Orazca', 'Psychatog', 'Akroma''s Memorial', 'Metalwork Colossus', 'Terminus', 'Faerie Vandal', 'Realm Razer', 'Selesnya Sanctuary', 'Corrupted Crossroads', 'Wild Nacatl', 'Chance Encounter', 'Mesmeric Fiend', 'River''s Rebuke', 'Arcus Acolyte', 'Spirited Companion', 'Needle Spires', 'Bastion of Remembrance', 'Master Splicer', 'Mishra''s Factory', 'Empty the Warrens', 'Honored Hydra', 'Temple of Deceit', 'Strike It Rich', 'Scrapheap Scrounger', 'Reality Ripple', 'Thoughtpicker Witch', 'Leatherback Baloth', 'Witch''s Cottage', 'Lava Dart', 'Scab-Clan Berserker', 'Vital Splicer', 'Mirran Crusader', 'Forbid', 'Fire Covenant', 'Monstrous Carabid', 'Hymn to Tourach', 'Obscura Storefront', 'Tectonic Reformation', 'Horror of the Broken Lands', 'Bump in the Night', 'Dauntless Bodyguard', 'Wooded Bastion', 'Cosima, God of the Voyage', 'Zenith Flare', 'Panharmonicon', 'Evolving Wilds', 'Gonti, Lord of Luxury', 'Blacklance Paragon', 'Gilded Lotus', 'Grapeshot', 'Arcbound Javelineer', 'Diffusion Sliver', 'Vivid Creek', 'Harrow', 'Lose Focus', 'Throes of Chaos', 'Temur Charm', 'Flourishing Fox', 'Ancestral Anger', 'Sylvan Advocate', 'Abiding Grace', 'Bloodbraid Marauder', 'Slitherhead', 'Elder Deep-Fiend', 'Ionize', 'Frontier Bivouac', 'Approach of the Second Sun', 'Frantic Inventory', 'Knight of Infamy', 'Snow-Covered Swamp', 'Wrath of God', 'Raging Ravine', 'Asylum Visitor', 'Chromatic Lantern', 'Nyx Lotus', 'Sky Hussar', 'Varragoth, Bloodsky Sire', 'Rotting Rats', 'Hypnotic Specter', 'Frantic Search', 'Living Twister', 'Kabira Takedown', 'Tymaret, Chosen from Death', 'Brimstone Dragon', 'Brainstone', 'Kolvori, God of Kinship', 'Dryad Militant', 'Temple of Abandon', 'Tithe Taker', 'Primal Surge', 'Sleight of Hand', 'Kathari Remnant', 'Pillage', 'Riftwing Cloudskate', 'Sejiri Steppe', 'Desecration Demon', 'Ground Rift', 'Savage Lands', 'Gavony Township', 'Ornithopter', 'Fiend Hunter', 'Tempest Djinn', 'Terramorphic Expanse', 'Skemfar Avenger', 'Drannith Healer', 'Ranger of Eos', 'Battlefield Forge', 'Animate Dead', 'Putrid Imp', 'Abrade', 'Scythe Leopard', 'Chief Engineer', 'Talrand, Sky Summoner', 'Murmuring Mystic', 'Masterful Replication', 'Malakir Blood-Priest', 'Alchemist''s Gambit', 'Galerider Sliver', 'Sphinx of Foresight', 'Kazuul''s Fury', 'Waterfront District', 'Nicol Bolas, Planeswalker', 'Suspend', 'Demigod of Revenge', 'Jokulhaups', 'Drannith Stinger', 'Consume the Meek', 'Think Twice', 'Underworld Dreams', 'Forgotten Cave', 'Unravel the Aether', 'Viashino Pyromancer', 'Slagstorm', 'Lonely Sandbar', 'Hour of Reckoning', 'Mirrorshell Crab', 'Illuminator Virtuoso', 'Cabaretti Courtyard', 'Weathered Wayfarer', 'Secluded Courtyard', 'Search for Tomorrow', 'Vilis, Broker of Blood', 'Growth-Chamber Guardian', 'Spark Spray', 'Unlucky Witness', 'Platinum Angel', 'Agonizing Remorse', 'Discovery // Dispersal', 'Avatar of Woe', 'Conduit of Ruin', 'Emmara, Soul of the Accord', 'Karametra''s Acolyte', 'Ancient Stirrings', 'Field of Ruin', 'Flame Slash', 'Simic Charm', 'Krark''s Thumb', 'Touch the Spirit Realm', 'Memory Lapse', 'Riveteers Overlook', 'Good-Fortune Unicorn', 'Bloodchief''s Thirst', 'Darigaaz Reincarnated', 'Akrasan Squire', 'Jace, the Living Guildpact', 'Goldmire Bridge', 'Declaration in Stone', 'Celestial Kirin', 'Tempered in Solitude', 'Waterveil Cavern', 'Distended Mindbender', 'Reverent Hunter', 'Deadshot Minotaur', 'Phyrexian Dreadnought', 'Skyclave Pick-Axe', 'Chain Lightning', 'Yorvo, Lord of Garenbrig', 'The Mending of Dominaria', 'Talisman of Impulse', 'Selesnya Charm', 'Day of Judgment', 'Orzhov Signet', 'Twisted Abomination', 'Verdant Command', 'Mistvault Bridge', 'Arcane Sanctum', 'Knight of Glory', 'Reap the Past', 'Throne of Geth', 'Gemhide Sliver', 'Spawning Pool', 'Falkenrath Gorger', 'Pathrazer of Ulamog', 'Cloudthresher', 'Arguel''s Blood Fast', 'Jwari Disruption', 'Virulent Sliver', 'Temple of Malice', 'Obscura Charm', 'Dire Fleet Daredevil'))) 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, 103.9, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (116.0 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Wooded Bastion', 'Firewild Borderpost', 'Ghostfire Blade', 'Eiganjo Castle', 'Iron Apprentice', 'Stormblood Berserker', 'Sensor Splicer', 'Might Sliver', 'Seismic Assault', 'Mobilized District', 'Conclave Mentor', 'Sphinx of the Steel Wind', 'Birds of Paradise', 'Improbable Alliance', 'Doom Foretold', 'Monstrous Carabid', 'Sylvan Advocate', 'Hymn to Tourach', 'Dimir Signet', 'Selesnya Charm', 'Erayo, Soratami Ascendant', 'Watcher for Tomorrow', 'Colossal Skyturtle', 'Shardless Agent', 'Sharuum the Hegemon', 'Grave Scrabbler', 'Promise of Bunrei', 'Twinshot Sniper', 'Goldmire Bridge', 'Crackling Drake', 'Distended Mindbender', 'Psychic Spiral', 'Sigil of Valor', 'Path to the World Tree', 'Scab-Clan Berserker', 'Arcbound Mouser', 'Soul Spike', 'Garruk Wildspeaker', 'Mission Briefing', 'Master of the Pearl Trident', 'Mirror March', 'Elixir of Immortality', 'Drannith Stinger', 'Mistveil Plains', 'Chromatic Lantern', 'Gods Willing', 'Realm Razer', 'Wonder', 'Darkheart Sliver', 'Fiend Hunter', 'Sarkhan the Masterless', 'Vivid Marsh', 'Gideon Jura', 'Reflex Sliver', 'Thawing Glaciers', 'Ash Zealot', 'Thirst for Discovery', 'Savage Lands', 'Behold the Multiverse', 'Buried Alive', 'Rootborn Defenses', 'Feed the Swarm', 'Tanglepool Bridge', 'See the Truth', 'Scrapheap Scrounger', 'Rishkar, Peema Renegade', 'Reliquary Tower', 'Decree of Justice', 'Shriekmaw', 'Invoke Calamity', 'Fact or Fiction', 'Heartless Act', 'Hive Stirrings', 'Tyrant''s Scorn', 'First-Sphere Gargantua', 'Talrand, Sky Summoner', 'Caves of Koilos', 'Resurgent Belief', 'Vampire Nighthawk', 'Yorvo, Lord of Garenbrig', 'March of Reckless Joy', 'Izzet Boilerworks', 'Bloodline Keeper', 'Arcbound Javelineer', 'Martyr of Sands', 'Woodland Cemetery', 'Pathrazer of Ulamog', 'Pyxis of Pandemonium', 'Firespout', 'Stromkirk Noble', 'Merrow Reejerey', 'Oracle of Mul Daya', 'Grand Architect', 'Agonizing Remorse', 'Arcus Acolyte', 'Slagstorm', 'Dead // Gone', 'Avatar of Woe', 'Kitchen Imp', 'Temple of Deceit', 'Day of Judgment', 'Rite of Oblivion', 'Arch of Orazca', 'Bile Blight', 'Springbloom Druid', 'The Mending of Dominaria', 'Cabal Initiate', 'Vivid Grove', 'Shalai, Voice of Plenty', 'Dauntless Escort', 'Runed Halo', 'Approach of the Second Sun', 'Death Cultist', 'Vital Splicer', 'Lochmere Serpent', 'Mouth of Ronom', 'Frontier Bivouac', 'Thirst for Knowledge', 'Secluded Courtyard', 'Indulgent Aristocrat', 'Ramunap Excavator', 'Slip Out the Back', 'Urza''s Factory', 'Coralhelm Commander', 'Skull Prophet', 'Moritte of the Frost', 'The Bloodsky Massacre', 'Sovereign''s Bite', 'Sword-Point Diplomacy', 'Virulent Sliver', 'Deep Forest Hermit', 'Eternal Dragon', 'Kazandu Mammoth', 'Hissing Quagmire', 'Grisly Salvage', 'Bogardan Hellkite', 'Heartless Summoning', 'Ghost Quarter', 'Tymaret, Chosen from Death', 'Memory Lapse', 'Arrogant Wurm', 'General Ferrous Rokiric', 'Good-Fortune Unicorn', 'Thought Scour', 'Duress', 'Dregscape Sliver', 'Vivid Creek', 'Timeless Witness', 'Flame Javelin', 'Jace Beleren', 'Haunted Fengraf', 'Artisan of Kozilek', 'Sylvan Library', 'Tooth and Nail', 'Vapor Snag', 'Phantasmagorian', 'Coiling Oracle', 'Mishra''s Factory', 'Falkenrath Gorger', 'Burning of Xinye', 'Hieroglyphic Illumination', 'Falkenrath Aristocrat', 'It That Betrays', 'Temple of Enlightenment', 'Lava Dart', 'Abundant Harvest', 'Neutralize', 'Platinum Angel', 'Swans of Bryn Argoll', 'Sandsteppe Citadel', 'Gemhide Sliver', 'Dryad Militant', 'Slagwoods Bridge', 'Summer Bloom', 'Mirrodin Besieged', 'Farseek', 'Dormant Sliver', 'Spawning Pool', 'Stone Rain', 'Galerider Sliver', 'Asylum Visitor', 'Mask of the Mimic', 'Qasali Pridemage', 'Steel Overseer', 'Kjeldoran Outpost', 'Masterful Replication', 'Mephidross Vampire', 'Kumano Faces Kakkazan', 'Glacial Fortress', 'Dovin Baan', 'Old Stickfingers', 'Secluded Steppe', 'Detention Sphere', 'River Serpent', 'Ranger of Eos', 'Sign in Blood', 'Tectonic Reformation', 'Glorious End', 'Varragoth, Bloodsky Sire', 'Explore', 'Celestial Kirin', 'Hero of Precinct One', 'Discovery // Dispersal', 'Blackmail', 'Spirited Companion', 'Dreg Mangler', 'Swarm Shambler', 'Skyclave Shade', 'Ponder', 'Choking Sands', 'Heliod''s Pilgrim', 'Maul of the Skyclaves', 'Honor of the Pure', 'Skyclave Cleric', 'Suspend', 'Dizzy Spell', 'Tectonic Giant', 'Gruul Turf', 'Reckless Impulse', 'Glimpse of Tomorrow', 'Vedalken Shackles', 'Memory Leak', 'Dream Leash', 'Fungus Sliver', 'Mire Triton', 'Faithful Mending', 'Jace, the Living Guildpact', 'Hinterland Harbor', 'Gaea''s Will', 'Unburial Rites', 'Squadron Hawk', 'Coalition Relic', 'Snapback', 'Into the Roil', 'Living Twister', 'Bone Shards', 'Glimmerpost', 'Horror of the Broken Lands', 'Azorius Charm', 'Oust', 'Setessan Petitioner', 'Search for Tomorrow', 'Splendor Mare', 'Arcbound Ravager', 'Fling', 'Orchard Strider', 'Drossforge Bridge', 'Desert Cerodon', 'Battle Screech', 'Wayward Guide-Beast', 'Drowned Catacomb', 'Sea Gate Oracle', 'Go for Blood', 'Scythe Leopard', 'Cloudshift', 'Renewed Faith', 'Doomskar Titan', 'Master Splicer', 'Akrasan Squire', 'Annex', 'Saw It Coming', 'Condemn', 'Magister of Worth', 'Glorybringer', 'Cryptic Caves', 'Cursecatcher', 'Harbinger of the Tides', 'Cathar Commando', 'Mirrorshell Crab', 'Llanowar Elves', 'Dawn of Hope', 'Demigod of Revenge', 'Dire Fleet Daredevil', 'Tormod''s Cryptkeeper', 'Centaur Garden', 'Consume the Meek', 'Satyr Wayfinder', 'White Sun''s Zenith', 'Sleeper Agent', 'Ornithopter', 'Vampire''s Kiss', 'Thaumatic Compass', 'Temur Charm', 'Deep Analysis', 'Bontu''s Last Reckoning', 'Rune-Scarred Demon', 'Wild Cantor', 'Ugin''s Conjurant', 'Blacklance Paragon', 'Sinister Concoction', 'Flood Plain', 'Hive Mind', 'Declaration in Stone', 'Pillage', 'Mana Leak', 'Brain Freeze', 'Rustvale Bridge', 'Rootbound Crag', 'Metalwork Colossus', 'Greater Gargadon', 'Elder Deep-Fiend', 'Proclamation of Rebirth', 'Battlefield Forge', 'Torrent Sculptor', 'Nature''s Lore', 'Silundi Vision', 'Fauna Shaman', 'Twinflame', 'Nemesis of Mortals', 'Eldrazi Mimic', 'Wandering Mind', 'Snowfield Sinkhole', 'Treasure Hunt', 'Gitaxian Probe', 'Tempest Djinn', 'Power Depot', 'Sleight of Hand', 'Thraben Inspector', 'Terastodon', 'Temple of Malady', 'Stubborn Denial', 'Stern Dismissal', 'Stormtide Leviathan', 'Empty the Warrens', 'Mizzium Skin', 'Myr Superion', 'Champion of the Parish', 'Phyrexian Dreadnought', 'Collective Effort', 'Vivid Meadow', 'Flourishing Fox', 'Goblin Dark-Dwellers', 'Mind''s Desire', 'Erebos''s Intervention', 'Abiding Grace', 'Mistvein Borderpost', 'Brave the Elements', 'Commit // Memory', 'Zabaz, the Glimmerwasp', 'Oblivion Ring', 'Captivating Vampire', 'Reverent Hunter', 'Aven Squire', 'Lavaclaw Reaches', 'Animate Dead', 'Terminus', 'Lumbering Falls', 'Far // Away', 'Throes of Chaos', 'Mirran Crusader', 'Lone Rider', 'Cruel Bargain', 'Shatterskull Charger', 'Sylvan Scrying', 'Mystic Monastery', 'Raze the Effigy', 'Kiln Fiend', 'Brainstone', 'Sygg, River Cutthroat', 'Restore Balance', 'Archaeomancer', 'Arguel''s Blood Fast', 'Doomed Traveler', 'Dream Trawler', 'Lonely Sandbar', 'Hour of Promise', 'Kodama''s Reach', 'Snow-Covered Swamp', 'Captain of the Watch', 'Slaughter Pact', 'Avatar of Discord', 'Repeal', 'Desperate Ritual', 'Ionize', 'Putrid Imp', 'Intangible Virtue', 'Dismal Backwater', 'Mindslaver', 'Sundial of the Infinite', 'Elves of Deep Shadow', 'Champion of Wits', 'Dauntless Bodyguard', 'Esper Charm', 'Irencrag Feat', 'Bear''s Companion', 'Voidslime', 'Silverbluff Bridge', 'Snow-Covered Plains', 'Zulaport Cutthroat', 'Ancestral Anger', 'Memorial to Glory', 'Burst Lightning', 'Dark Ritual', 'Omen of the Sun', 'Silent Submersible', 'Homing Sliver', 'Throne of Geth', 'Cordial Vampire', 'Vampire of the Dire Moon', 'Maestros Charm', 'Riveteers Charm', 'Temple of Abandon', 'Basking Rootwalla', 'Cabal Therapist', 'Okiba Reckoner Raid', 'Hypergenesis', 'Unesh, Criosphinx Sovereign', 'Sky Hussar', 'Chance Encounter', 'Razortide Bridge', 'Nivmagus Elemental', 'Treacherous Blessing', 'Korlash, Heir to Blackblade', 'Wrath of God', 'Orzhov Signet', 'Rishadan Dockhand', 'Animation Module', 'Frantic Inventory', 'Maestros Theater', 'Growth-Chamber Guardian', 'Akoum Hellhound', 'Zombie Infestation', 'Knight of the Reliquary', 'Hollowhead Sliver', 'Boon of the Wish-Giver', 'Judge''s Familiar', 'Lavabelly Sliver', 'Bloodtithe Harvester', 'Temple of Silence', 'Forbid', 'Palace Siege', 'Reap the Past', 'Cruel Ultimatum', 'Lose Focus', 'Stirring Wildwood', 'Think Twice', 'Flame Rift', 'Reckless Waif', 'Healer''s Hawk', 'Gatekeeper of Malakir', 'Skyclave Pick-Axe', 'Giant Killer', 'Planar Bridge', 'Pyrrhic Revival', 'Knight of Glory', 'Elvish Mystic', 'Triskelion', 'Mythos of Brokkos', 'Mistvault Bridge', 'Confiscate', 'Bedlam Reveler', 'Tyrant of Discord', 'Frantic Search', 'Arcane Sanctum', 'Wild Mongrel', 'Genesis Wave', 'Tendrils of Agony', 'Spikefield Hazard', 'Sprite Dragon', 'Moorland Haunt', 'Disfigure', 'Myth Realized', 'Flame Slash', 'Murmuring Mystic', 'Cloudpost', 'Primal Surge', 'Hostage Taker', 'Fire-Lit Thicket', 'Bloodbraid Elf', 'Silvergill Adept', 'Reality Ripple', 'Ancient Stirrings', 'Village Messenger', 'Lashwrithe', 'Future Sight', 'Fieldmist Borderpost', 'Bala Ged Recovery', 'Nyx Lotus', 'Lotleth Troll', 'Elemental Masterpiece', 'Purphoros''s Intervention', 'Field of Ruin', 'Revitalize', 'Tireless Provisioner', 'Ajani, the Greathearted', 'An Offer You Can''t Refuse', 'Force of Rage', 'Temple of Epiphany', 'Vault of the Archangel', 'Forgotten Cave', 'Riftwing Cloudskate', 'Opt', 'Justice Strike', 'Honored Hydra', 'Strike It Rich', 'Raven''s Crime', 'Kathari Remnant', 'Inevitable Betrayal', 'Restoration Angel', 'Brokers Hideout', 'Unlucky Witness', 'Gargoyle Castle', 'Venom Sliver', 'Llanowar Wastes', 'Kazuul''s Fury', 'Signal Pest', 'Brokers Charm', 'Sliver Queen', 'Primal Command', 'Hagra Mauling', 'Temple of Malice', 'Cleansing Wildfire', 'Dread Presence', 'Oona, Queen of the Fae', 'Thassa''s Intervention', 'Ethersworn Sphinx', 'Demonic Dread', 'Avacyn''s Pilgrim', 'Nested Shambler', 'Curious Pair', 'Vilis, Broker of Blood', 'Spark Spray', 'Knight of the White Orchid', 'Irencrag Pyromancer', 'Enigma Sphinx', 'Mausoleum Secrets', 'Vryn Wingmare', 'Witch''s Cottage', 'Cosima, God of the Voyage', 'Sea Gate Wreckage', 'Teferi, Mage of Zhalfir', 'Mesmeric Fiend', 'Dragonkin Berserker', 'All Suns'' Dawn', 'Canyon Slough', 'Tendo Ice Bridge', 'Talisman of Impulse', 'Barren Moor', 'Cultivate', 'Timely Reinforcements', 'Alchemist''s Gambit', 'Wasteland Strangler', 'Mystifying Maze', 'Homestead Courage', 'Castigate', 'Snow-Covered Mountain', 'Sultai Charm', 'Mystic Snake', 'Changeling Outcast', 'Infernal Grasp', 'Darigaaz Reincarnated', 'Panharmonicon', 'Waterveil Cavern', 'Selesnya Sanctuary', 'Conduit of Ruin', 'Needle Spires', 'Plated Geopede', 'Grimdancer', 'Ghoultree', 'Buried Ruin', 'Tide Shaper', 'Cabaretti Courtyard', 'Riveteers Overlook', 'Lodestone Golem', 'Izzet Charm', 'Lurching Rotbeast', 'Bump in the Night', 'Otherworldly Gaze', 'Goblin Electromancer', 'Merchant of the Vale', 'Abrade', 'Flayer of the Hatebound', 'Cormela, Glamour Thief', 'Grapeshot', 'Malakir Blood-Priest', 'Viashino Pyromancer', 'Orcish Lumberjack', 'Edgewall Innkeeper', 'Obscura Charm', 'Smallpox', 'Pyretic Ritual', 'Soulherder', 'Aspect of Hydra', 'Touch the Spirit Realm', 'Illuminator Virtuoso', 'Prophetic Prism', 'Judith, the Scourge Diva', 'Orim''s Chant', 'Cartographer''s Survey', 'Kird Ape', 'Goblin Bombardment', 'Arcbound Worker', 'Veinfire Borderpost', 'Wall of Omens', 'Archetype of Endurance', 'Tyrant''s Choice', 'Crypt of Agadeem', 'Ulamog''s Nullifier', 'Delver of Secrets', 'Wild Nacatl', 'Ob Nixilis, the Fallen', 'Hypnotic Specter', 'Silverblade Paladin', 'Den Protector', 'Nicol Bolas, Planeswalker', 'Lantern of the Lost', 'Zhur-Taa Goblin', 'Abbot of Keral Keep', 'Thought Erasure', 'Sphinx of Foresight', 'Dread Return', 'Zenith Flare', 'Jwari Disruption', 'Game Trail', 'Circle of Confinement', 'Advent of the Wurm', 'Shredded Sails', 'Logic Knot', 'Slitherhead', 'Fire Covenant', 'Chain Lightning', 'Cloudthresher', 'Extractor Demon', 'Tidespout Tyrant', 'Faerie Vandal', 'Deadshot Minotaur', 'Tempered in Solitude', 'Evolving Wilds', 'Cathartic Reunion', 'Lightning Rift', 'Desecration Demon', 'Midnight Reaper', 'Kolvori, God of Kinship', 'Zetalpa, Primal Dawn', 'Trickbind', 'Obscura Storefront', 'Dragonskull Summit', 'Bearer of Silence', 'Raging Ravine', 'Harrow', 'Piranha Marsh', 'Corrupted Crossroads', 'Angel of Sanctions', 'Underworld Connections', 'Ground Rift', 'Drannith Healer', 'Ghitu Encampment', 'Mirrodin''s Core', 'Hythonia the Cruel', 'Radha, Heart of Keld', 'Chancellor of the Dross', 'Elvish Visionary', 'Snow-Covered Forest', 'Duskwielder', 'Blade Splicer', 'Diffusion Sliver', 'Restless Bloodseeker', 'Auramancer', 'Patchwork Automaton', 'Mythos of Nethroi', 'Thornglint Bridge', 'Okina, Temple to the Grandfathers', 'Gideon''s Lawkeeper', 'Easy Prey', 'Sungold Sentinel', 'Glowspore Shaman', 'Ritual of Soot', 'Leatherback Baloth', 'Frenetic Sliver', 'Avaricious Dragon', 'Akroma''s Memorial', 'Imposing Vantasaur', 'Obstinate Baloth', 'Painful Truths', 'Form of the Dragon', 'Karametra''s Acolyte', 'Clifftop Retreat', 'Bastion of Remembrance', 'Twisted Abomination', 'Captured Sunlight', 'The Underworld Cookbook', 'Cathartic Pyre', 'Kami of False Hope', 'Steppe Lynx', 'Izzet Signet', 'Arbor Elf', 'Sejiri Steppe', 'Fabricate', 'Keruga, the Macrosage', 'Thoughtpicker Witch', 'Sire of Stagnation', 'Geomancer''s Gambit', 'Vivid Crag', 'Crumbling Necropolis', 'Westvale Abbey', 'Waterfront District', 'Anafenza, Kin-Tree Spirit', 'Temple of Mystery', 'Rootwater Depths', 'Predator Ooze', 'Psychatog', 'Dragonstorm', 'Electrolyze', 'Rotting Rats', 'Dakmor Salvage', 'Undead Butler', 'Brimstone Dragon', 'Sarulf, Realm Eater', 'Emmara, Soul of the Accord', 'Krark''s Thumb', 'Seething Song', 'Chandra, Pyromaster', 'Benalish Marshal', 'Bloodbraid Marauder', 'Noose Constrictor', 'Skemfar Avenger', 'Jokulhaups', 'Outland Liberator', 'Tithe Taker', 'Underworld Dreams', 'Nylea''s Presence', 'Mwonvuli Acid-Moss', 'Yahenni''s Expertise', 'Cosmos Elixir', 'Seasoned Hallowblade', 'Fertile Ground', 'Mizzium Mortars', 'Barbarian Ring', 'Sire of Insanity', 'Benevolent Bodyguard', 'Foreboding Ruins', 'Chief Engineer', 'Terramorphic Expanse', 'Braids, Cabal Minion', 'Circular Logic', 'Bonescythe Sliver', 'Master of Death', 'Bloodchief''s Thirst', 'Nezahal, Primal Tide', 'Netherborn Phalanx', 'Llanowar Tribe', 'Duty-Bound Dead', 'Unravel the Aether', 'Disenchant', 'The Birth of Meletis', 'Simic Charm', 'Vampire Cutthroat', 'Sunscorched Desert', 'Possibility Storm', 'Vindicate', 'Knight of Infamy', 'Hour of Reckoning', 'Raise the Alarm', 'Kabira Takedown', 'Psychic Strike', 'Verdant Command', 'Elemental Bond', 'Dread Fugue', 'Spell Pierce', 'Gonti, Lord of Luxury', 'Ghostly Flicker', 'Gavony Township', 'Tempered Sliver', 'Gilded Lotus', 'Treasure Cruise', 'Weathered Wayfarer', 'Call of the Conclave', 'Rosethorn Acolyte', 'Diabolic Edict', 'Ravenous Chupacabra', 'Wildfield Borderpost', 'River''s Rebuke', 'Ethersworn Canonist', 'Glen Elendra Archmage', 'Ojutai''s Command', 'Porphyry Nodes', 'Intervention Pact', 'Brushfire Elemental', 'Kaya, Ghost Assassin'))) 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, 116.0, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (87.4 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Smallpox', 'Strike It Rich', 'Iron Apprentice', 'Kumano Faces Kakkazan', 'Zhur-Taa Goblin', 'Mirrodin''s Core', 'Arcane Sanctum', 'Oona, Queen of the Fae', 'Dark Ritual', 'The Mending of Dominaria', 'Hive Stirrings', 'Ponder', 'Goldmire Bridge', 'Akroma''s Memorial', 'Benevolent Bodyguard', 'Rishkar, Peema Renegade', 'Ash Zealot', 'Celestial Kirin', 'Heartless Act', 'Cosmos Elixir', 'Ghitu Encampment', 'Mask of the Mimic', 'Tireless Provisioner', 'Hypergenesis', 'Temple of Malady', 'Cursecatcher', 'Dismal Backwater', 'Edgewall Innkeeper', 'Nemesis of Mortals', 'Lava Dart', 'Skemfar Avenger', 'Improbable Alliance', 'Karametra''s Acolyte', 'Stirring Wildwood', 'Corrupted Crossroads', 'Urza''s Factory', 'Revitalize', 'Snow-Covered Mountain', 'Bloodbraid Marauder', 'Shriekmaw', 'Extractor Demon', 'Memorial to Glory', 'Scab-Clan Berserker', 'Azorius Charm', 'Twinflame', 'The Birth of Meletis', 'Fungus Sliver', 'Watcher for Tomorrow', 'Kazuul''s Fury', 'Elixir of Immortality', 'Electrolyze', 'Silverbluff Bridge', 'Drowned Catacomb', 'Treasure Cruise', 'Drannith Healer', 'Call of the Conclave', 'Rootwater Depths', 'Tendrils of Agony', 'Delver of Secrets', 'Signal Pest', 'Kaya, Ghost Assassin', 'Captivating Vampire', 'Hythonia the Cruel', 'Fire Covenant', 'Treacherous Blessing', 'Mission Briefing', 'Gemhide Sliver', 'Restless Bloodseeker', 'Arcbound Javelineer', 'Boon of the Wish-Giver', 'Ground Rift', 'Sleeper Agent', 'Hour of Reckoning', 'Snow-Covered Forest', 'Master of the Pearl Trident', 'Kathari Remnant', 'Riveteers Overlook', 'Dovin Baan', 'Reflex Sliver', 'Cryptic Caves', 'Champion of Wits', 'Mindslaver', 'Verdant Command', 'Game Trail', 'Nicol Bolas, Planeswalker', 'Vivid Crag', 'Teferi, Mage of Zhalfir', 'Psychatog', 'Dread Return', 'Captured Sunlight', 'Detention Sphere', 'Rosethorn Acolyte', 'Elves of Deep Shadow', 'Heliod''s Pilgrim', 'Vryn Wingmare', 'Intervention Pact', 'Mirror March', 'Vindicate', 'Sire of Stagnation', 'Flood Plain', 'Noose Constrictor', 'Riftwing Cloudskate', 'Wandering Mind', 'Wonder', 'Precinct Captain', 'Dread Fugue', 'Virulent Sliver', 'Putrid Imp', 'Silverblade Paladin', 'It That Betrays', 'Palace Siege', 'Stubborn Denial', 'Haunted Fengraf', 'Tanglepool Bridge', 'Veinfire Borderpost', 'Simic Charm', 'Greater Gargadon', 'Arcbound Ravager', 'Sarkhan the Masterless', 'Oracle of Mul Daya', 'Asylum Visitor', 'Honor of the Pure', 'Pyrrhic Revival', 'Fact or Fiction', 'Glorious End', 'Flame Javelin', 'Avacyn''s Pilgrim', 'Sphinx of Foresight', 'Myth Realized', 'Obstinate Baloth', 'Ramunap Excavator', 'Conclave Mentor', 'Disfigure', 'Fabricate', 'Advent of the Wurm', 'Animation Module', 'Frenetic Sliver', 'Buried Alive', 'Brokers Charm', 'Hissing Quagmire', 'Mirrorweave', 'Temple of Mystery', 'Hive Mind', 'Otherworldly Gaze', 'Temur Charm', 'Vampire Cutthroat', 'Dream Leash', 'Fling', 'Barren Moor', 'Horror of the Broken Lands', 'Dragonstorm', 'White Sun''s Zenith', 'Deep Analysis', 'Reckless Waif', 'Zombie Infestation', 'The Bloodsky Massacre', 'Fertile Ground', 'Realm Razer', 'Healer''s Hawk', 'Vilis, Broker of Blood', 'Kird Ape', 'Brave the Elements', 'Reap the Past', 'Patchwork Automaton', 'Sylvan Library', 'Sungold Sentinel', 'Firewild Borderpost', 'Restore Balance', 'Nature''s Lore', 'Harbinger of the Tides', 'Foreboding Ruins', 'Skyclave Shade', 'Snapback', 'Platinum Angel', 'Chromatic Lantern', 'Temple of Epiphany', 'Elder Deep-Fiend', 'Lochmere Serpent', 'Steppe Lynx', 'Riveteers Charm', 'Duty-Bound Dead', 'Sygg, River Cutthroat', 'Moorland Haunt', 'Village Messenger', 'Waterveil Cavern', 'Terminus', 'Underworld Dreams', 'Wooded Bastion', 'Ravenous Chupacabra', 'Ornithopter', 'Wild Cantor', 'Mystifying Maze', 'Llanowar Tribe', 'Thoughtpicker Witch', 'Kiln Fiend', 'Desperate Ritual', 'Reliquary Tower', 'Ritual of Soot', 'Goblin Bombardment', 'Growth-Chamber Guardian', 'Kabira Takedown', 'Raven''s Crime', 'Oust', 'Decree of Justice', 'Nezahal, Primal Tide', 'Sigil of Valor', 'Lavaclaw Reaches', 'Wildfield Borderpost', 'Changeling Outcast', 'Seismic Assault', 'Hollowhead Sliver', 'Timeless Witness', 'Forgotten Cave', 'Savage Lands', 'Mephidross Vampire', 'Rune-Scarred Demon', 'Mausoleum Secrets', 'Akoum Hellhound', 'Justice Strike', 'Renewed Faith', 'Den Protector', 'Tidespout Tyrant', 'Fiend Hunter', 'Mouth of Ronom', 'Sliver Queen', 'Lavabelly Sliver', 'Ethersworn Canonist', 'Sign in Blood', 'Thaumatic Compass', 'Weathered Wayfarer', 'Skull Prophet', 'Erebos''s Intervention', 'Vital Splicer', 'Cultivate', 'Coralhelm Commander', 'Martyr of Sands', 'Needle Spires', 'Circle of Confinement', 'Chandra, Pyromaster', 'River Serpent', 'Burning of Xinye', 'Lurching Rotbeast', 'Ancient Stirrings', 'Arcbound Mouser', 'Tectonic Giant', 'Lose Focus', 'Mistveil Plains', 'Dormant Sliver', 'Shalai, Voice of Plenty', 'Setessan Petitioner', 'Bonescythe Sliver', 'Sunscorched Desert', 'Glimmerpost', 'Rishadan Dockhand', 'Cloudthresher', 'River''s Rebuke', 'Fieldmist Borderpost', 'Coiling Oracle', 'Might Sliver', 'Akrasan Squire', 'Porphyry Nodes', 'Angel of Sanctions', 'Slagwoods Bridge', 'Glen Elendra Archmage', 'Old Stickfingers', 'Kitchen Imp', 'Waterfront District', 'Easy Prey', 'Memory Lapse', 'Dregscape Sliver', 'Neutralize', 'Archaeomancer', 'Silundi Vision', 'Eiganjo Castle', 'Tithe Taker', 'Rootbound Crag', 'Kazandu Mammoth', 'Mirrorshell Crab', 'Phyrexian Dreadnought', 'Painful Truths', 'Duress', 'Raging Ravine', 'Glimpse of Tomorrow', 'Drannith Stinger', 'Spawning Pool', 'Timely Reinforcements', 'Gilded Lotus', 'Heartless Summoning', 'Doom Foretold', 'Temple of Abandon', 'Cathartic Pyre', 'Unesh, Criosphinx Sovereign', 'Talisman of Impulse', 'Wild Nacatl', 'Form of the Dragon', 'Nyx Lotus', 'Wall of Omens', 'Ghostly Flicker', 'Sphinx of the Steel Wind', 'Abiding Grace', 'Think Twice', 'Mystic Snake', 'Drossforge Bridge', 'Obscura Charm', 'Obscura Storefront', 'Demigod of Revenge', 'Vampire Nighthawk', 'Power Depot', 'Arcbound Worker', 'Brainstone', 'Crumbling Necropolis', 'Buried Ruin', 'Sylvan Advocate', 'Soulherder', 'Snowfield Sinkhole', 'Burst Lightning', 'Touch the Spirit Realm', 'Canyon Slough', 'See the Truth', 'Secluded Courtyard', 'Invoke Calamity', 'Sovereign''s Bite', 'Condemn', 'Cleansing Wildfire', 'Voidslime', 'Hero of Precinct One', 'Unravel the Aether', 'Unlucky Witness', 'Cormela, Glamour Thief', 'Knight of Infamy', 'Indulgent Aristocrat', 'Ulamog''s Nullifier', 'Orchard Strider', 'Forbid', 'Tymaret, Chosen from Death', 'Aspect of Hydra', 'Tempest Djinn', 'Spell Pierce', 'Slitherhead', 'Vault of the Archangel', 'Tormod''s Cryptkeeper', 'Bone Shards', 'Homestead Courage', 'Logic Knot', 'Vampire''s Kiss', 'Behold the Multiverse', 'Alchemist''s Gambit', 'Soul Spike', 'Maestros Charm', 'Mishra''s Factory', 'Choking Sands', 'Desert Cerodon', 'Ajani, the Greathearted', 'Runed Halo', 'Farseek', 'Bloodchief''s Thirst', 'Empty the Warrens', 'Cabal Initiate', 'Doomed Traveler', 'Cartographer''s Survey', 'Stormtide Leviathan', 'Orim''s Chant', 'Frantic Search', 'Ghoultree', 'Undead Butler', 'Bloodbraid Elf', 'Evolving Wilds', 'Underworld Connections', 'Knight of the Reliquary', 'Arrogant Wurm', 'Throes of Chaos', 'Spark Spray', 'Vampire of the Dire Moon', 'Thornglint Bridge', 'Benalish Marshal', 'Tendo Ice Bridge', 'Sea Gate Wreckage', 'Gideon''s Lawkeeper', 'Circular Logic', 'Wayward Guide-Beast', 'Okina, Temple to the Grandfathers', 'Search for Tomorrow', 'Force of Rage', 'Future Sight', 'Clifftop Retreat', 'Mizzium Skin', 'Grisly Salvage', 'Gaea''s Will', 'Diffusion Sliver', 'Possibility Storm', 'Shardless Agent', 'Grand Architect', 'Tyrant of Discord', 'Inevitable Betrayal', 'Merchant of the Vale', 'Bloodline Keeper', 'General Ferrous Rokiric', 'Cordial Vampire', 'Caves of Koilos', 'Nested Shambler', 'Falkenrath Aristocrat', 'Silent Submersible', 'Vedalken Shackles', 'Tooth and Nail', 'Reckless Impulse', 'Phantasmagorian', 'Abbot of Keral Keep', 'Mwonvuli Acid-Moss', 'Slaughter Pact', 'Good-Fortune Unicorn', 'Rite of Oblivion', 'Lashwrithe', 'Hieroglyphic Illumination', 'Masterful Replication', 'Silvergill Adept', 'Stone Rain', 'Artisan of Kozilek', 'Cathartic Reunion', 'Avatar of Discord', 'Thraben Inspector', 'Faithful Mending', 'Avatar of Woe', 'Merrow Reejerey', 'Torrent Sculptor', 'Terastodon', 'Rootborn Defenses', 'Chief Engineer', 'Enigma Sphinx', 'Netherborn Phalanx', 'Glowspore Shaman', 'Agonizing Remorse', 'Sea Gate Oracle', 'Treasure Hunt', 'Orcish Lumberjack', 'Plated Geopede', 'Repeal', 'Frantic Inventory', 'Vapor Snag', 'Cabaretti Courtyard', 'Pyxis of Pandemonium', 'Gavony Township', 'Ob Nixilis, the Fallen', 'Kolvori, God of Kinship', 'Emmara, Soul of the Accord', 'Vivid Grove', 'Murmuring Mystic', 'Frontier Bivouac', 'Archetype of Endurance', 'Sensor Splicer', 'Bogardan Hellkite', 'Annex', 'Unburial Rites', 'Dakmor Salvage', 'Sire of Insanity', 'Illuminator Virtuoso', 'Curious Pair', 'Talrand, Sky Summoner', 'Monstrous Carabid', 'Geomancer''s Gambit', 'Skyclave Cleric', 'Grimdancer', 'Approach of the Second Sun', 'Firespout', 'Panharmonicon', 'Bear''s Companion', 'Rustvale Bridge', 'Tempered Sliver', 'Darkheart Sliver', 'Zabaz, the Glimmerwasp', 'Thawing Glaciers', 'Flame Slash', 'Cabal Therapist', 'Primal Surge', 'Far // Away', 'Throne of Geth', 'Lightning Rift', 'Stromkirk Noble', 'Stern Dismissal', 'Garruk Wildspeaker', 'Tyrant''s Choice', 'Sinister Concoction', 'Hostage Taker', 'Krark''s Thumb', 'Avaricious Dragon', 'Lumbering Falls', 'Rotting Rats', 'Mesmeric Fiend', 'Resurgent Belief', 'Abrade', 'Wilt-Leaf Liege', 'Battle Screech', 'Mistvein Borderpost', 'Honored Hydra', 'Falkenrath Gorger', 'Springbloom Druid', 'Jokulhaups', 'Slagstorm', 'Crackling Drake', 'Summer Bloom', 'Flourishing Fox', 'Homing Sliver', 'Pyretic Ritual', 'Mythos of Brokkos', 'Birds of Paradise', 'Blackmail', 'Metalwork Colossus', 'Secluded Steppe', 'Vivid Meadow', 'Commit // Memory', 'Twinshot Sniper', 'Cruel Ultimatum', 'Blacklance Paragon', 'Raise the Alarm', 'Selesnya Sanctuary', 'Reverent Hunter', 'Elvish Mystic', 'Suspend', 'Gargoyle Castle', 'First-Sphere Gargantua', 'Cosima, God of the Voyage', 'Eternal Dragon', 'Castigate', 'Bedlam Reveler', 'Brushfire Elemental', 'Goblin Dark-Dwellers', 'Glacial Fortress', 'Harrow', 'Chancellor of the Dross', 'Lodestone Golem', 'Faerie Vandal', 'Dimir Signet', 'Lone Rider', 'Basking Rootwalla', 'Gruul Turf', 'Death Cultist', 'Sprite Dragon', 'Sultai Charm', 'Centaur Garden', 'Dawn of Hope', 'Dream Trawler', 'Arbor Elf', 'Radha, Heart of Keld', 'Sword-Point Diplomacy', 'Chance Encounter', 'Yorvo, Lord of Garenbrig', 'Hymn to Tourach', 'Psychic Spiral', 'Woodland Cemetery', 'Bala Ged Recovery', 'Coalition Relic', 'Mana Leak', 'Blade Splicer', 'Shredded Sails', 'Temple of Deceit', 'Ojutai''s Command', 'Ethersworn Sphinx', 'Flayer of the Hatebound', 'Wrath of God', 'Lonely Sandbar', 'Brokers Hideout', 'Thought Erasure', 'Grapeshot', 'Korlash, Heir to Blackblade', 'Oblivion Ring', 'Squadron Hawk', 'March of Reckless Joy', 'Zenith Flare', 'Twisted Abomination', 'Battlefield Forge', 'Venom Sliver', 'Cruel Bargain', 'Dreg Mangler', 'Snow-Covered Plains', 'Psychic Strike', 'Sarulf, Realm Eater', 'Gatekeeper of Malakir', 'Outland Liberator', 'Mirran Crusader', 'Braids, Cabal Minion', 'Kjeldoran Outpost', 'Cremate', 'Dizzy Spell', 'Brimstone Dragon', 'Bump in the Night', 'Izzet Boilerworks', 'Animate Dead', 'Primal Command', 'Dryad Militant', 'Mind''s Desire', 'Slip Out the Back', 'Eldrazi Mimic', 'Path to the World Tree', 'Sharuum the Hegemon', 'Trickbind', 'Cloudpost', 'Dragonskull Summit', 'Glorybringer', 'Elemental Masterpiece', 'Varragoth, Bloodsky Sire', 'Zetalpa, Primal Dawn', 'Barbarian Ring', 'Irencrag Pyromancer', 'Steel Overseer', 'Dread Presence', 'Jace, the Living Guildpact', 'Vivid Marsh', 'Okiba Reckoner Raid', 'Brain Freeze', 'Mire Triton', 'Into the Roil', 'Seething Song', 'Flame Rift', 'Zulaport Cutthroat', 'Ghost Quarter', 'Malakir Blood-Priest', 'Selesnya Charm', 'Splendor Mare', 'Skyclave Pick-Axe', 'Mystic Monastery', 'Dauntless Escort', 'Wild Mongrel', 'Conduit of Ruin', 'Judith, the Scourge Diva', 'Gideon Jura', 'Distended Mindbender', 'Tyrant''s Scorn', 'Ionize', 'Nylea''s Presence', 'Satyr Wayfinder', 'Llanowar Wastes', 'Temple of Enlightenment', 'Mirrodin Besieged', 'Discovery // Dispersal', 'Day of Judgment', 'The Underworld Cookbook', 'Desecration Demon', 'Cathar Commando', 'Midnight Reaper', 'Huatli, Warrior Poet', 'Mistvault Bridge', 'Swans of Bryn Argoll', 'Izzet Signet', 'Raze the Effigy', 'Swarm Shambler', 'Irencrag Feat', 'Pillage', 'Sky Hussar', 'Leatherback Baloth', 'Scythe Leopard', 'Chain Lightning', 'Terramorphic Expanse', 'Piranha Marsh', 'Lantern of the Lost', 'Light from Within', 'Maestros Theater', 'Tide Shaper', 'Consume the Meek', 'Keruga, the Macrosage', 'Duskwielder', 'Mobilized District', 'Tectonic Reformation', 'Gitaxian Probe', 'Cloudshift', 'Orzhov Signet', 'Sandsteppe Citadel', 'Arch of Orazca', 'Sylvan Scrying', 'Collective Effort', 'Kami of False Hope', 'Genesis Wave', 'Haazda Marshal', 'Master Splicer', 'Go for Blood', 'Omen of the Sun', 'Hagra Mauling', 'Ghostfire Blade', 'Triskelion', 'Crypt of Agadeem', 'Galerider Sliver', 'Dragonkin Berserker', 'Prophetic Prism', 'Imposing Vantasaur', 'Hypnotic Specter', 'Qasali Pridemage', 'Izzet Charm', 'Cruel Edict', 'Temple of Silence', 'Sleight of Hand', 'Thirst for Discovery', 'Elvish Visionary', 'Seasoned Hallowblade', 'Demonic Dread', 'Snow-Covered Swamp', 'Pathrazer of Ulamog', 'Dauntless Bodyguard', 'Erayo, Soratami Ascendant', 'Llanowar Elves', 'Lotleth Troll', 'Champion of the Parish', 'Sejiri Steppe', 'Maul of the Skyclaves', 'Declaration in Stone', 'Infernal Grasp', 'Fauna Shaman', 'Dead // Gone', 'Deep Forest Hermit', 'Knight of the White Orchid', 'Westvale Abbey', 'Knight of Glory', 'Hinterland Harbor', 'Captain of the Watch', 'Field of Ruin', 'Elemental Bond', 'Bloodtithe Harvester', 'All Suns'' Dawn', 'Gods Willing', 'Reality Ripple', 'Jwari Disruption', 'Thirst for Knowledge', 'Grave Scrabbler', 'Jace Beleren', 'Aven Squire', 'Blightning', 'Bontu''s Last Reckoning', 'Ranger of Eos', 'Memory Leak', 'Purphoros''s Intervention', 'Auramancer', 'Spirited Companion', 'Stormblood Berserker', 'Bastion of Remembrance', 'Esper Charm', 'Saw It Coming', 'Shatterskull Charger', 'Thought Scour', 'Disenchant', 'Mythos of Nethroi', 'Wasteland Strangler', 'Predator Ooze', 'Bearer of Silence', 'Giant Killer', 'Tempered in Solitude', 'Mizzium Mortars', 'Abundant Harvest', 'Yahenni''s Expertise', 'An Offer You Can''t Refuse', 'Myr Superion', 'Judge''s Familiar', 'Ugin''s Conjurant', 'Viashino Pyromancer', 'Restoration Angel', 'Goblin Electromancer', 'Magister of Worth', 'Living Twister', 'Hour of Promise', 'Spikefield Hazard', 'Feed the Swarm', 'Intangible Virtue', 'Proclamation of Rebirth', 'Deadshot Minotaur', 'Planar Bridge', 'Colossal Skyturtle', 'Doomskar Titan', 'Ancestral Anger', 'Razortide Bridge', 'Arcus Acolyte', 'Kodama''s Reach', 'Arguel''s Blood Fast', 'Darigaaz Reincarnated', 'Vivid Creek', 'Gonti, Lord of Luxury', 'Nivmagus Elemental', 'Dire Fleet Daredevil', 'Opt', 'Temple of Malice', 'Explore', 'Confiscate', 'Diabolic Edict', 'Scrapheap Scrounger', 'Thassa''s Intervention', 'Sundial of the Infinite', 'Bile Blight', 'Promise of Bunrei', 'Master of Death', 'Moritte of the Frost', 'Anafenza, Kin-Tree Spirit', 'Fire-Lit Thicket', 'Witch''s Cottage'))) 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, 87.4, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (68.4 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Mirran Crusader', 'Viashino Pyromancer', 'Secluded Courtyard', 'Cabal Initiate', 'Merrow Reejerey', 'Disfigure', 'Champion of Wits', 'Proclamation of Rebirth', 'Mwonvuli Acid-Moss', 'Thought Scour', 'Death Cultist', 'Fertile Ground', 'Dakmor Salvage', 'Springbloom Druid', 'Pelakka Predation', 'Nyx Lotus', 'Desperate Ritual', 'Oona, Queen of the Fae', 'Homing Sliver', 'Myr Superion', 'Brave the Elements', 'Far // Away', 'Llanowar Elves', 'Gonti, Lord of Luxury', 'Cosima, God of the Voyage', 'Thirst for Discovery', 'Iron Apprentice', 'Desert Cerodon', 'Dread Presence', 'Yahenni''s Expertise', 'Vivid Creek', 'Burst Lightning', 'Benevolent Bodyguard', 'Blade Splicer', 'Vivid Crag', 'Reap the Past', 'Disenchant', 'Hypnotic Specter', 'Indulgent Aristocrat', 'Hinterland Harbor', 'Cleansing Wildfire', 'Vedalken Shackles', 'Condemn', 'Panharmonicon', 'Porphyry Nodes', 'Azor''s Gateway', 'Painful Truths', 'Raze the Effigy', 'Ob Nixilis, the Fallen', 'Conclave Mentor', 'Fling', 'Ugin''s Conjurant', 'Lightning Strike', 'Ancient Stirrings', 'Grapeshot', 'Patch Up', 'Phyrexian Dreadnought', 'Barbarian Ring', 'Stern Dismissal', 'Snow-Covered Swamp', 'Vilis, Broker of Blood', 'Secluded Steppe', 'Zenith Flare', 'Knight of the White Orchid', 'Cloudshift', 'Cabal Therapist', 'Bearer of Silence', 'Midnight Clock', 'Martyr of Sands', 'Wild Mongrel', 'Predator Ooze', 'Den Protector', 'Colossal Skyturtle', 'Weathered Wayfarer', 'Archaeomancer', 'An Offer You Can''t Refuse', 'Slagwoods Bridge', 'Swans of Bryn Argoll', 'Buried Ruin', 'Vivid Meadow', 'Raging Ravine', 'Restless Bloodseeker', 'Tendo Ice Bridge', 'Logic Knot', 'Sacred Fire', 'Rustvale Bridge', 'Stormtide Leviathan', 'Brimstone Dragon', 'Elemental Masterpiece', 'Lodestone Golem', 'Call of the Conclave', 'Witch''s Cottage', 'Tendrils of Agony', 'Empty the Warrens', 'Thornglint Bridge', 'Llanowar Tribe', 'Captain of the Watch', 'Splendor Mare', 'Fieldmist Borderpost', 'Lotleth Troll', 'Scab-Clan Berserker', 'Dream Trawler', 'Moritte of the Frost', 'Kabira Takedown', 'Throne of Geth', 'Dismal Backwater', 'Drannith Stinger', 'Battle Screech', 'Thawing Glaciers', 'Karametra''s Acolyte', 'Palace Siege', 'Falkenrath Gorger', 'Path to the World Tree', 'Thoughtpicker Witch', 'Arcbound Javelineer', 'Saw It Coming', 'Memory''s Journey', 'Gideon Jura', 'Corrupted Crossroads', 'Snapback', 'Spawning Pool', 'Ritual of Soot', 'Gods Willing', 'Rootborn Defenses', 'Glowspore Shaman', 'Distended Mindbender', 'Snow-Covered Mountain', 'Harbinger of the Tides', 'Obscura Charm', 'Sprite Dragon', 'Underworld Connections', 'Vivid Marsh', 'Orzhov Signet', 'Mask of the Mimic', 'Maul of the Skyclaves', 'Elvish Visionary', 'Nivmagus Elemental', 'Chief Engineer', 'Restoration Angel', 'Gilded Lotus', 'Strike It Rich', 'Mirrodin''s Core', 'Dauntless Escort', 'Dizzy Spell', 'Huatli, Warrior Poet', 'Basking Rootwalla', 'Elvish Mystic', 'Seething Song', 'Tide Shaper', 'Hissing Quagmire', 'Shredded Sails', 'Darigaaz Reincarnated', 'Honor of the Pure', 'Akroma''s Memorial', 'Dark Ritual', 'Selesnya Charm', 'Grave Scrabbler', 'River''s Rebuke', 'Mirrorweave', 'Temple of Mystery', 'Azami, Lady of Scrolls', 'Yorvo, Lord of Garenbrig', 'Arcane Sanctum', 'Giant Killer', 'Skyclave Pick-Axe', 'Slip Out the Back', 'Blackbloom Rogue', 'Swarm Shambler', 'Easy Prey', 'The Mending of Dominaria', 'Malakir Blood-Priest', 'Arcbound Worker', 'Illuminator Virtuoso', 'Circle of Confinement', 'Caves of Koilos', 'Knight of the Reliquary', 'Glimpse of Tomorrow', 'Temple of Silence', 'Zhur-Taa Goblin', 'Tragic Slip', 'Waterfront District', 'Slitherhead', 'The Birth of Meletis', 'Delver of Secrets', 'Heliod''s Pilgrim', 'Imposing Vantasaur', 'Ghitu Lavarunner', 'Raven''s Crime', 'Reflex Sliver', 'Future Sight', 'Form of the Dragon', 'Vryn Wingmare', 'Fatestitcher', 'Demonic Dread', 'Fauna Shaman', 'Erebos''s Intervention', 'Bonescythe Sliver', 'It That Betrays', 'The Underworld Cookbook', 'Clifftop Retreat', 'Astral Cornucopia', 'Jokulhaups', 'Stromkirk Noble', 'Primal Surge', 'Ghost Quarter', 'Calciform Pools', 'Collected Conjuring', 'Torment of Scarabs', 'Setessan Petitioner', 'Goblin Bombardment', 'Outland Liberator', 'Haunted Fengraf', 'Sire of Insanity', 'Arguel''s Blood Fast', 'Erayo, Soratami Ascendant', 'Fire-Lit Thicket', 'Riveteers Overlook', 'Goblin Cannon', 'Good-Fortune Unicorn', 'Sliver Queen', 'Curious Pair', 'Spikefield Hazard', 'Wooded Bastion', 'Heartless Act', 'Thraben Inspector', 'Temple of Malady', 'Power Depot', 'Satyr Wayfinder', 'Cabaretti Courtyard', 'Temur Charm', 'Verdant Command', 'Raise the Alarm', 'Dread Return', 'Deep Forest Hermit', 'Mesmeric Fiend', 'Memorial to Glory', 'Touch the Spirit Realm', 'Sea Gate Oracle', 'Harrow', 'Intangible Virtue', 'Celestial Kirin', 'Knight of Glory', 'Lavabelly Sliver', 'Grand Architect', 'Kiln Fiend', 'Buried Alive', 'Kjeldoran Outpost', 'Stubborn Denial', 'Rishkar, Peema Renegade', 'Chance Encounter', 'Fiery Justice', 'Bloodthrone Vampire', 'Midnight Reaper', 'Judge''s Familiar', 'Terminus', 'Kazandu Mammoth', 'Curse of Misfortunes', 'Annex', 'Living Twister', 'Horror of the Broken Lands', 'Birds of Paradise', 'Arch of Orazca', 'General Ferrous Rokiric', 'Sands of Delirium', 'Shalai, Voice of Plenty', 'Signal Pest', 'Temple of Enlightenment', 'Bontu''s Last Reckoning', 'Eldrazi Mimic', 'Nylea''s Presence', 'Bloodtithe Harvester', 'Brokers Hideout', 'Mana Leak', 'Dimir Signet', 'Timely Reinforcements', 'Orchard Strider', 'Avaricious Dragon', 'Riftwing Cloudskate', 'Abiding Grace', 'Bogardan Hellkite', 'Flame Javelin', 'Animation Module', 'Drowned Catacomb', 'Izzet Boilerworks', 'Westvale Abbey', 'Feed the Swarm', 'Cursecatcher', 'River Serpent', 'Ash Zealot', 'Tectonic Giant', 'Burning of Xinye', 'Forgotten Cave', 'Riveteers Charm', 'Faithful Mending', 'Geomancer''s Gambit', 'Necrotic Ooze', 'Foreboding Ruins', 'Treasure Hunt', 'Nezahal, Primal Tide', 'Aspect of Hydra', 'Prophetic Prism', 'Realm Razer', 'Hostage Taker', 'Anafenza, Kin-Tree Spirit', 'Abrade', 'Tectonic Reformation', 'Cormela, Glamour Thief', 'Chain Lightning', 'Goblin Dark-Dwellers', 'Vampire Nighthawk', 'Obstinate Baloth', 'Sundial of the Infinite', 'Vampire of the Dire Moon', 'Lonely Sandbar', 'Nicol Bolas, Planeswalker', 'Force of Rage', 'Thirst for Knowledge', 'Psychic Strike', 'Deep Analysis', 'Sharuum the Hegemon', 'Incinerate', 'Spirited Companion', 'Falkenrath Pit Fighter', 'Electrolyze', 'Dreg Mangler', 'Brushfire Elemental', 'Goblin Electromancer', 'Lose Focus', 'Sword-Point Diplomacy', 'Mobilized District', 'Glen Elendra Archmage', 'Reliquary Tower', 'Ponder', 'Esper Charm', 'Barrenton Medic', 'Spark Spray', 'Leechridden Swamp', 'Flood Plain', 'Llanowar Wastes', 'Hive Mind', 'Silent Submersible', 'Glorious End', 'Teferi, Mage of Zhalfir', 'Silverbluff Bridge', 'Sphinx of Foresight', 'Arcus Acolyte', 'Old Stickfingers', 'Enigma Sphinx', 'Bloodbraid Elf', 'Myth Realized', 'Pyrrhic Revival', 'Staff of Domination', 'Wall of Omens', 'Torrent Sculptor', 'Leyline of Anticipation', 'Mind''s Desire', 'Sylvan Library', 'Bloodbraid Marauder', 'Honored Hydra', 'Frenetic Sliver', 'Emmara, Soul of the Accord', 'Lashwrithe', 'Dragonskull Summit', 'Might Sliver', 'Watcher for Tomorrow', 'Wandering Mind', 'Okiba Reckoner Raid', 'Cloudpost', 'Radha, Heart of Keld', 'Summer Bloom', 'Mirage Mirror', 'Tymaret, Chosen from Death', 'Tooth and Nail', 'Izzet Signet', 'Selesnya Sanctuary', 'Unburial Rites', 'Akrasan Squire', 'Putrid Imp', 'Intervention Pact', 'Homestead Courage', 'Demigod of Revenge', 'Sygg, River Cutthroat', 'Frontier Bivouac', 'Justice Strike', 'Glacial Fortress', 'Mistvein Borderpost', 'Laboratory Maniac', 'Ground Rift', 'Gideon''s Lawkeeper', 'Irencrag Pyromancer', 'Obscura Storefront', 'First-Sphere Gargantua', 'Pathrazer of Ulamog', 'Consume the Meek', 'Snowfield Sinkhole', 'Swiftwater Cliffs', 'Doomed Traveler', 'Kodama''s Reach', 'Cordial Vampire', 'Hooting Mandrills', 'Ghitu Encampment', 'Bala Ged Recovery', 'Urza''s Factory', 'Hero of Precinct One', 'Skull Prophet', 'Sleeper Agent', 'Confiscate', 'Timeless Witness', 'Sejiri Steppe', 'Wilt-Leaf Liege', 'Sultai Charm', 'Elixir of Immortality', 'Greater Gargadon', 'Dovin Baan', 'Walking Atlas', 'Zetalpa, Primal Dawn', 'Lochmere Serpent', 'Promise of Bunrei', 'Diffusion Sliver', 'Opt', 'Sky Hussar', 'Gruul Turf', 'Coiling Oracle', 'Abundant Harvest', 'Mirror March', 'Ojutai''s Command', 'Jack-o''-Lantern', 'Improbable Alliance', 'Bone Shards', 'Skyclave Cleric', 'Moorland Haunt', 'Treasure Cruise', 'Lurching Rotbeast', 'Vindicate', 'Mystic Monastery', 'Ravenous Chupacabra', 'Terramorphic Expanse', 'Tyrant''s Scorn', 'Garruk Wildspeaker', 'Forbid', 'Gaea''s Will', 'Treasure Map', 'Hymn to Tourach', 'Elves of Deep Shadow', 'Dead // Gone', 'Bump in the Night', 'Steel Overseer', 'Invoke Calamity', 'Genesis Wave', 'Asmodeus the Archfiend', 'Triskelion', 'Smokestack', 'Soul Spike', 'Search for Tomorrow', 'Azorius Charm', 'Elder Deep-Fiend', 'Mizzium Skin', 'Drossforge Bridge', 'Sinister Concoction', 'Rootbound Crag', 'Ornithopter', 'Fungus Sliver', 'Varragoth, Bloodsky Sire', 'Choking Sands', 'Plated Geopede', 'Izzet Charm', 'Gavony Township', 'Krark''s Thumb', 'Patchwork Automaton', 'Animate Dead', 'Morselhoarder', 'Coalition Relic', 'Cruel Ultimatum', 'Skyclave Shade', 'Purphoros''s Intervention', 'Brain Freeze', 'Reckless Impulse', 'Trickbind', 'Tangled Florahedron', 'Angel of Sanctions', 'Curse of Thirst', 'See the Truth', 'Pyretic Ritual', 'Seasoned Hallowblade', 'Ethersworn Sphinx', 'Mirrodin Besieged', 'Nature''s Lore', 'Avacyn''s Pilgrim', 'Sphinx of the Steel Wind', 'Tireless Provisioner', 'Sarulf, Realm Eater', 'Voidslime', 'Netherborn Phalanx', 'Sandsteppe Citadel', 'Metalwork Colossus', 'Hypergenesis', 'Flourishing Fox', 'Thassa''s Intervention', 'Dread Fugue', 'Doomskar Titan', 'Firewild Borderpost', 'Stormblood Berserker', 'Memory Leak', 'Thaumatic Compass', 'Masterful Replication', 'Overwhelming Splendor', 'Phantasmagorian', 'Decree of Justice', 'Shardless Agent', 'Savage Lands', 'Dire Fleet Daredevil', 'Falkenrath Aristocrat', 'Temple of Epiphany', 'Tyrant of Discord', 'Hagra Mauling', 'Nemesis of Mortals', 'Primal Command', 'Planar Bridge', 'Dryad Militant', 'Unsubstantiate', 'Zulaport Cutthroat', 'Orcish Lumberjack', 'Mystic Snake', 'Cartographer''s Survey', 'Infernal Grasp', 'Stirring Wildwood', 'Virulent Sliver', 'Chancellor of the Dross', 'Galerider Sliver', 'Castigate', 'Captured Sunlight', 'Kaya, Ghost Assassin', 'Razortide Bridge', 'Centaur Garden', 'Agonizing Remorse', 'Mouth of Ronom', 'Cosmos Elixir', 'Sire of Stagnation', 'Snow-Covered Plains', 'Precinct Captain', 'Gitaxian Probe', 'Conduit of Ruin', 'Platinum Angel', 'Collective Effort', 'Ancestral Anger', 'Gemhide Sliver', 'Light from Within', 'Stone Rain', 'Ulamog''s Nullifier', 'Truth or Tale', 'Sovereign''s Bite', 'Coralhelm Commander', 'Wild Nacatl', 'Drannith Healer', 'Avatar of Discord', 'Arbor Elf', 'Kird Ape', 'Frantic Inventory', 'Captivating Vampire', 'Day of Judgment', 'Maestros Charm', 'Murmuring Mystic', 'Kazuul''s Fury', 'Blightning', 'Ghostly Flicker', 'Leatherback Baloth', 'Undead Butler', 'Mistvault Bridge', 'Mindslaver', 'Tanglepool Bridge', 'Jace Beleren', 'Rite of Oblivion', 'Noose Constrictor', 'Flayer of the Hatebound', 'Braids, Cabal Minion', 'Tempest Djinn', 'Master of Death', 'Oracle of Mul Daya', 'Fabricate', 'Unravel the Aether', 'Lightning Rift', 'Vault of the Archangel', 'Game Trail', 'Lantern of the Lost', 'Elemental Bond', 'Ranger of Eos', 'Mirrorshell Crab', 'Dragonstorm', 'Angel of Glory''s Rise', 'Temple of Malice', 'Skemfar Avenger', 'Shard Volley', 'March of Reckless Joy', 'The Bloodsky Massacre', 'Wild Cantor', 'Sign in Blood', 'Vivid Grove', 'Malakir Rebirth', 'Silundi Vision', 'Balustrade Spy', 'Aven Squire', 'Faerie Vandal', 'Rune-Scarred Demon', 'Cathartic Reunion', 'Hythonia the Cruel', 'Champion of the Parish', 'Orim''s Chant', 'Reverent Hunter', 'Ajani, the Greathearted', 'Think Twice', 'Control Magic', 'Psychatog', 'Smallpox', 'Hollowhead Sliver', 'Eiganjo Castle', 'Wrath of God', 'White Sun''s Zenith', 'Cloudthresher', 'Tempered Sliver', 'Tormod''s Cryptkeeper', 'Kitchen Imp', 'Jwari Disruption', 'Lotleth Giant', 'Heartless Summoning', 'Temporal Fissure', 'Asylum Visitor', 'Sungold Sentinel', 'Throes of Chaos', 'Nested Shambler', 'Behold the Multiverse', 'Tempered in Solitude', 'Sigil of Valor', 'Brazen Upstart', 'Twinshot Sniper', 'Dawn of Hope', 'Rishadan Dockhand', 'Tithe Taker', 'Approach of the Second Sun', 'Vedalken Orrery', 'Mistveil Plains', 'Restore Balance', 'Kolvori, God of Kinship', 'Cathartic Pyre', 'Shriekmaw', 'Cryptic Caves', 'Frantic Search', 'Zombie Infestation', 'Battlefield Forge', 'Go for Blood', 'Otherworldly Gaze', 'Firespout', 'Fire Covenant', 'Skirge Familiar', 'Eternal Dragon', 'Wayward Guide-Beast', 'Judith, the Scourge Diva', 'Cultivate', 'Benalish Marshal', 'Reality Ripple', 'Rosethorn Acolyte', 'Mythos of Brokkos', 'Dormant Sliver', 'Sea Gate Wreckage', 'Qasali Pridemage', 'Shatterskull Charger', 'Repeal', 'Farseek', 'Chandra, Pyromaster', 'Sylvan Scrying', 'Canyon Slough', 'Okina, Temple to the Grandfathers', 'Loxodon Smiter', 'Unwinding Clock', 'Avatar of Woe', 'Terastodon', 'Crypt of Agadeem', 'Oblivion Ring', 'Talisman of Impulse', 'Cathar Commando', 'Keruga, the Macrosage', 'Akoum Hellhound', 'Unlucky Witness', 'Ghoultree', 'Memory Lapse', 'Vampire''s Kiss', 'Artisan of Kozilek', 'Twisted Abomination', 'Gatekeeper of Malakir', 'Ionize', 'Vampire Cutthroat', 'Boon of the Wish-Giver', 'Blacklance Paragon', 'Dragonkin Berserker', 'Brokers Charm', 'Master Splicer', 'Squadron Hawk', 'Irencrag Feat', 'Goldmire Bridge', 'Korlash, Heir to Blackblade', 'Mythos of Nethroi', 'Merchant of the Vale', 'Waterveil Cavern', 'Arrogant Wurm', 'Cruel Edict', 'Into the Roil', 'Treacherous Blessing', 'Master of the Pearl Trident', 'Wonder', 'Cruel Bargain', 'Hour of Promise', 'Orbs of Warding', 'Diabolic Edict', 'Talrand, Sky Summoner', 'Crumbling Necropolis', 'Tidespout Tyrant', 'Kathari Remnant', 'Duskwielder', 'Slagstorm', 'Silvergill Adept', 'Explore', 'Flame Rift', 'Simic Charm', 'Jace, the Living Guildpact', 'Lava Dart', 'Kami of False Hope', 'Fact or Fiction', 'Mausoleum Secrets', 'Pyxis of Pandemonium', 'Scrapheap Scrounger', 'Advent of the Wurm', 'Grisly Salvage', 'Village Messenger', 'Bedlam Reveler', 'Ethersworn Canonist', 'Rotting Rats', 'Duty-Bound Dead', 'Mystifying Maze', 'Neutralize', 'Sylvan Advocate', 'Seismic Assault', 'Dregscape Sliver', 'Venom Sliver', 'Opulent Palace', 'Barren Moor', 'Circular Logic', 'Glimmerpost', 'Undercity Informer', 'Declaration in Stone', 'Possibility Storm', 'Sunscorched Desert', 'Kumano Faces Kakkazan', 'Renewed Faith', 'Crackling Drake', 'Needle Spires', 'Wasteland Strangler', 'Vampire Opportunist', 'Curse of Death''s Hold', 'Cruel Reality', 'Veinfire Borderpost', 'Bronzehide Lion', 'Snow-Covered Forest', 'Woodland Cemetery', 'Arcbound Ravager', 'Mephidross Vampire', 'Zabaz, the Glimmerwasp', 'Duress', 'Mire Triton', 'Temple of Abandon', 'Psychic Spiral', 'Ghostfire Blade', 'Lone Rider', 'Maestros Theater', 'Unesh, Criosphinx Sovereign', 'Runed Halo', 'Arcbound Mouser', 'Blackmail', 'Alchemist''s Gambit', 'Figure of Destiny', 'Haazda Marshal', 'Trading Post', 'Hunted Witness', 'Brainstone', 'Desecration Demon', 'Evolving Wilds', 'Tyrant''s Choice', 'Grimdancer', 'Auramancer', 'Twinflame', 'Monstrous Carabid', 'Healer''s Hawk', 'Dauntless Bodyguard', 'Flame Slash', 'Deadshot Minotaur', 'Steppe Lynx', 'All Suns'' Dawn', 'Sensor Splicer', 'Pillage', 'Chromatic Lantern', 'Slaughter Pact', 'Vapor Snag', 'Resurgent Belief', 'Doom Foretold', 'Bastion of Remembrance', 'Discovery // Dispersal', 'Dream Leash', 'Temple of Deceit', 'Abbot of Keral Keep', 'Wildfield Borderpost', 'Inevitable Betrayal', 'Thought Erasure', 'Field of Ruin', 'Murderous Cut', 'Ramunap Excavator', 'Bile Blight', 'Archetype of Endurance', 'Hieroglyphic Illumination', 'Vital Splicer', 'Hour of Reckoning', 'Curse of Echoes', 'Fiend Hunter', 'Omen of the Sun', 'Cremate', 'Changeling Outcast', 'Suspend', 'Staff of Nin', 'Jorubai Murk Lurker', 'Revitalize', 'Lumbering Falls', 'Bloodchief''s Thirst', 'Sarkhan the Masterless', 'Rootwater Depths', 'Scythe Leopard', 'Silverblade Paladin', 'Hive Stirrings', 'Sleight of Hand', 'Soulherder', 'Extractor Demon', 'Commit // Memory', 'Viscera Seer', 'Knight of Infamy', 'Glorybringer', 'Titanoth Rex', 'Bloodline Keeper', 'Magister of Worth', 'Reckless Waif', 'Bear''s Companion', 'Detention Sphere', 'Gargoyle Castle', 'Underworld Dreams', 'Growth-Chamber Guardian', 'Darkheart Sliver', 'Mizzium Mortars', 'Piranha Marsh', 'Lavaclaw Reaches', 'Oust', 'Spell Pierce', 'Mission Briefing', 'Mishra''s Factory', 'Edgewall Innkeeper'))) 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, 68.4, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (63.7 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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', 'Coiling Oracle', 'Temple of Malady', 'Tidespout Tyrant', 'Sign in Blood', 'Discovery // Dispersal', 'Maestros Theater', 'Conclave Mentor', 'Hymn to Tourach', 'Sigil of Valor', 'Fact or Fiction', 'Grimdancer', 'Merchant of the Vale', 'Gideon Jura', 'Platinum Angel', 'Living Twister', 'Good-Fortune Unicorn', 'Mirrorshell Crab', 'Grisly Salvage', 'Primal Surge', 'Zombie Infestation', 'Delver of Secrets', 'Snowfield Sinkhole', 'Arbor Elf', 'Emmara, Soul of the Accord', 'Seismic Assault', 'Pyroclasm', 'Falkenrath Gorger', 'Nemesis of Mortals', 'Glorybringer', 'Kazandu Mammoth', 'Galerider Sliver', 'Diffusion Sliver', 'Farseek', 'Angel of Sanctions', 'Fabricate', 'Wrath of God', 'Tireless Provisioner', 'Ravenous Chupacabra', 'Chromatic Lantern', 'Qasali Pridemage', 'Behold the Multiverse', 'Sphinx of the Steel Wind', 'Kessig Flamebreather', 'Timeless Witness', 'Slagwoods Bridge', 'Crumbling Necropolis', 'Arcane Sanctum', 'Hagra Mauling', 'Magister of Worth', 'Mana Leak', 'Cleansing Wildfire', 'Sungold Sentinel', 'Goblin Bombardment', 'Jace, the Living Guildpact', 'Justice Strike', 'Lonely Sandbar', 'Dormant Sliver', 'Falkenrath Aristocrat', 'Mirrodin Besieged', 'Mausoleum Secrets', 'Hypergenesis', 'Hieroglyphic Illumination', 'Canyon Slough', 'Plated Geopede', 'Kodama''s Reach', 'Abrade', 'Might Sliver', 'Watcher for Tomorrow', 'Tyrant''s Choice', 'Dregscape Sliver', 'Forgotten Cave', 'Battlefield Forge', 'Promise of Bunrei', 'Caves of Koilos', 'Champion of the Parish', 'Doomskar Titan', 'Sprite Dragon', 'Arrogant Wurm', 'Painful Truths', 'Stormtide Leviathan', 'Razortide Bridge', 'Dark Ritual', 'Leechridden Swamp', 'Scythe Leopard', 'Dread Return', 'Deep Analysis', 'Cabal Initiate', 'Heliod''s Pilgrim', 'Mizzium Mortars', 'Lodestone Golem', 'Mistvein Borderpost', 'Duskwielder', 'Tempered Sliver', 'Firewild Borderpost', 'Sleight of Hand', 'Lotleth Troll', 'Nezahal, Primal Tide', 'Skyclave Cleric', 'Thassa''s Intervention', 'Sliver Queen', 'Lava Dart', 'Tendo Ice Bridge', 'Metalwork Colossus', 'Chance Encounter', 'Eternal Dragon', 'Gods Willing', 'Rootborn Defenses', 'Vampire''s Kiss', 'Old Stickfingers', 'Forbid', 'Ground Rift', 'Stirring Wildwood', 'Ponder', 'Izzet Boilerworks', 'Wall of Omens', 'Tithe Taker', 'Cloudshift', 'Witch''s Cottage', 'Psychatog', 'Nicol Bolas, Planeswalker', 'Kabira Takedown', 'Lochmere Serpent', 'Mesmeric Fiend', 'Netherborn Phalanx', 'Verdant Command', 'Raise the Alarm', 'Slitherhead', 'Barbarian Ring', 'Oblivion Ring', 'Benevolent Bodyguard', 'Kumano Faces Kakkazan', 'Revitalize', 'Gemhide Sliver', 'Thaumatic Compass', 'Conduit of Ruin', 'Putrid Imp', 'Rosethorn Acolyte', 'Healer''s Hawk', 'Foreboding Ruins', 'Mythos of Brokkos', 'Reality Ripple', 'Diabolic Edict', 'Tectonic Giant', 'Drossforge Bridge', 'Spirited Companion', 'Explore', 'Thought Erasure', 'Bastion of Remembrance', 'Disfigure', 'Tendrils of Agony', 'Lumbering Falls', 'Arguel''s Blood Fast', 'Bone Shards', 'Unlucky Witness', 'Orzhov Signet', 'Declaration in Stone', 'Changeling Outcast', 'Vivid Crag', 'Abundant Harvest', 'Mistveil Plains', 'Slip Out the Back', 'Rotting Rats', 'Virulent Sliver', 'Gavony Township', 'Search for Tomorrow', 'Ghost Quarter', 'Collective Effort', 'Chandra, Pyromaster', 'Ojutai''s Command', 'Restoration Angel', 'Gilded Lotus', 'Vindicate', 'Fire-Lit Thicket', 'Demonic Dread', 'Shatterskull Charger', 'Unsubstantiate', 'Chain Lightning', 'Tyrant''s Scorn', 'Otherworldly Gaze', 'Torrent Sculptor', 'Akoum Hellhound', 'Satyr Wayfinder', 'Avatar of Discord', 'Ionize', 'Hollowhead Sliver', 'Snow-Covered Swamp', 'Doomed Traveler', 'Rishkar, Peema Renegade', 'Edgewall Innkeeper', 'Sarkhan the Masterless', 'Temple of Epiphany', 'Ethersworn Sphinx', 'Kird Ape', 'Purphoros''s Intervention', 'Dream Trawler', 'The Bloodsky Massacre', 'Dragonskull Summit', 'Hostage Taker', 'Throes of Chaos', 'Ethersworn Canonist', 'Sharuum the Hegemon', 'Sygg, River Cutthroat', 'Wandering Mind', 'Kiln Fiend', 'Homing Sliver', 'Elvish Visionary', 'Stormblood Berserker', 'General Ferrous Rokiric', 'Stromkirk Noble', 'Coalition Relic', 'Terramorphic Expanse', 'Sensor Splicer', 'Sultai Charm', 'Evolving Wilds', 'Hypnotic Specter', 'Myr Superion', 'White Sun''s Zenith', 'Fungus Sliver', 'Orcish Lumberjack', 'Cathartic Reunion', 'Sandsteppe Citadel', 'Dismal Backwater', 'Desperate Ritual', 'Secluded Steppe', 'Castigate', 'Myth Realized', 'Lose Focus', 'Vampire Nighthawk', 'Rune-Scarred Demon', 'Gitaxian Probe', 'Frenetic Sliver', 'Repeal', 'Vital Splicer', 'Honor of the Pure', 'Fieldmist Borderpost', 'Pyretic Ritual', 'Veinfire Borderpost', 'Reap the Past', 'Pyrrhic Revival', 'Mire Triton', 'Village Messenger', 'Maestros Charm', 'Pathrazer of Ulamog', 'Consume the Meek', 'Burst Lightning', 'Faithful Mending', 'Cosmos Elixir', 'Lurching Rotbeast', 'Seasoned Hallowblade', 'Mistvault Bridge', 'Temple of Enlightenment', 'Zetalpa, Primal Dawn', 'Azorius Charm', 'Waterfront District', 'Condemn', 'Izzet Charm', 'Kaya, Ghost Assassin', 'Wildfield Borderpost', 'Wild Nacatl', 'Battle Screech', 'Rustvale Bridge', 'Wayward Guide-Beast', 'Kazuul''s Fury', 'Gonti, Lord of Luxury', 'Sylvan Advocate', 'Okiba Reckoner Raid', 'Sea Gate Oracle', 'Lavabelly Sliver', 'Saw It Coming', 'Chief Engineer', 'First-Sphere Gargantua', 'Secluded Courtyard', 'Bloodchief''s Thirst', 'Temple of Mystery', 'Swans of Bryn Argoll', 'Clifftop Retreat', 'Masterful Replication', 'Growth-Chamber Guardian', 'Knight of Infamy', 'Wonder', 'Mask of the Mimic', 'Judith, the Scourge Diva', 'Day of Judgment', 'Renewed Faith', 'Hissing Quagmire', 'Decree of Justice', 'Mind''s Desire', 'Grand Architect', 'Blade Splicer', 'Korlash, Heir to Blackblade', 'Orim''s Chant', 'Grave Scrabbler', 'Oust', 'Ash Zealot', 'Darkheart Sliver', 'Dauntless Bodyguard', 'Snow-Covered Plains', 'Scab-Clan Berserker', 'Dawn of Hope', 'Spawning Pool', 'Knight of the White Orchid', 'Giant Killer', 'Approach of the Second Sun', 'Vivid Grove', 'Nature''s Lore', 'Abbot of Keral Keep', 'Intangible Virtue', 'Akrasan Squire', 'Goblin Dark-Dwellers', 'Curious Pair', 'Geomancer''s Gambit', 'Flame Javelin', 'Sylvan Library', 'Reliquary Tower', 'Midnight Reaper', 'Porphyry Nodes', 'Arcus Acolyte', 'Reckless Waif', 'March of Reckless Joy', 'Touch the Spirit Realm', 'Deep Forest Hermit', 'Sylvan Scrying', 'Tymaret, Chosen from Death', 'Thought Scour', 'Hythonia the Cruel', 'Kitchen Imp', 'Oona, Queen of the Fae', 'Elvish Mystic', 'Call of the Conclave', 'Wooded Bastion', 'Asylum Visitor', 'Greater Gargadon', 'Yahenni''s Expertise', 'Shardless Agent', 'Aven Squire', 'Treacherous Blessing', 'Sire of Insanity', 'Dead // Gone', 'All Suns'' Dawn', 'Into the Roil', 'Curiosity', 'Dreg Mangler', 'Frantic Search', 'Glorious End', 'Hinterland Harbor', 'Flame Jab', 'Realm Razer', 'Thermo-Alchemist', 'Animate Dead', 'Westvale Abbey', 'Needle Spires', 'Vivid Creek', 'Fertile Ground', 'Snow-Covered Forest', 'Temple of Malice', 'Glen Elendra Archmage', 'Think Twice', 'Gatekeeper of Malakir', 'Tyrant of Discord', 'Nivmagus Elemental', 'Frontier Bivouac', 'Garruk Wildspeaker', 'Auramancer', 'Dragonkin Berserker', 'Venom Sliver', 'Horror of the Broken Lands', 'Path to the World Tree', 'Snow-Covered Mountain', 'Mirran Crusader', 'Llanowar Wastes', 'Sundial of the Infinite', 'Cabaretti Courtyard', 'Elemental Masterpiece', 'Cosima, God of the Voyage', 'Duress', 'Duty-Bound Dead', 'Voidslime', 'Hour of Reckoning', 'Jace Beleren', 'Scrapheap Scrounger', 'Barren Moor', 'Obscura Storefront', 'Alchemist''s Gambit', 'Den Protector', 'Harrow', 'Silverbluff Bridge', 'Thraben Inspector', 'Ghoultree', 'Goldmire Bridge', 'Moorland Haunt', 'Reflex Sliver', 'See the Truth', 'Bedlam Reveler', 'Glacial Fortress', 'Logic Knot', 'Possibility Storm', 'Opt', 'Lashwrithe', 'Brainstone', 'Cruel Ultimatum', 'Advent of the Wurm', 'Blacklance Paragon', 'Silundi Vision', 'Birds of Paradise', 'Ancestral Anger', 'Lone Rider', 'Benalish Marshal', 'Obstinate Baloth', 'Fauna Shaman', 'Selesnya Charm', 'Crypt of Agadeem', 'Psychic Strike', 'Zulaport Cutthroat', 'Game Trail', 'It That Betrays', 'The Birth of Meletis', 'Esper Charm', 'Runed Halo', 'Brushfire Elemental', 'Dread Presence', 'Temporal Fissure', 'Memorial to Glory', 'Silverblade Paladin', 'Hive Stirrings', 'Terminus', 'Restore Balance', 'Rootbound Crag', 'Sphinx of Foresight', 'Mystic Monastery', 'Ajani, the Greathearted', 'Field of Ruin', 'Flame Slash', 'Agonizing Remorse', 'Skull Prophet', 'Extractor Demon', 'Raze the Effigy', 'Circle of Confinement', 'Circular Logic', 'Illuminator Virtuoso', 'Viashino Pyromancer', 'Heartless Act', 'Keruga, the Macrosage', 'Mission Briefing', 'Champion of Wits', 'Swarm Shambler', 'Phyrexian Dreadnought', 'Skemfar Avenger', 'Thawing Glaciers', 'Avatar of Woe', 'Heartless Summoning', 'Thornglint Bridge', 'Detention Sphere', 'Treasure Hunt', 'Master Splicer', 'Dire Fleet Daredevil', 'Palace Siege', 'Kjeldoran Outpost', 'Feed the Swarm', 'Elves of Deep Shadow', 'Thirst for Knowledge', 'The Underworld Cookbook', 'Shriekmaw', 'Twisted Abomination', 'Neutralize', 'Arch of Orazca', 'Soul Spike', 'Chancellor of the Dross', 'Treasure Cruise', 'Nested Shambler', 'Undead Butler', 'Dryad Militant', 'Knight of Glory', 'Nylea''s Presence', 'Buried Alive', 'Seething Song', 'Sovereign''s Bite', 'Avacyn''s Pilgrim', 'Invoke Calamity', 'Vivid Meadow', 'Thirst for Discovery', 'Hive Mind', 'Woodland Cemetery', 'Basking Rootwalla', 'Master of Death', 'Jokulhaups', 'Raven''s Crime', 'Desecration Demon', 'Vivid Marsh', 'Avaricious Dragon', 'Panharmonicon', 'Brokers Charm', 'Grapeshot', 'Hero of Precinct One', 'Glowspore Shaman', 'Phantasmagorian', 'Captured Sunlight', 'Mystic Snake', 'Demigod of Revenge', 'Vault of the Archangel', 'Anafenza, Kin-Tree Spirit', 'Dovin Baan', 'Disenchant', 'Far // Away', 'Outland Liberator', 'Brokers Hideout', 'Bile Blight', 'Mishra''s Factory', 'Enigma Sphinx', 'Temple of Deceit', 'Sinister Concoction', 'Colossal Skyturtle', 'Unesh, Criosphinx Sovereign', 'Unburial Rites', 'Skyclave Pick-Axe', 'Dread Fugue', 'Judge''s Familiar', 'Erebos''s Intervention', 'Mirror March', 'Brain Freeze', 'Cultivate', 'Memory Lapse', 'Tooth and Nail', 'Bonescythe Sliver', 'Cormela, Glamour Thief', 'Monstrous Carabid', 'Akroma''s Memorial', 'Cathar Commando', 'Bloodbraid Elf', 'Electrostatic Field', 'Temple of Silence', 'Lavaclaw Reaches', 'Swiftwater Cliffs', 'Slagstorm', 'Bump in the Night', 'Krark''s Thumb', 'Sleeper Agent', 'Tanglepool Bridge', 'Flayer of the Hatebound', 'Easy Prey', 'Mythos of Nethroi', 'Drowned Catacomb', 'Sword-Point Diplomacy', 'Springbloom Druid', 'Maul of the Skyclaves', 'Homestead Courage', 'Ritual of Soot', 'Tempered in Solitude', 'Underworld Connections', 'Skyclave Shade', 'Steppe Lynx', 'Frantic Inventory'))) 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, 63.7, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (93.4 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Westvale Abbey', 'Hagra Mauling', 'Animation Module', 'Dream Trawler', 'Dregscape Sliver', 'Goblin Chieftain', 'Sylvan Scrying', 'Gitaxian Probe', 'Dawn of Hope', 'Negate', 'Snow-Covered Plains', 'Alchemist''s Gambit', 'Curious Pair', 'Deep Forest Hermit', 'Terramorphic Expanse', 'Monstrous Carabid', 'Deep Analysis', 'Duty-Bound Dead', 'Iron Apprentice', 'Raven''s Crime', 'Kodama''s Reach', 'Unburial Rites', 'Sovereign''s Bite', 'Terrarion', 'Sylvan Messenger', 'The Mending of Dominaria', 'Doom Foretold', 'Circle of Confinement', 'Mirrorshell Crab', 'Wall of Omens', 'Fury of the Horde', 'Shard Volley', 'Kiln Fiend', 'Serrated Scorpion', 'Stromkirk Noble', 'Glimmerpost', 'Brimstone Dragon', 'Waterfront District', 'Scythe Leopard', 'Mesmeric Fiend', 'Slitherhead', 'Elves of Deep Shadow', 'Rakdos Headliner', 'Tempest Djinn', 'General Ferrous Rokiric', 'Enigma Sphinx', 'Timeless Witness', 'Gilded Lotus', 'Venom Sliver', 'Temple of Enlightenment', 'Sarkhan the Masterless', 'Chance Encounter', 'Extractor Demon', 'Spell Pierce', 'Sultai Charm', 'Crypt of Agadeem', 'Coiling Oracle', 'Cabaretti Courtyard', 'Treacherous Blessing', 'Forbid', 'Rite of Oblivion', 'Heartless Summoning', 'Vapor Snag', 'Abbot of Keral Keep', 'Dead // Gone', 'Tyrant of Discord', 'Llanowar Wastes', 'Thornglint Bridge', 'Thoughtpicker Witch', 'Dread Presence', 'Llanowar Tribe', 'Wayward Guide-Beast', 'Putrid Imp', 'Steppe Lynx', 'Sleight of Hand', 'Fiery Temper', 'Field of Ruin', 'Sparksmith', 'Tyrant''s Scorn', 'Cultivate', 'Temple of Epiphany', 'Fieldmist Borderpost', 'Skyclave Pick-Axe', 'Frantic Search', 'Abrade', 'Caves of Koilos', 'Goblin Arsonist', 'Blackbloom Rogue', 'The Bloodsky Massacre', 'Jace Beleren', 'Moorland Haunt', 'Flayer of the Hatebound', 'Grand Architect', 'Lavaclaw Reaches', 'Snowfield Sinkhole', 'Scrap Trawler', 'Chancellor of the Dross', 'Barbarian Ring', 'Ajani, the Greathearted', 'Falkenrath Aristocrat', 'Spawning Pool', 'Barren Moor', 'Shriekmaw', 'Nephalia Academy', 'Elvish Clancaller', 'Keruga, the Macrosage', 'Ojutai''s Command', 'Rootbound Crag', 'Torment of Scarabs', 'Fire-Lit Thicket', 'Possibility Storm', 'Lochmere Serpent', 'Dreg Mangler', 'Cloudshift', 'Zetalpa, Primal Dawn', 'Temple of Deceit', 'Hypergenesis', 'Torrent Sculptor', 'Qasali Pridemage', 'Seething Song', 'Wildfield Borderpost', 'Sign in Blood', 'Intruder Alarm', 'Unlucky Witness', 'Akroma''s Memorial', 'Squadron Hawk', 'Goblin Dark-Dwellers', 'Seismic Assault', 'Fungus Sliver', 'Platinum Angel', 'Burst Lightning', 'Feed the Swarm', 'Heir of Falkenrath', 'Resurgent Belief', 'Satyr Wayfinder', 'Horror of the Broken Lands', 'Mask of the Mimic', 'Woodland Cemetery', 'Mizzium Mortars', 'Kumano Faces Kakkazan', 'Dread Return', 'Frontier Bivouac', 'Okina, Temple to the Grandfathers', 'Tanglepool Bridge', 'Beast Whisperer', 'Talisman of Impulse', 'Angel of Sanctions', 'Shriekhorn', 'Foreboding Ruins', 'Nezahal, Primal Tide', 'Ethersworn Canonist', 'Springbloom Druid', 'Dauntless Bodyguard', 'Dragonskull Summit', 'Hour of Reckoning', 'Lotleth Troll', 'Crash Through', 'Canyon Slough', 'Myr Superion', 'Desecration Demon', 'Throes of Chaos', 'Commune with the Gods', 'Hive Mind', 'Bump in the Night', 'Darigaaz Reincarnated', 'Erebos''s Intervention', 'Shardless Agent', 'Mausoleum Secrets', 'Animate Dead', 'Metalwork Colossus', 'Razortide Bridge', 'Throne of Geth', 'Edric, Spymaster of Trest', 'Hissing Quagmire', 'Omen of the Sun', 'Doomed Traveler', 'Reality Ripple', 'Disenchant', 'Plated Geopede', 'Acolyte of Affliction', 'Wandering Mind', 'Spectral Procession', 'Curse of Death''s Hold', 'Lonely Sandbar', 'Verdant Command', 'Ponder', 'Benalish Marshal', 'Faerie Miscreant', 'Necromancer''s Stockpile', 'Watcher for Tomorrow', 'Faithful Mending', 'Gonti, Lord of Luxury', 'Selesnya Charm', 'Mouth of Ronom', 'Myth Realized', 'Ionize', 'Hymn to Tourach', 'Glacial Fortress', 'Flame Rift', 'Patchwork Automaton', 'Mire Triton', 'Tarfire', 'Disciple of the Vault', 'Scion of Oona', 'Frantic Inventory', 'Crashing Drawbridge', 'Despoiler of Souls', 'Jace, the Living Guildpact', 'Lurching Rotbeast', 'Chandra, Pyromaster', 'Worldgorger Dragon', 'Decree of Justice', 'Thirst for Knowledge', 'Arcbound Worker', 'Sinister Concoction', 'Raise the Alarm', 'Galerider Sliver', 'Porphyry Nodes', 'Tymaret, Chosen from Death', 'Vivid Creek', 'Vivid Marsh', 'Improbable Alliance', 'Reap the Past', 'Grave Scrabbler', 'Cruel Reality', 'Mythos of Nethroi', 'Secluded Steppe', 'Blistercoil Weird', 'Joraga Warcaller', 'Burning Anger', 'Diregraf Ghoul', 'Doomskar Titan', 'Mind''s Desire', 'Nissa''s Chosen', 'Orzhov Signet', 'Voldaren Pariah', 'Judge''s Familiar', 'Faerie Vandal', 'Thermo-Alchemist', 'Slip Out the Back', 'Hive Stirrings', 'Bedlam Reveler', 'Kessig Flamebreather', 'Pyroclasm', 'Lonis, Cryptozoologist', 'Arguel''s Blood Fast', 'Treasure Cruise', 'Curse of Echoes', 'Retributive Wand', 'Living Twister', 'Arcbound Mouser', 'Blazing Shoal', 'Revitalize', 'Vindicate', 'Mana Leak', 'Mystic Snake', 'Scab-Clan Berserker', 'Geomancer''s Gambit', 'Abiding Grace', 'Irencrag Feat', 'Underworld Connections', 'Joraga Treespeaker', 'Obstinate Baloth', 'Greater Gargadon', 'Explore', 'Kazandu Mammoth', 'Elvish Mystic', 'Zephyr Sprite', 'Veinfire Borderpost', 'Bastion of Remembrance', 'Dragonkin Berserker', 'Electrostatic Field', 'Cruel Bargain', 'Chain Lightning', 'Good-Fortune Unicorn', 'Fact or Fiction', 'Power Depot', 'Avatar of Woe', 'Arcbound Javelineer', 'Flame Slash', 'Fruit of Tizerus', 'Bala Ged Recovery', 'Brave the Elements', 'Blacklance Paragon', 'Heartless Act', 'Sandsteppe Citadel', 'Rally the Peasants', 'Netherborn Phalanx', 'Unsubstantiate', 'Gemhide Sliver', 'Avatar of Discord', 'Elvish Visionary', 'Undead Butler', 'Nissa Revane', 'Lumbering Falls', 'Garruk Wildspeaker', 'Healer''s Hawk', 'Game Trail', 'Brokers Hideout', 'Slagwoods Bridge', 'Brain Freeze', 'Putrid Goblin', 'Feast of Sanity', 'Flame Jab', 'Piranha Marsh', 'Dryad Militant', 'Vivid Grove', 'Fertile Ground', 'Arcbound Ravager', 'March of Reckless Joy', 'Sandwurm Convergence', 'Aven Squire', 'Tyrant''s Choice', 'Outland Liberator', 'Evolving Wilds', 'Marwyn, the Nurturer', 'Snow-Covered Swamp', 'Sungold Sentinel', 'Fireblade Charger', 'Signal Pest', 'Brushfire Elemental', 'Curse of Misfortunes', 'Pia''s Revolution', 'Mistvault Bridge', 'Ezuri, Renegade Leader', 'Cloudpost', 'Giant Killer', 'Hour of Promise', 'Font of Return', 'Imperious Perfect', 'Skophos Reaver', 'Ancestral Anger', 'Orim''s Chant', 'Knight of the White Orchid', 'Skyclave Shade', 'Goblin Ringleader', 'Kabira Takedown', 'Mission Briefing', 'Temple of Silence', 'Sword-Point Diplomacy', 'Growth-Chamber Guardian', 'Masterful Replication', 'Woodfall Primus', 'Realm Razer', 'Otherworldly Gaze', 'Primal Surge', 'Terastodon', 'Arcane Sanctum', 'Sower of Temptation', 'Sunblade Samurai', 'Skyclave Cleric', 'Vivid Crag', 'Maestros Charm', 'Dismal Backwater', 'Voldaren Epicure', 'Merchant of the Vale', 'Scryb Ranger', 'Llanowar Elves', 'Midnight Reaper', 'Seaside Citadel', 'Obscura Storefront', 'Condemn', 'Curse of Thirst', 'Archetype of Endurance', 'Sylvan Library', 'Gatekeeper of Malakir', 'Grapeshot', 'Reckless Waif', 'Korlash, Heir to Blackblade', 'Infernal Grasp', 'Abundant Harvest', 'Bloodchief''s Thirst', 'Prophetic Prism', 'Promise of Bunrei', 'Swans of Bryn Argoll', 'The Underworld Cookbook', 'Avacyn''s Pilgrim', 'Knight of Glory', 'Nivmagus Elemental', 'Crumbling Necropolis', 'Blade Splicer', 'Temur Charm', 'Delver of Secrets', 'Kazuul''s Fury', 'Skemfar Avenger', 'Clifftop Retreat', 'Scrapheap Scrounger', 'Grimdancer', 'Spikefield Hazard', 'Moritte of the Frost', 'Scrap Welder', 'Changeling Outcast', 'Conduit of Ruin', 'Vessel of Nascency', 'Firewild Borderpost', 'Arch of Orazca', 'Wooded Bastion', 'Virulent Sliver', 'Old Stickfingers', 'Esper Charm', 'Zabaz, the Glimmerwasp', 'Silundi Vision', 'Sylvan Primordial', 'Goblin Cratermaker', 'Tithe Taker', 'Thraben Inspector', 'Sleeper Agent', 'Temple of Mystery', 'Temple of Malice', 'Fireblade Artist', 'Drossforge Bridge', 'Purphoros''s Intervention', 'Nicol Bolas, Planeswalker', 'Stitcher''s Graft', 'Memorial to Glory', 'Goblin Trashmaster', 'Rune-Scarred Demon', 'Bogardan Hellkite', 'Terminus', 'Reflex Sliver', 'Angel of Despair', 'Wrath of God', 'Cosmos Elixir', 'Renewed Faith', 'Master of Death', 'Forgotten Cave', 'Ravenous Chupacabra', 'Mizzium Skin', 'Agonizing Remorse', 'Tooth and Nail', 'Search for Tomorrow', 'Goblin Warchief', 'Sphinx of Foresight', 'Tidespout Tyrant', 'Orcish Lumberjack', 'Hythonia the Cruel', 'Mishra''s Factory', 'Hero of Precinct One', 'Akrasan Squire', 'Glen Elendra Archmage', 'Mogg War Marshal', 'See the Truth', 'Azorius Charm', 'Oni-Cult Anvil', 'Blazing Rootwalla', 'Mirran Crusader', 'Stirring Wildwood', 'Vital Splicer', 'Tendo Ice Bridge', 'Diffusion Sliver', 'Zombie Infestation', 'Bone Shards', 'Vampire Lacerator', 'Birds of Paradise', 'Dormant Sliver', 'Chief Engineer', 'Stormtide Leviathan', 'Advent of the Wurm', 'Ghoultree', 'Asylum Visitor', 'Treasure Hunt', 'Raze the Effigy', 'Voidslime', 'All Suns'' Dawn', 'Homing Sliver', 'Mirror March', 'Dread Fugue', 'Den Protector', 'Grumgully, the Generous', 'White Sun''s Zenith', 'Demigod of Revenge', 'Unesh, Criosphinx Sovereign', 'Vampire''s Kiss', 'Strike It Rich', 'Carnophage', 'Ranger of Eos', 'Mobilized District', 'Thaumatic Compass', 'Demonic Dread', 'Arcus Acolyte', 'Rashmi, Eternities Crafter', 'Sky Hussar', 'Rotting Rats', 'Claim the Firstborn', 'Gavony Township', 'Intangible Virtue', 'Shock', 'Opt', 'Ghost Quarter', 'Thought Scour', 'Stern Dismissal', 'Sliver Queen', 'Think Twice', 'Undead Gladiator', 'Repeal', 'Steel Overseer', 'Electrolyze', 'Tendrils of Agony', 'Diabolic Edict', 'Infuriate', 'Collective Effort', 'Storm Herald', 'Emmara, Soul of the Accord', 'Brokers Charm', 'Okiba Reckoner Raid', 'Glorybringer', 'Krark''s Thumb', 'Drowned Catacomb', 'Pelakka Predation', 'Panharmonicon', 'Captured Sunlight', 'Secluded Courtyard', 'First-Sphere Gargantua', 'Hypnotic Specter', 'Needle Spires', 'Call the Bloodline', 'Mogg Fanatic', 'Dizzy Spell', 'Reckless Impulse', 'Approach of the Second Sun', 'Jokulhaups', 'Krenko''s Command', 'Battlefield Forge', 'Thirst for Meaning', 'Thirst for Discovery', 'Cackling Counterpart', 'Master Splicer', 'Declaration in Stone', 'Falkenrath Gorger', 'Arrogant Wurm', 'Thawing Glaciers', 'Edgewall Innkeeper', 'Behold the Multiverse', 'Mystic Monastery', 'Stormfist Crusader', 'Glorious End', 'Reliquary Tower', 'Hollowhead Sliver', 'Viashino Pyromancer', 'Leechridden Swamp', 'Windbrisk Heights', 'Phantasmagorian', 'Castigate', 'Maul of the Skyclaves', 'Stubborn Denial', 'Nested Shambler', 'Might Sliver', 'Champion of the Parish', 'Rishkar, Peema Renegade', 'Hunted Witness', 'Weathered Wayfarer', 'Akoum Hellhound', 'Stormblood Berserker', 'Soul Spike', 'Temporal Fissure', 'Dragonstorm', 'Harrow', 'Lantern of the Lost', 'Shrapnel Blast', 'Ground Rift', 'Darkheart Sliver', 'Empty the Warrens', 'Martyr of Sands', 'Judith, the Scourge Diva', 'Sundial of the Infinite', 'Vampire Nighthawk', 'Cabal Initiate', 'Cosima, God of the Voyage', 'Glowspore Shaman', 'Ancient Stirrings', 'Swarm Shambler', 'Lavabelly Sliver', 'Sensor Splicer', 'Skull Prophet', 'Seasoned Hallowblade', 'Mistveil Plains', 'Oona, Queen of the Fae', 'Skirk Ridge Exhumer', 'Nylea''s Presence', 'Inevitable Betrayal', 'Overwhelming Splendor', 'Vivid Meadow', 'Lashwrithe', 'Tectonic Giant', 'Outnumber', 'Sigil of the Empty Throne', 'Oblivion Ring', 'Izzet Charm', 'Tempered Sliver', 'Primal Command', 'Sphinx of the Steel Wind', 'Psychatog', 'Eternal Dragon', 'Distended Mindbender', 'Lose Focus', 'Touch the Spirit Realm', 'Chromatic Lantern', 'Silverblade Paladin', 'Kird Ape', 'Magister of Worth', 'Jwari Disruption', 'Bloodhall Priest', 'Fyndhorn Elves', 'Snow-Covered Mountain', 'Rhys the Redeemed', 'Sylvan Advocate', 'Triskelion', 'Mythos of Brokkos', 'Auramancer', 'Tempered in Solitude', 'Elvish Harbinger', 'Lifecrafter''s Bestiary', 'Rosethorn Acolyte', 'Restore Balance', 'Slagstorm', 'Cathartic Reunion', 'Cathar Commando', 'Basking Rootwalla', 'Goblin Bombardment', 'Hell Mongrel', 'Zulaport Cutthroat', 'Dovin Baan', 'Trickbind', 'Day of Judgment', 'Oust', 'Sprite Dragon', 'Elemental Masterpiece', 'Mystifying Maze', 'Rootborn Defenses', 'Dark Ritual', 'Elvish Archdruid', 'Silverbluff Bridge', 'Rustvale Bridge', 'Duskwielder', 'Kaya, Ghost Assassin', 'Fabricate', 'Wild Nacatl', 'Gideon Jura', 'Hornet Queen', 'Bloodbraid Elf', 'Conclave Mentor', 'Bonescythe Sliver', 'Grisly Salvage', 'Anafenza, Kin-Tree Spirit', 'Farseek', 'Form of the Dragon', 'Nemesis of Mortals', 'Colossal Skyturtle', 'Goldmire Bridge', 'Arbor Elf', 'Mirrodin Besieged', 'Mistvein Borderpost', 'Nature''s Lore', 'Goblin Matron', 'Murderous Redcap', 'Kira, Great Glass-Spinner', 'Wild Cantor', 'Dire Tactics', 'Discovery // Dispersal', 'Honor of the Pure', 'Dark-Dweller Oracle', 'Logic Knot', 'Pyrrhic Revival', 'Hinterland Harbor', 'Assault Strobe', 'Cleansing Wildfire', 'Duress', 'Phyrexian Dreadnought', 'Witch''s Cottage', 'Buried Alive', 'Spirited Companion', 'Curiosity', 'Knight of Infamy', 'Benevolent Bodyguard', 'Vault of the Archangel', 'Painful Truths', 'Urza''s Factory', 'Lodestone Golem', 'Lava Dart', 'Invoke Calamity', 'Pathrazer of Ulamog', 'Palace Siege', 'Heliod''s Pilgrim', 'Lone Rider', 'Soul Snare', 'Pyretic Ritual', 'Tangleroot', 'Fauna Shaman', 'Ethersworn Sphinx', 'Llanowar Scout', 'Justice Strike', 'Colossification', 'Desperate Ritual', 'Twisted Abomination', 'Wonder', 'Sharuum the Hegemon', 'It That Betrays', 'Ash Zealot', 'Avaricious Dragon', 'Battle Screech', 'Tireless Provisioner', 'Gilt-Leaf Archdruid', 'Hypnotic Sprite', 'Sigil of Valor', 'Path to the World Tree', 'Snow-Covered Forest', 'Runed Halo', 'Kami of False Hope', 'Sygg, River Cutthroat', 'Village Messenger', 'Kjeldoran Outpost', 'Mephidross Vampire', 'Bile Blight', 'Call of the Conclave', 'Swiftwater Cliffs', 'Cathartic Pyre', 'Kitchen Imp', 'Shatterskull Charger', 'Llanowar Mentor', 'Skirk Prospector', 'Izzet Boilerworks', 'Circular Logic', 'Detention Sphere', 'Temple of Malady', 'Sire of Insanity', 'Scorched Rusalka', 'Clawing Torment', 'Memory Lapse', 'The Birth of Meletis', 'Coalition Relic', 'Frenetic Sliver', 'Flame Javelin', 'Restoration Angel', 'Champion of Wits'))) 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, 93.4, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (116.4 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Slitherhead', 'Intruder Alarm', 'Darksteel Colossus', 'Edgewall Innkeeper', 'Tyrant''s Scorn', 'Ezuri, Renegade Leader', 'Tyrant of Discord', 'Sire of Insanity', 'Tithe Taker', 'Wrath of God', 'Den Protector', 'Phantasmal Bear', 'Gitaxian Probe', 'Secluded Steppe', 'Unesh, Criosphinx Sovereign', 'Reflex Sliver', 'Birds of Paradise', 'Bastion of Remembrance', 'Monstrous Carabid', 'Elvish Mystic', 'Mogg War Marshal', 'Vivid Crag', 'Unsubstantiate', 'Cosima, God of the Voyage', 'Avacyn''s Pilgrim', 'Healer''s Hawk', 'Ashen-Skin Zubera', 'Squadron Hawk', 'Reinforced Ronin', 'Lonely Sandbar', 'Think Twice', 'Satyr Wayfinder', 'Bloodhall Priest', 'Raven''s Crime', 'Ember-Fist Zubera', 'Wooded Bastion', 'Advent of the Wurm', 'Claim the Firstborn', 'Swarm Shambler', 'Panharmonicon', 'Kazandu Mammoth', 'Porcelain Legionnaire', 'Garruk Wildspeaker', 'Shard Volley', 'Dreg Mangler', 'Undead Butler', 'Korlash, Heir to Blackblade', 'See the Truth', 'Hornet Queen', 'Bile Blight', 'Stormblood Berserker', 'Angel of Despair', 'Virulent Sliver', 'Mishra''s Factory', 'Brushfire Elemental', 'Temple of Malady', 'First-Sphere Gargantua', 'Ultimate Price', 'Delver of Secrets', 'Bump in the Night', 'Bituminous Blast', 'Stitcher''s Graft', 'Sensor Splicer', 'Dark Ritual', 'Cabal Initiate', 'Angel of Sanctions', 'Improbable Alliance', 'Fact or Fiction', 'Mystic Snake', 'Curious Pair', 'Otherworldly Gaze', 'Bone Shards', 'Arcanis the Omnipotent', 'Path to the World Tree', 'Sylvan Library', 'Might Sliver', 'Merfolk Mistbinder', 'Lumbering Falls', 'Sigil of Valor', 'Sleeper Agent', 'Anafenza, Kin-Tree Spirit', 'Dead // Gone', 'Sleight of Hand', 'Feed the Swarm', 'Rootborn Defenses', 'Phyrexian Dreadnought', 'Hero of Precinct One', 'Cathar Commando', 'Decree of Justice', 'Approach of the Second Sun', 'Kiln Fiend', 'Temple of Silence', 'Abrade', 'Buried Alive', 'Scrapheap Scrounger', 'Silverblade Paladin', 'Kari Zev''s Expertise', 'Nissa''s Chosen', 'Putrid Imp', 'Firewild Borderpost', 'Archetype of Endurance', 'Growth-Chamber Guardian', 'Declaration in Stone', 'Blistercoil Weird', 'Snow-Covered Mountain', 'Desecration Demon', 'Tidespout Tyrant', 'Rosethorn Acolyte', 'Condemn', 'Torrent Sculptor', 'Lifecrafter''s Bestiary', 'Thaumatic Compass', 'Sprite Dragon', 'Champion of Wits', 'Nicol Bolas, Planeswalker', 'Myth Realized', 'General Ferrous Rokiric', 'Temple of Malice', 'Gatekeeper of Malakir', 'Soul Snare', 'Kopala, Warden of Waves', 'Lodestone Golem', 'Sylvan Scrying', 'Collective Effort', 'Kami of False Hope', 'Ash Zealot', 'Mirran Crusader', 'Gideon Jura', 'Maul of the Skyclaves', 'Dread Fugue', 'Flame Javelin', 'Revitalize', 'Experimental Synthesizer', 'Primal Command', 'Tide Shaper', 'Sandsteppe Citadel', 'Rootbound Crag', 'Heliod''s Pilgrim', 'Dawn of Hope', 'Hive Mind', 'Lonis, Cryptozoologist', 'Vivid Grove', 'Ethersworn Canonist', 'Llanowar Tribe', 'Dryad Militant', 'Aether Spellbomb', 'Hatching Plans', 'Phantasmagorian', 'Hagra Mauling', 'Game Trail', 'Colossal Skyturtle', 'Grave Scrabbler', 'Memorial to Glory', 'Michiko''s Reign of Truth', 'Enigma Sphinx', 'Cathartic Reunion', 'Vivid Marsh', 'Honor of the Pure', 'Scorched Rusalka', 'The Mending of Dominaria', 'Swiftwater Cliffs', 'Lashwrithe', 'Sky Hussar', 'Coiling Oracle', 'Crack the Earth', 'Pyretic Ritual', 'Riveteers Overlook', 'Deep Forest Hermit', 'Master Splicer', 'Vital Splicer', 'Assault Strobe', 'Duty-Bound Dead', 'Invoke Calamity', 'Champion of the Parish', 'Knight of Glory', 'Restoration Angel', 'Acolyte of Affliction', 'Spikefield Hazard', 'Nezahal, Primal Tide', 'Witch''s Cottage', 'Watcher for Tomorrow', 'Chain Lightning', 'Tyrant''s Choice', 'Blazing Archon', 'Fire Prophecy', 'Shatterskull Charger', 'Cloudfin Raptor', 'Stirring Wildwood', 'Spell Pierce', 'Gemhide Sliver', 'Behold the Multiverse', 'Treacherous Blessing', 'Gonti, Lord of Luxury', 'Lochmere Serpent', 'Temple of Epiphany', 'Cursecatcher', 'Akroma''s Memorial', 'Mask of the Mimic', 'Archetype of Finality', 'Skyclave Pick-Axe', 'Field of Ruin', 'Tectonic Giant', 'Voldaren Epicure', 'Silverbluff Bridge', 'Kitchen Imp', 'Mana Leak', 'Imperious Perfect', 'Fury of the Horde', 'Eiganjo Castle', 'Akrasan Squire', 'Thought Scour', 'Sylvan Primordial', 'Worldgorger Dragon', 'Skull Prophet', 'Rotting Rats', 'Signal Pest', 'Justice Strike', 'Fabricate', 'Diabolic Edict', 'All Suns'' Dawn', 'Venom Sliver', 'Mistvault Bridge', 'Erebos''s Intervention', 'Snowfield Sinkhole', 'Psychatog', 'Cloudcrest Lake', 'Silent-Chant Zubera', 'Animate Dead', 'Treasure Hunt', 'Plow Under', 'Falkenrath Pit Fighter', 'Glorious End', 'Silundi Vision', 'Crumbling Necropolis', 'Mythos of Nethroi', 'Okiba Reckoner Raid', 'Viashino Pyromancer', 'Vampire Nighthawk', 'Master of Death', 'Glacial Fortress', 'Mythos of Brokkos', 'Nested Shambler', 'Gavony Township', 'Elvish Archdruid', 'Chancellor of the Dross', 'Underworld Connections', 'Serrated Scorpion', 'Hollowhead Sliver', 'Baneful Omen', 'Bringer of the Green Dawn', 'Gilt-Leaf Archdruid', 'Oust', 'Snow-Covered Forest', 'Electrostatic Field', 'Call of the Conclave', 'Mesmeric Fiend', 'Soul Spike', 'Judith, the Scourge Diva', 'Sign in Blood', 'Doomed Traveler', 'Ghoultree', 'Gilded Lotus', 'Disenchant', 'Dread Return', 'Lurching Rotbeast', 'Wild Nacatl', 'Windbrisk Heights', 'Sarkhan the Masterless', 'Coalition Relic', 'Lone Rider', 'Ajani, the Greathearted', 'Pia''s Revolution', 'Flame Slash', 'Anax, Hardened in the Forge', 'Sphinx of Foresight', 'Rune-Scarred Demon', 'Acidic Slime', 'Rashmi, Eternities Crafter', 'Edric, Spymaster of Trest', 'Explore', 'Aven Squire', 'Arbor Elf', 'Brokers Charm', 'Dregscape Sliver', 'Alchemist''s Gambit', 'Evolving Wilds', 'Palace Siege', 'Dormant Sliver', 'Duskwielder', 'Westvale Abbey', 'Renewed Faith', 'Sultai Charm', 'Woodland Cemetery', 'Repeal', 'Benalish Marshal', 'Chance Encounter', 'Opt', 'Bonescythe Sliver', 'Howling Mine', 'Coralhelm Commander', 'Shardless Agent', 'It That Betrays', 'Netherborn Phalanx', 'Fatal Grudge', 'Brain Freeze', 'Leechridden Swamp', 'Snow-Covered Plains', 'Fire-Lit Thicket', 'Meteor Golem', 'Vindicate', 'Ground Rift', 'Detention Sphere', 'Snow-Covered Swamp', 'Tanglepool Bridge', 'Arch of Orazca', 'Servo Exhibition', 'Voidslime', 'Commune with the Gods', 'Scale of Chiss-Goria', 'Ashenmoor Gouger', 'Temporal Fissure', 'Sarkhan the Mad', 'Thraben Inspector', 'Sylvan Advocate', 'Glorybringer', 'Wandering Mind', 'Barbarian Ring', 'Hypergenesis', 'Sungold Sentinel', 'Grisly Salvage', 'Thirst for Meaning', 'Izzet Charm', 'Ashenmoor Liege', 'Pathrazer of Ulamog', 'Dire Tactics', 'Ghost Quarter', 'Galerider Sliver', 'Llanowar Mentor', 'Raze the Effigy', 'Goblin Chieftain', 'Lotleth Troll', 'Raise the Alarm', 'Temur Charm', 'Kessig Flamebreather', 'Temple of Enlightenment', 'Of One Mind', 'Purphoros''s Intervention', 'Immortal Servitude', 'Pyrrhic Revival', 'Scryb Ranger', 'Murderous Redcap', 'Mizzium Mortars', 'Hell Mongrel', 'Nature''s Lore', 'Beast Whisperer', 'Hour of Reckoning', 'Nylea''s Presence', 'Painful Truths', 'Izzet Boilerworks', 'Mirror March', 'Joraga Treespeaker', 'Weathered Wayfarer', 'Platinum Angel', 'Unburial Rites', 'Kher Keep', 'Resurgent Belief', 'Sunblade Samurai', 'Sunscorched Desert', 'Blacklance Paragon', 'Go for the Throat', 'Putrid Goblin', 'Dragonshift', 'Court Homunculus', 'Changeling Outcast', 'Good-Fortune Unicorn', 'Origin Spellbomb', 'Stromkirk Noble', 'Hissing Quagmire', 'Primalcrux', 'Firespout', 'Goblin Dark-Dwellers', 'Dripping-Tongue Zubera', 'Frenetic Sliver', 'Archetype of Imagination', 'Needle Spires', 'Reliquary Tower', 'Skirk Prospector', 'White Sun''s Zenith', 'Temple of Mystery', 'Tempered Sliver', 'Forbid', 'Razortide Bridge', 'Cloudshift', 'Catch // Release', 'Seething Song', 'Tymaret, Chosen from Death', 'Hypnotic Specter', 'Basking Rootwalla', 'Sovereign''s Bite', 'Avaricious Dragon', 'Kazuul''s Fury', 'Curiosity', 'Agonizing Remorse', 'Scrap Trawler', 'Crypt of Agadeem', 'Stormchaser Mage', 'Swans of Bryn Argoll', 'Mausoleum Secrets', 'Shriekmaw', 'Distended Mindbender', 'Scythe Leopard', 'Hotshot Mechanic', 'Throes of Chaos', 'Harrow', 'Metalwork Colossus', 'Springbloom Druid', 'Lyzolda, the Blood Witch', 'Crashing Drawbridge', 'Vampire''s Kiss', 'Skophos Reaver', 'Sparksmith', 'Drowned Catacomb', 'Symbiotic Wurm', 'Promise of Bunrei', 'Lavaclaw Reaches', 'Maestros Charm', 'Spawning Pool', 'Frantic Search', 'Shriekhorn', 'Intangible Virtue', 'Heir of Falkenrath', 'Goblin Cratermaker', 'Skyclave Cleric', 'Dream Trawler', 'Inevitable Betrayal', 'Sphinx of the Steel Wind', 'Qasali Pridemage', 'Elemental Masterpiece', 'Ornithopter', 'Nissa Revane', 'Everflowing Chalice', 'Fungus Sliver', 'Plated Geopede', 'Warkite Marauder', 'Dauntless Bodyguard', 'Firebolt', 'Asylum Visitor', 'Desperate Ritual', 'Reckless Impulse', 'Mesa Enchantress', 'Orim''s Chant', 'Oversoul of Dusk', 'Dragonskull Summit', 'Moorland Haunt', 'Earthshaker Khenra', 'Martyr of Sands', 'Reckless Waif', 'Luminarch Ascension', 'Thirst for Discovery', 'Veinfire Borderpost', 'Falkenrath Gorger', 'Wingcrafter', 'Vessel of Nascency', 'Rakdos Charm', 'Kefnet the Mindful', 'Terrarion', 'Brokers Hideout', 'Skemfar Avenger', 'Ranger of Eos', 'Shalai, Voice of Plenty', 'Touch the Spirit Realm', 'Goblin Matron', 'Mirrorshell Crab', 'Stormfist Crusader', 'Fireblade Charger', 'Zetalpa, Primal Dawn', 'Jace, the Living Guildpact', 'Grapeshot', 'Scrap Welder', 'Llanowar Wastes', 'Merchant of the Vale', 'Ethersworn Sphinx', 'Rakdos Headliner', 'Temple of Deceit', 'Brave the Elements', 'Ojutai''s Command', 'Blade Splicer', 'Masterful Replication', 'Arcane Sanctum', 'Seaside Citadel', 'Gideon''s Lawkeeper', 'Bedlam Reveler', 'Deep Analysis', 'Rally the Ancestors', 'Dark-Dweller Oracle', 'Ghitu Lavarunner', 'Demonic Dread', 'Stormtide Leviathan', 'Seismic Assault', 'Rite of Oblivion', 'Ionize', 'Circular Logic', 'Reap the Past', 'The Bloodsky Massacre', 'Darkheart Sliver', 'Selesnya Charm', 'Arguel''s Blood Fast', 'Reality Ripple', 'Seasoned Hallowblade', 'Restore Balance', 'Orzhov Signet', 'Arrogant Wurm', 'Oblivion Ring', 'Crash Through', 'Forgotten Cave', 'Flash of Insight', 'Mirrodin Besieged', 'Fireblade Artist', 'Thermo-Alchemist', 'Tangleroot', 'Sygg, River Cutthroat', 'Kird Ape', 'Floating-Dream Zubera', 'Obscura Storefront', 'The Birth of Meletis', 'Kodama''s Reach', 'Merrow Reejerey', 'Goldmire Bridge', 'Thawing Glaciers', 'Elvish Clancaller', 'Silvergill Adept', 'Greater Gargadon', 'Bloodthrone Vampire', 'Incinerate', 'Tomb of Urami', 'Negate', 'Lavabelly Sliver', 'Giant Killer', 'Battlefield Forge', 'Kaya, Ghost Assassin', 'Vedalken Shackles', 'Rakdos Cackler', 'Crackling Drake', 'Elves of Deep Shadow', 'Discovery // Dispersal', 'Drossforge Bridge', 'Vault Skirge', 'Magister of Worth', 'Auramancer', 'Castigate', 'Steppe Lynx', 'Wall of Omens', 'Arcus Acolyte', 'Perilous Research', 'Sinister Concoction', 'Twisted Abomination', 'Invader Parasite', 'Stitch in Time', 'Chandra, Pyromaster', 'Geomancer''s Gambit', 'Burst Lightning', 'Vivid Meadow', 'Farseek', 'Glowspore Shaman', 'Piranha Marsh', 'Tendo Ice Bridge', 'Riverfall Mimic', 'Bloodbraid Elf', 'Scab-Clan Berserker', 'Canyon Slough', 'Vryn Wingmare', 'Steel Overseer', 'Disciple of the Vault', 'Slagstorm', 'Circle of Confinement', 'Foreboding Ruins', 'Treasure Cruise', 'Azorius Charm', 'Nevermore', 'Flame Rift', 'Tireless Provisioner', 'Heartless Summoning', 'Goblin Ringleader', 'Shrapnel Blast', 'Slagwoods Bridge', 'Hinterland Harbor', 'Claws of Gix', 'Thoughtpicker Witch', 'Outland Liberator', 'Terminus', 'Navigator''s Compass', 'Barren Moor', 'Cosmos Elixir', 'Wonder', 'Orcish Lumberjack', 'Frost Walker', 'Unlucky Witness', 'Joraga Warcaller', 'Tidal Warrior', 'Sharuum the Hegemon', 'Sojourner''s Companion', 'Chromatic Lantern', 'Falkenrath Aristocrat', 'Realm Razer', 'Skyclave Shade', 'Transmogrify', 'Chief Engineer', 'Retributive Wand', 'Hive Stirrings', 'Verdant Command', 'Clout of the Dominus', 'Homing Sliver', 'Tooth of Chiss-Goria', 'Zulaport Cutthroat', 'Mana Cylix', 'Frantic Inventory', 'Faithful Mending', 'Abbot of Keral Keep', 'Varragoth, Bloodsky Sire', 'Diffusion Sliver', 'Sangrophage', 'Esper Charm', 'Cleansing Wildfire', 'Abiding Grace', 'Battle Screech', 'Rishadan Dockhand', 'Ob Nixilis, the Fallen', 'Dismal Backwater', 'Horror of the Broken Lands', 'Icehide Golem', 'Ancestral Anger', 'Bala Ged Recovery', 'Woodfall Primus', 'Wildfield Borderpost', 'Pyroclasm', 'Fiery Temper', 'Moon-Circuit Hacker', 'Doomskar Titan', 'Visara the Dreadful', 'Solitary Confinement', 'Logic Knot', 'Spirited Companion', 'Benevolent Bodyguard', 'Elixir of Immortality', 'Rishkar, Peema Renegade', 'Dragonkin Berserker', 'Hymn to Tourach', 'Abundant Harvest', 'Duress', 'Blazing Rootwalla', 'Marwyn, the Nurturer', 'Lava Dart', 'Clifftop Retreat', 'Hythonia the Cruel', 'Llanowar Elves', 'Kjeldoran Outpost', 'Caves of Koilos', 'Keruga, the Macrosage', 'Sword-Point Diplomacy', 'Flame Jab', 'Dread Presence', 'Krark''s Thumb', 'Wayward Guide-Beast', 'Waterfront District', 'Mission Briefing', 'Sylvan Messenger', 'Possibility Storm', 'Fieldmist Borderpost', 'Conclave Mentor', 'Master of the Pearl Trident', 'Mind''s Desire', 'Oni-Cult Anvil', 'Nemesis of Mortals', 'Tendrils of Agony', 'Village Messenger', 'Demigod of Revenge', 'Blazing Shoal', 'Stone Rain', 'Avatar of Woe', 'March of Reckless Joy', 'Porphyry Nodes', 'Voldaren Pariah', 'Old Stickfingers', 'Mystic Monastery', 'Elvish Visionary', 'Cultivate', 'Avatar of Discord', 'Mistveil Plains', 'Viscera Seer', 'Runed Halo', 'Broodstar', 'Elvish Harbinger', 'Extractor Demon', 'Tempered in Solitude', 'Thornglint Bridge', 'Memory Lapse', 'Nephalia Academy', 'Grand Architect', 'Rustvale Bridge', 'Midnight Reaper', 'Kabira Takedown', 'Adanto Vanguard', 'Judge''s Familiar', 'Student of Warfare', 'Day of Judgment', 'Knight of the White Orchid', 'Grimdancer', 'Stern Dismissal', 'Primal Surge', 'Timeless Witness', 'Sundial of the Infinite', 'Vault of the Archangel', 'Search for Tomorrow', 'Tempered Steel', 'Jwari Disruption', 'Glen Elendra Archmage', 'Slip Out the Back', 'Lose Focus', 'Tooth and Nail', 'Fyndhorn Elves', 'Secluded Courtyard', 'Thirst for Knowledge', 'Obstinate Baloth', 'Eternal Dragon', 'Ravenous Chupacabra', 'Fauna Shaman', 'Dovin Baan', 'Oona, Queen of the Fae', 'Kumano Faces Kakkazan', 'Myr Superion', 'Hunted Witness', 'Goblin Bombardment', 'Mire Triton', 'Living Twister', 'Flayer of the Hatebound', 'Emmara, Soul of the Accord', 'Jokulhaups', 'Terramorphic Expanse', 'Cabaretti Courtyard', 'Akoum Hellhound', 'Fertile Ground', 'Jace Beleren', 'Bloodchief''s Thirst', 'Mistvein Borderpost', 'Goblin Trashmaster', 'Heartless Act', 'Conduit of Ruin', 'The Underworld Cookbook', 'Assert Authority', 'Frontier Bivouac', 'Vivid Creek', 'Skirk Ridge Exhumer', 'Sandwurm Convergence', 'Nivmagus Elemental', 'Knight of Infamy', 'Zombie Infestation', 'Ponder', 'Blood Fountain', 'Captured Sunlight', 'Desperate Ravings', 'Tempest Djinn', 'Grumgully, the Generous', 'Vapor Snag', 'Sliver 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, 116.4, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (95.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Seasoned Hallowblade', 'Murderous Redcap', 'Bile Blight', 'Lone Rider', 'Servo Exhibition', 'Unholy Heat', 'Skyclave Shade', 'Barbarian Ring', 'Lavabelly Sliver', 'Bonescythe Sliver', 'Den Protector', 'Tithe Taker', 'Evolving Wilds', 'Fact or Fiction', 'Ranger of Eos', 'Rakdos Headliner', 'Silvergill Adept', 'Merchant of the Vale', 'Touch the Spirit Realm', 'Scale of Chiss-Goria', 'Demonic Dread', 'Fabricate', 'Throes of Chaos', 'Lurching Rotbeast', 'Unesh, Criosphinx Sovereign', 'Promise of Bunrei', 'Temple of Mystery', 'Glimmerpost', 'Joraga Treespeaker', 'Stitch in Time', 'Claim the Firstborn', 'Benevolent Bodyguard', 'Mire Triton', 'Arcus Acolyte', 'Path to the World Tree', 'Arguel''s Blood Fast', 'Shriekmaw', 'Grumgully, the Generous', 'Canyon Slough', 'Vital Splicer', 'Mask of the Mimic', 'Temporal Fissure', 'Assert Authority', 'Skyclave Pick-Axe', 'Mistveil Plains', 'Akrasan Squire', 'Darksteel Colossus', 'Crash Through', 'Circular Logic', 'Hissing Quagmire', 'Nissa''s Chosen', 'Dread Return', 'Fire-Lit Thicket', 'Putrid Goblin', 'Asylum Visitor', 'Acidic Slime', 'Mythos of Brokkos', 'Secluded Courtyard', 'Falkenrath Gorger', 'Hive Stirrings', 'Satyr Wayfinder', 'Veinfire Borderpost', 'Angel of Despair', 'Ashenmoor Gouger', 'Sylvan Library', 'The Bloodsky Massacre', 'Mind''s Desire', 'Plow Under', 'Tyrant''s Scorn', 'Mistvault Bridge', 'Emmara, Soul of the Accord', 'Claws of Gix', 'Moon-Circuit Hacker', 'Scrapheap Scrounger', 'Sphinx of Foresight', 'Signal Pest', 'Serrated Scorpion', 'Woodland Cemetery', 'Improbable Alliance', 'Rootbound Crag', 'Heartless Act', 'Scryb Ranger', 'Phantasmagorian', 'Hotshot Mechanic', 'Firespout', 'Rotting Rats', 'Reliquary Tower', 'Thaumatic Compass', 'Dark Ritual', 'Rune-Scarred Demon', 'Beast Whisperer', 'Fiery Temper', 'Stern Dismissal', 'Kabira Takedown', 'Talisman of Curiosity', 'Netherborn Phalanx', 'Garruk Wildspeaker', 'Sangrophage', 'Squadron Hawk', 'Sire of Insanity', 'Coiling Oracle', 'Clout of the Dominus', 'Rite of Oblivion', 'Hero of Precinct One', 'Decree of Justice', 'Hive Mind', 'Farseek', 'Duress', 'Cathartic Reunion', 'Goblin Bombardment', 'Nezahal, Primal Tide', 'Reap the Past', 'Good-Fortune Unicorn', 'Giant Killer', 'Brokers Hideout', 'Myth Realized', 'Broodstar', 'Ember-Fist Zubera', 'Disenchant', 'Springbloom Druid', 'Gitaxian Probe', 'Izzet Boilerworks', 'Kazuul''s Fury', 'Extractor Demon', 'Greater Gargadon', 'Experimental Synthesizer', 'Flash of Insight', 'Sylvan Advocate', 'Hagra Mauling', 'Jace Beleren', 'Weathered Wayfarer', 'Izzet Charm', 'Porphyry Nodes', 'Archaeomancer', 'Mission Briefing', 'Dovin Baan', 'Conclave Mentor', 'Oblivion Ring', 'Ponder', 'Benalish Marshal', 'Cabaretti Courtyard', 'Day of Judgment', 'Fireblade Artist', 'Voidslime', 'Wildfield Borderpost', 'All Suns'' Dawn', 'Shatterskull Charger', 'Origin Spellbomb', 'Primalcrux', 'Grimdancer', 'Village Messenger', 'Vapor Snag', 'Condemn', 'Sensor Splicer', 'Symbiotic Wurm', 'Tempered Steel', 'Incinerate', 'Slagstorm', 'Cloudcrest Lake', 'Tyrant''s Choice', 'Elvish Visionary', 'Tempered in Solitude', 'Changeling Outcast', 'Lumbering Falls', 'Jwari Disruption', 'Thermo-Alchemist', 'Primal Surge', 'Nature''s Lore', 'Bump in the Night', 'Undead Butler', 'Sunblade Samurai', 'Lose Focus', 'Brave the Elements', 'Search for Tomorrow', 'Edric, Spymaster of Trest', 'Transmogrify', 'Vampire''s Kiss', 'Bedlam Reveler', 'Llanowar Wastes', 'Timeless Witness', 'Tidespout Tyrant', 'Angel of Sanctions', 'Putrid Imp', 'Shalai, Voice of Plenty', 'Voldaren Pariah', 'Foreboding Ruins', 'Crypt of Agadeem', 'Otherworldly Gaze', 'Mizzium Mortars', 'Brushfire Elemental', 'Gideon''s Lawkeeper', 'Fury of the Horde', 'Champion of Wits', 'Blazing Rootwalla', 'Terminus', 'Erebos''s Intervention', 'Blood Fountain', 'Curious Pair', 'Icehide Golem', 'Lyzolda, the Blood Witch', 'Hour of Reckoning', 'Frenetic Sliver', 'Mana Cylix', 'Explore', 'Wall of Omens', 'Stormblood Berserker', 'Sultai Charm', 'Chance Encounter', 'Nested Shambler', 'Howling Mine', 'Mogg War Marshal', 'Crack the Earth', 'Approach of the Second Sun', 'Ultimate Price', 'Stone Rain', 'Memory Lapse', 'Obscura Storefront', 'Mindslaver', 'Zombie Infestation', 'Flame Javelin', 'Cabal Initiate', 'Sparksmith', 'Dismal Backwater', 'Mirran Crusader', 'Nephalia Academy', 'Conflagrate', 'Watcher for Tomorrow', 'Ground Rift', 'Sarkhan the Masterless', 'Healer''s Hawk', 'Pyretic Ritual', 'Grisly Salvage', 'Tendrils of Agony', 'Electrostatic Field', 'Logic Knot', 'Captured Sunlight', 'Porcelain Legionnaire', 'Korlash, Heir to Blackblade', 'Sylvan Primordial', 'Vindicate', 'Slagwoods Bridge', 'Treacherous Blessing', 'Lantern of the Lost', 'Go for the Throat', 'Firewild Borderpost', 'Elves of Deep Shadow', 'Kher Keep', 'Raze the Effigy', 'Eiganjo Castle', 'Coralhelm Commander', 'Deep Forest Hermit', 'Discovery // Dispersal', 'Chromatic Lantern', 'Elvish Archdruid', 'Scorched Rusalka', 'Castigate', 'Dead // Gone', 'Esper Charm', 'Lotleth Troll', 'Outland Liberator', 'Chain Lightning', 'Reflex Sliver', 'Kaya, Ghost Assassin', 'Cosmos Elixir', 'Temple of Silence', 'Hell Mongrel', 'Dragonshift', 'Marwyn, the Nurturer', 'Kazandu Mammoth', 'Chandra, Pyromaster', 'Brainstone', 'Restore Balance', 'Runed Halo', 'Oust', 'General Ferrous Rokiric', 'Sliver Queen', 'Lonis, Cryptozoologist', 'Myr Battlesphere', 'Slitherhead', 'Invader Parasite', 'Archetype of Imagination', 'Temple of Malady', 'Reckless Impulse', 'Sarkhan the Mad', 'Spirited Companion', 'Dauntless Bodyguard', 'Mishra''s Factory', 'Spikefield Hazard', 'Kird Ape', 'Dawn of Hope', 'Qasali Pridemage', 'Gatekeeper of Malakir', 'Glorious End', 'Tide Shaper', 'Sword-Point Diplomacy', 'Metalwork Colossus', 'Arch of Orazca', 'Alchemist''s Gambit', 'Nivmagus Elemental', 'Cleansing Wildfire', 'Floating-Dream Zubera', 'Venom Sliver', 'Zulaport Cutthroat', 'Terramorphic Expanse', 'Gilt-Leaf Archdruid', 'Stormtide Leviathan', 'Harrow', 'Scrap Trawler', 'Sungold Sentinel', 'Arcanis the Omnipotent', 'Maul of the Skyclaves', 'Tendo Ice Bridge', 'Of One Mind', 'Silverblade Paladin', 'Midnight Reaper', 'Silverbluff Bridge', 'Thornglint Bridge', 'Heir of Falkenrath', 'Call of the Conclave', 'Tangleroot', 'Renewed Faith', 'Goblin Ringleader', 'Grapeshot', 'Tower of Calamities', 'Azorius Charm', 'Vivid Marsh', 'Dregscape Sliver', 'Flame Slash', 'Selesnya Charm', 'Forbid', 'Mana Leak', 'Varragoth, Bloodsky Sire', 'Judith, the Scourge Diva', 'Vryn Wingmare', 'Hunted Witness', 'Arrogant Wurm', 'Adanto Vanguard', 'Behold the Multiverse', 'Rustvale Bridge', 'Earthshaker Khenra', 'Restoration Angel', 'Luminarch Ascension', 'Akoum Hellhound', 'Sigil of Valor', 'Buried Ruin', 'Cosima, God of the Voyage', 'Leechridden Swamp', 'Steel Overseer', 'Kari Zev''s Expertise', 'Clifftop Retreat', 'Realm Razer', 'Temur Charm', 'Battle Screech', 'Urza''s Factory', 'Mirror March', 'Court Homunculus', 'Glacial Fortress', 'Detention Sphere', 'Kopala, Warden of Waves', 'Vault of the Archangel', 'Goblin Cratermaker', 'Goblin Chieftain', 'First-Sphere Gargantua', 'Knight of Infamy', 'Everflowing Chalice', 'Sphinx of the Steel Wind', 'Multiple Choice', 'Heliod''s Pilgrim', 'Platinum Angel', 'Sprite Dragon', 'Snowfield Sinkhole', 'Blade Splicer', 'Pyrrhic Revival', 'Lochmere Serpent', 'Tireless Provisioner', 'Desecration Demon', 'Ghoultree', 'Goblin Trashmaster', 'Riverfall Mimic', 'Bloodhall Priest', 'Growth-Chamber Guardian', 'Declaration in Stone', 'Elixir of Immortality', 'Pathrazer of Ulamog', 'Brain Freeze', 'Woodfall Primus', 'Acolyte of Affliction', 'Kitchen Imp', 'Viashino Pyromancer', 'Spell Burst', 'Psychatog', 'Arcane Sanctum', 'Duty-Bound Dead', 'Worldgorger Dragon', 'It That Betrays', 'Verdant Command', 'Mirrodin Besieged', 'Plated Geopede', 'Abbot of Keral Keep', 'Bituminous Blast', 'Master of Death', 'Horror of the Broken Lands', 'Jokulhaups', 'Vivid Crag', 'Endbringer', 'Dormant Sliver', 'Rally the Ancestors', 'Vivid Meadow', 'Assault Strobe', 'Ob Nixilis, the Fallen', 'Painful Truths', 'Elvish Clancaller', 'Wrath of God', 'Scab-Clan Berserker', 'Hypnotic Specter', 'Lavaclaw Reaches', 'Terrarion', 'Immortal Servitude', 'Hornet Queen', 'Sygg, River Cutthroat', 'Sky Hussar', 'Magister of Worth', 'Glen Elendra Archmage', 'Treasure Cruise', 'Kumano Faces Kakkazan', 'Okiba Reckoner Raid', 'Lashwrithe', 'Delver of Secrets', 'Goldmire Bridge', 'Monstrous Carabid', 'Nemesis of Mortals', 'Thirst for Discovery', 'Skemfar Avenger', 'Falkenrath Pit Fighter', 'Feed the Swarm', 'Frontier Bivouac', 'Flayer of the Hatebound', 'Ornithopter', 'Opt', 'Underworld Connections', 'Chain of Plasma', 'Galerider Sliver', 'Crashing Drawbridge', 'Jace, the Living Guildpact', 'Edgewall Innkeeper', 'Tidal Warrior', 'Drowned Catacomb', 'Colossus of Akros', 'Secluded Steppe', 'Cloudpost', 'Enigma Sphinx', 'Blistercoil Weird', 'Tectonic Giant', 'Sign in Blood', 'Mesa Enchantress', 'Swans of Bryn Argoll', 'Tooth of Chiss-Goria', 'Stormchaser Mage', 'Mausoleum Secrets', 'Temple of Epiphany', 'Stitcher''s Graft', 'Seething Song', 'Mesmeric Fiend', 'Rootborn Defenses', 'Repeal', 'Glorybringer', 'Negate', 'Goblin Matron', 'Nevermore', 'Riveteers Overlook', 'Disciple of the Vault', 'Rakdos Cackler', 'Grand Architect', 'Master of the Pearl Trident', 'Seismic Assault', 'Ezuri, Renegade Leader', 'Skirk Prospector', 'Coalition Relic', 'Power Sink', 'Stormfist Crusader', 'Soulherder', 'Kjeldoran Outpost', 'Ravenous Chupacabra', 'Wild Nacatl', 'Orim''s Chant', 'Tyrant of Discord', 'Kami of False Hope', 'Snow-Covered Forest', 'Fireblade Charger', 'Elvish Mystic', 'Tomb of Urami', 'Sleeper Agent', 'Krark''s Thumb', 'Bone Shards', 'Piranha Marsh', 'Goblin Dark-Dwellers', 'Anax, Hardened in the Forge', 'Avaricious Dragon', 'Shriekhorn', 'Wingcrafter', 'Avatar of Discord', 'Blacklance Paragon', 'Darkheart Sliver', 'Eternal Dragon', 'Ionize', 'Lonely Sandbar', 'Shard Volley', 'Rishadan Dockhand', 'Baneful Omen', 'Palace Siege', 'Sleight of Hand', 'Think Twice', 'Needle Spires', 'Virulent Sliver', 'Ghost Quarter', 'The Birth of Meletis', 'Nicol Bolas, Planeswalker', 'Ash Zealot', 'Forgotten Cave', 'Thawing Glaciers', 'Diffusion Sliver', 'Elemental Masterpiece', 'Vampire Nighthawk', 'Nylea''s Presence', 'Rosethorn Acolyte', 'Circle of Confinement', 'Vessel of Nascency', 'Merfolk Mistbinder', 'Blazing Archon', 'Sojourner''s Companion', 'Cloudshift', 'Master Splicer', 'Twisted Abomination', 'Battlefield Forge', 'Llanowar Mentor', 'Advent of the Wurm', 'Shardless Agent', 'Vivid Grove', 'Soul Spike', 'Ashenmoor Liege', 'Dripping-Tongue Zubera', 'Barren Moor', 'Fauna Shaman', 'Unburial Rites', 'Abrade', 'Snow-Covered Mountain', 'Phyrexian Dreadnought', 'Fyndhorn Elves', 'Martyr of Sands', 'Hypergenesis', 'Tymaret, Chosen from Death', 'Waterfront District', 'Gilded Lotus', 'Archetype of Endurance', 'Thought Scour', 'Hythonia the Cruel', 'Imperious Perfect', 'Trinket Mage', 'The Underworld Cookbook', 'Blazing Shoal', 'Ethersworn Sphinx', 'Purphoros''s Intervention', 'Fungus Sliver', 'Ajani, the Greathearted', 'Cursecatcher', 'Bloodchief''s Thirst', 'Rishkar, Peema Renegade', 'Primal Command', 'Pyroclasm', 'Crumbling Necropolis', 'Hymn to Tourach', 'Cultivate', 'Ghitu Lavarunner', 'Mirage Mirror', 'Sundial of the Infinite', 'Demigod of Revenge', 'Revitalize', 'Viscera Seer', 'Arbor Elf', 'Skyclave Cleric', 'Windbrisk Heights', 'Slip Out the Back', 'Ghostly Flicker', 'Skull Prophet', 'Bastion of Remembrance', 'Geomancer''s Gambit', 'Oona, Queen of the Fae', 'Heartless Summoning', 'Unlucky Witness', 'Frantic Search', 'Commit // Memory', 'Sylvan Scrying', 'Stirring Wildwood', 'Michiko''s Reign of Truth', 'Anafenza, Kin-Tree Spirit', 'Voldaren Epicure', 'Colossal Skyturtle', 'Lifecrafter''s Bestiary', 'Doomed Traveler', 'Intangible Virtue', 'Panharmonicon', 'Akroma''s Memorial', 'Commune with the Gods', 'Intruder Alarm', 'Memorial to Glory', 'Kefnet the Mindful', 'Vault Skirge', 'Sandwurm Convergence', 'Sovereign''s Bite', 'Steppe Lynx', 'Dark-Dweller Oracle', 'Champion of the Parish', 'Treasure Hunt', 'Glowspore Shaman', 'Orcish Lumberjack', 'Reinforced Ronin', 'Temple of Malice', 'Thirst for Meaning', 'Silent-Chant Zubera', 'Tanglepool Bridge', 'Unsubstantiate', 'Game Trail', 'Animate Dead', 'Masterful Replication', 'Inevitable Betrayal', 'Flame Rift', 'Desperate Ritual', 'Solitary Confinement', 'Merrow Reejerey', 'Dread Presence', 'Mystic Snake', 'Cloudfin Raptor', 'Possibility Storm', 'Brokers Charm', 'Scythe Leopard', 'Riftwing Cloudskate', 'Memnarch', 'Stromkirk Noble', 'Dream Trawler', 'Avatar of Woe', 'Judge''s Familiar', 'Sunscorched Desert', 'Fieldmist Borderpost', 'Ojutai''s Command', 'Witch''s Cottage', 'Aven Squire', 'Fertile Ground', 'Pia''s Revolution', 'Silundi Vision', 'Abundant Harvest', 'Wonder', 'Homing Sliver', 'Westvale Abbey', 'Invoke Calamity', 'Oversoul of Dusk', 'Bloodbraid Elf', 'Knight of the White Orchid', 'Basking Rootwalla', 'Diabolic Edict', 'Aether Spellbomb', 'Scrap Welder', 'Honor of the Pure', 'Curiosity', 'Deep Analysis', 'Doomskar Titan', 'Mistvein Borderpost', 'Thraben Inspector', 'Silent Arbiter', 'Raven''s Crime', 'Temple of Deceit', 'Gonti, Lord of Luxury', 'Raise the Alarm', 'Bringer of the Green Dawn', 'Swiftwater Cliffs', 'Mirrorshell Crab', 'Navigator''s Compass', 'Snow-Covered Swamp', 'Zetalpa, Primal Dawn', 'Chancellor of the Dross', 'Chief Engineer', 'Warkite Marauder', 'Wandering Mind', 'Living Twister', 'Birds of Paradise', 'Caves of Koilos', 'Firebolt', 'Lava Dart', 'Temple of Enlightenment', 'Drossforge Bridge', 'Thirst for Knowledge', 'Hollowhead Sliver', 'Crackling Drake', 'Llanowar Elves', 'Collective Effort', 'Fire Prophecy', 'White Sun''s Zenith', 'Sandsteppe Citadel', 'Nissa Revane', 'Torrent Sculptor', 'Gavony Township', 'Desperate Ravings', 'Bloodthrone Vampire', 'Conduit of Ruin', 'Field of Ruin', 'Agonizing Remorse', 'Kessig Flamebreather', 'Cathar Commando', 'Dragonkin Berserker', 'Archetype of Finality', 'Dread Fugue', 'Dire Tactics', 'Orzhov Signet', 'Falkenrath Aristocrat', 'Fatal Grudge', 'Bala Ged Recovery', 'Wayward Guide-Beast', 'Maestros Charm', 'Llanowar Tribe', 'Student of Warfare', 'Swarm Shambler', 'Phantasmal Bear', 'Sharuum the Hegemon', 'Ancestral Anger', 'Faithful Mending', 'Abiding Grace', 'Reality Ripple', 'Perilous Research', 'Catch // Release', 'Gemhide Sliver', 'Meteor Golem', 'Rakdos Charm', 'Skophos Reaver', 'Ashen-Skin Zubera', 'Tempered Sliver', 'Mystic Monastery', 'Gideon Jura', 'Myr Superion', 'Tempest Djinn', 'Distended Mindbender', 'Obstinate Baloth', 'Auramancer', 'Joraga Warcaller', 'The Mending of Dominaria', 'Spell Pierce', 'Might Sliver', 'Dryad Militant', 'Seaside Citadel', 'Ethersworn Canonist', 'Justice Strike', 'March of Reckless Joy', 'Frantic Inventory', 'Resurgent Belief', 'Flame Jab', 'Hatching Plans', 'Burst Lightning', 'Wooded Bastion', 'Lodestone Golem', 'Snow-Covered Plains', 'Old Stickfingers', 'Dragonskull Summit', 'Razortide Bridge', 'Avacyn''s Pilgrim', 'Spawning Pool', 'See the Truth', 'Shrapnel Blast', 'Knight of Glory', 'Kiln Fiend', 'Sinister Concoction', 'Frost Walker', 'Moorland Haunt', 'Duskwielder', 'Elvish Harbinger', 'Tooth and Nail', 'Keruga, the Macrosage', 'Retributive Wand', 'Vedalken Shackles', 'Thoughtpicker Witch', 'Sylvan Messenger', 'Dreg Mangler', 'Vivid Creek', 'Hinterland Harbor', 'Buried Alive', 'Rashmi, Eternities Crafter', 'Kodama''s Reach', 'Grave Scrabbler', 'Reckless Waif', 'Visara the Dreadful', 'Soul Snare', 'Mythos of Nethroi', 'Oni-Cult Anvil', 'Skirk Ridge Exhumer'))) 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, 95.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (61.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Sandwurm Convergence', 'Grimdancer', 'Shrieking Affliction', 'Circle of Confinement', 'Opt', 'Fire-Lit Thicket', 'Grave Scrabbler', 'Detention Sphere', 'Talisman of Curiosity', 'Dregscape Sliver', 'Vindicate', 'Silvergill Adept', 'All Suns'' Dawn', 'Conduit of Ruin', 'Foreboding Ruins', 'Disenchant', 'Animation Module', 'Swiftwater Cliffs', 'Possibility Storm', 'Wayward Guide-Beast', 'Search for Tomorrow', 'Clifftop Retreat', 'Startle', 'Stubborn Denial', 'Assert Authority', 'Treasure Cruise', 'Anax, Hardened in the Forge', 'Pyroclasm', 'Okiba Reckoner Raid', 'Spawning Pool', 'Veinfire Borderpost', 'Ranger of Eos', 'Evolving Wilds', 'Dovin Baan', 'Seasoned Hallowblade', 'Putrid Imp', 'Dark Ritual', 'Thirst for Discovery', 'Temple of Epiphany', 'Renewed Faith', 'Hatching Plans', 'Slitherhead', 'Steel Overseer', 'Vapor Snag', 'Nezahal, Primal Tide', 'Mistvein Borderpost', 'Akroma''s Memorial', 'Temple of Enlightenment', 'Liliana Vess', 'Coalition Relic', 'Ionize', 'Skyclave Pick-Axe', 'Pyretic Ritual', 'Thaumatic Compass', 'Myr Battlesphere', 'Throes of Chaos', 'Underworld Connections', 'Touch the Spirit Realm', 'Den Protector', 'Nomad Outpost', 'Dispel', 'Mirror March', 'Lone Rider', 'Blazing Shoal', 'Mesmeric Fiend', 'Lavabelly Sliver', 'Fire Prophecy', 'Mask of the Mimic', 'Bituminous Blast', 'Coralhelm Commander', 'Tireless Provisioner', 'Stromkirk Noble', 'Mirrorshell Crab', 'Cathar Commando', 'Windbrisk Heights', 'Obstinate Baloth', 'Leechridden Swamp', 'Dark Withering', 'Llanowar Elves', 'Slip Out the Back', 'Nylea''s Presence', 'Luminarch Ascension', 'Kunoros, Hound of Athreos', 'Lonely Sandbar', 'Primal Surge', 'Discovery // Dispersal', 'Cloudshift', 'Spell Pierce', 'Oona, Queen of the Fae', 'Irencrag Pyromancer', 'Demigod of Revenge', 'Voldaren Pariah', 'Hissing Quagmire', 'Acidic Slime', 'Falkenrath Pit Fighter', 'Everflowing Chalice', 'Polymorph', 'Martyr of Sands', 'Fire Covenant', 'Seething Song', 'Spell Burst', 'Condemn', 'Spirited Companion', 'Knight of Infamy', 'Temporal Fissure', 'Trickbind', 'Changeling Outcast', 'Diabolic Edict', 'Mind''s Desire', 'Magister of Worth', 'Commune with the Gods', 'Raven''s Crime', 'Shardless Agent', 'Ornithopter', 'Dormant Sliver', 'Rakdos Cackler', 'Go for the Throat', 'Vivid Meadow', 'Tidal Warrior', 'Rakdos Headliner', 'Metalwork Colossus', 'Blistercoil Weird', 'Sunscorched Desert', 'Disciple of the Vault', 'Advent of the Wurm', 'Swarm Shambler', 'Dawn of Hope', 'Day of Judgment', 'Flame Javelin', 'Wrath of God', 'Satyr Wayfinder', 'Solitary Confinement', 'Glacial Fortress', 'Gideon Jura', 'Knight of Glory', 'Crumbling Necropolis', 'Thawing Glaciers', 'Dragonskull Summit', 'Brokers Hideout', 'Platinum Angel', 'Dragonkin Berserker', 'Broodstar', 'Korlash, Heir to Blackblade', 'Bogardan Hellkite', 'Buried Alive', 'Gemhide Sliver', 'Hollowhead Sliver', 'Tide Shaper', 'Lifecrafter''s Bestiary', 'Tower of Calamities', 'Honor of the Pure', 'Aether Spellbomb', 'Merfolk Mistbinder', 'Crack the Earth', 'Sensor Splicer', 'Barbarian Ring', 'Judge''s Familiar', 'Claim the Firstborn', 'Imperious Perfect', 'Arguel''s Blood Fast', 'Scrapheap Scrounger', 'Kira, Great Glass-Spinner', 'Midnight Reaper', 'Mindslaver', 'Abundant Harvest', 'Greater Gargadon', 'Ultimate Price', 'Skirk Ridge Exhumer', 'Springbloom Druid', 'Reliquary Tower', 'Sign in Blood', 'Stern Dismissal', 'Zabaz, the Glimmerwasp', 'Game Trail', 'Rootbound Crag', 'Ravenous Chupacabra', 'Skull Prophet', 'Hive Mind', 'Vivid Creek', 'Spikefield Hazard', 'Duskwielder', 'Bala Ged Recovery', 'Nested Shambler', 'Call the Bloodline', 'Oblivion Ring', 'Torrent Sculptor', 'Behold the Multiverse', 'Hive Stirrings', 'Tyrant''s Choice', 'Justice Strike', 'Witch''s Cottage', 'Elves of Deep Shadow', 'Vryn Wingmare', 'Kabira Takedown', 'Curiosity', 'Deep Forest Hermit', 'Blade Splicer', 'Venom Sliver', 'Ghitu Lavarunner', 'Ghost Quarter', 'Shalai, Voice of Plenty', 'Angel of Sanctions', 'Canyon Slough', 'Nemesis of Mortals', 'Goldmire Bridge', 'Kaya, Ghost Assassin', 'Eternal Dragon', 'Biting Rain', 'Wild Nacatl', 'Buried Ruin', 'Sword-Point Diplomacy', 'Treacherous Blessing', 'Waterfront District', 'Goblin Electromancer', 'Temple of Silence', 'Shriekhorn', 'Porcelain Legionnaire', 'Reveillark', 'Flourishing Fox', 'Magmatic Insight', 'Mana Leak', 'Ashenmoor Gouger', 'Faithful Mending', 'Keruga, the Macrosage', 'Lashwrithe', 'Think Twice', 'Colossus of Akros', 'Hypergenesis', 'Spawning Breath', 'Seismic Assault', 'Thraben Inspector', 'Stormtide Leviathan', 'Lavaclaw Reaches', 'Stirring Wildwood', 'Fury of the Horde', 'Memorial to Glory', 'Gavony Township', 'Glen Elendra Archmage', 'Wooded Bastion', 'Farseek', 'Elvish Mystic', 'Cabal Initiate', 'Mistvault Bridge', 'Hunted Witness', 'Drannith Healer', 'Dark-Dweller Oracle', 'Oni-Cult Anvil', 'Shriekmaw', 'Decree of Justice', 'Sea''s Claim', 'Sarkhan the Masterless', 'Kazandu Mammoth', 'Commit // Memory', 'Kjeldoran Outpost', 'Grim Haruspex', 'Ash Zealot', 'Revitalize', 'Lyzolda, the Blood Witch', 'Scrap Welder', 'The Scorpion God', 'Akoum Hellhound', 'Cloudpost', 'Horror of the Broken Lands', 'Sleeper Agent', 'Hinterland Harbor', 'Ground Rift', 'Dizzy Spell', 'Benevolent Bodyguard', 'Captured Sunlight', 'Circular Logic', 'Emmara, Soul of the Accord', 'Brushfire Elemental', 'Cabaretti Courtyard', 'Zetalpa, Primal Dawn', 'Bloodbraid Elf', 'Rustvale Bridge', 'Runed Halo', 'Bedlam Reveler', 'Flash of Insight', 'Dream Trawler', 'Heliod''s Pilgrim', 'Maestros Charm', 'General Ferrous Rokiric', 'Knight of the White Orchid', 'Myr Superion', 'Chancellor of the Dross', 'Counterflux', 'Realm Razer', 'Reckless Waif', 'Lotleth Troll', 'Sire of Insanity', 'Sphinx of the Steel Wind', 'Curious Pair', 'Arcbound Ravager', 'Merchant of the Vale', 'Mizzium Skin', 'Jace, the Living Guildpact', 'Voidslime', 'Nimble Mongoose', 'Origin Spellbomb', 'Flame Rift', 'Multiple Choice', 'Glorious End', 'Tooth and Nail', 'Distended Mindbender', 'Mystic Snake', 'Blood Fountain', 'Swans of Bryn Argoll', 'Conclave Mentor', 'Spark Spray', 'Snow-Covered Plains', 'Shatterskull Charger', 'Gonti, Lord of Luxury', 'Dauntless Bodyguard', 'Scuttletide', 'Slagstorm', 'Phantasmagorian', 'Hell Mongrel', 'Skophos Reaver', 'Caves of Koilos', 'Scrapyard Recombiner', 'Elvish Archdruid', 'Pathrazer of Ulamog', 'Mizzium Mortars', 'Elemental Masterpiece', 'Primal Command', 'Aven Squire', 'Restore Balance', 'Skyclave Shade', 'Fatal Grudge', 'Heir of Falkenrath', 'Orzhov Signet', 'Asylum Visitor', 'Sandsteppe Citadel', 'Woodland Cemetery', 'Panharmonicon', 'Temple of Deceit', 'Glowspore Shaman', 'Sultai Charm', 'Maul of the Skyclaves', 'Living Twister', 'Unsubstantiate', 'Gatekeeper of Malakir', 'Ojutai''s Command', 'Scab-Clan Berserker', 'Hour of Reckoning', 'Firebrand Archer', 'Thought Scour', 'Negate', 'Forbid', 'Birds of Paradise', 'Brainstone', 'Lingering Mirage', 'Dimir Aqueduct', 'Hymn to Tourach', 'Old Stickfingers', 'Dreg Mangler', 'Temple of Malady', 'Snow-Covered Forest', 'The Birth of Meletis', 'First-Sphere Gargantua', 'Phyrexian Dreadnought', 'Endbringer', 'Fiery Temper', 'Anafenza, Kin-Tree Spirit', 'Kird Ape', 'Marwyn, the Nurturer', 'Cut // Ribbons', 'Temple of Malice', 'Urza''s Factory', 'Frenetic Sliver', 'Lonis, Cryptozoologist', 'Thornglint Bridge', 'Bastion of Remembrance', 'Razortide Bridge', 'Silent Submersible', 'Temple of Mystery', 'Shrapnel Blast', 'Vampire''s Kiss', 'Sylvan Library', 'Hero of Precinct One', 'Obliterate', 'Village Messenger', 'Nevermore', 'Tempered Sliver', 'Rosethorn Acolyte', 'Vital Splicer', 'Galerider Sliver', 'Desecration Demon', 'Delver of Secrets', 'Champion of the Parish', 'Imposing Vantasaur', 'Goblin Dark-Dwellers', 'Basking Rootwalla', 'Plow Under', 'Mesa Enchantress', 'Sarkhan the Mad', 'Trinket Mage', 'Monstrous Carabid', 'Deep Analysis', 'Merrow Reejerey', 'Tectonic Reformation', 'Chain Lightning', 'Moorland Haunt', 'Sinister Concoction', 'Oversoul of Dusk', 'Dismal Backwater', 'Mishra''s Factory', 'Fieldmist Borderpost', 'Blackmail', 'Thirst for Knowledge', 'Kessig Flamebreather', 'Vedalken Shackles', 'Obsessive Search', 'Blacklance Paragon', 'Glimmerpost', 'Silverbluff Bridge', 'Perilous Research', 'Throne of Geth', 'Nivmagus Elemental', 'Extractor Demon', 'Worldgorger Dragon', 'Chief Engineer', 'Expansion // Explosion', 'Howling Mine', 'Viashino Pyromancer', 'Champion of Wits', 'Scrap Trawler', 'Snowfield Sinkhole', 'Izzet Charm', 'Silent Arbiter', 'Mirage Mirror', 'Kefnet the Mindful', 'Good-Fortune Unicorn', 'Mistveil Plains', 'Sprite Dragon', 'Tempest Djinn', 'Dragonstorm', 'Serrated Scorpion', 'Promise of Bunrei', 'Secluded Steppe', 'Cultivate', 'Tyrant of Discord', 'Tempered in Solitude', 'Heartless Act', 'Purphoros''s Intervention', 'Master of Death', 'Lightning Rift', 'Glorybringer', 'Earthshaker Khenra', 'Zulaport Cutthroat', 'Sygg, River Cutthroat', 'Gideon''s Lawkeeper', 'Thirst for Meaning', 'Reality Ripple', 'Battle Screech', 'Heartfire Immolator', 'Sangrophage', 'Nissa Revane', 'Bonescythe Sliver', 'Blazing Rootwalla', 'Gaea''s Will', 'Frontier Bivouac', 'Collective Effort', 'Radiant Scrollwielder', 'Anguished Unmaking', 'Tendo Ice Bridge', 'Master of the Pearl Trident', 'Oust', 'Lava Dart', 'Vampire Nighthawk', 'Growth-Chamber Guardian', 'Heartless Summoning', 'Firebolt', 'Selesnya Charm', 'Retributive Wand', 'Fauna Shaman', 'Dread Presence', 'Colossal Skyturtle', 'Sunblade Samurai', 'Needle Spires', 'Rune-Scarred Demon', 'Alchemist''s Gambit', 'Sylvan Primordial', 'Myth Realized', 'See the Truth', 'Gitaxian Probe', 'Reckless Impulse', 'Crypt of Agadeem', 'Hagra Mauling', 'Twisted Abomination', 'Outland Liberator', 'Cathartic Reunion', 'Ethersworn Canonist', 'Reflex Sliver', 'Goblin Bombardment', 'Tithe Taker', 'Diffusion Sliver', 'Scorched Rusalka', 'Explore', 'Moritte of the Frost', 'Tyrant''s Scorn', 'Garruk Wildspeaker', 'Angel of Despair', 'Kami of False Hope', 'Westvale Abbey', 'Wildfield Borderpost', 'Wonder', 'Incinerate', 'Reap the Past', 'Approach of the Second Sun', 'Drowned Catacomb', 'Frantic Search', 'Lochmere Serpent', 'Chromatic Lantern', 'Erebos''s Intervention', 'Wild Cantor', 'Chandra, Pyromaster', 'Benalish Marshal', 'Acolyte of Affliction', 'Kumano Faces Kakkazan', 'Orim''s Chant', 'Vault of the Archangel', 'Sojourner''s Companion', 'Bump in the Night', 'Gilded Lotus', 'Mythos of Brokkos', 'Primalcrux', 'Shredded Sails', 'Flame Jab', 'The Bloodsky Massacre', 'Mogg War Marshal', 'Krark''s Thumb', 'Sleight of Hand', 'Virulent Sliver', 'Fireblade Charger', 'Bile Blight', 'Arbor Elf', 'Palace Siege', 'Jokulhaups', 'Brimstone Dragon', 'Claws of Gix', 'Skyclave Cleric', 'Darksteel Ingot', 'Tidespout Tyrant', 'Disallow', 'Firewild Borderpost', 'Declaration in Stone', 'Cleansing Wildfire', 'Restoration Angel', 'Experimental Synthesizer', 'Transmogrify', 'Jace Beleren', 'Rishkar, Peema Renegade', 'Kher Keep', 'Profane Procession', 'It That Betrays', 'Grand Architect', 'Brain Freeze', 'Feed the Swarm', 'Tanglepool Bridge', 'Intangible Virtue', 'Fabricate', 'Bloodhall Priest', 'Seaside Citadel', 'Tezzeret''s Gambit', 'Scale of Chiss-Goria', 'Ethersworn Sphinx', 'Grisly Salvage', 'Cosima, God of the Voyage', 'Otherworldly Gaze', 'Abbot of Keral Keep', 'Qasali Pridemage', 'Wall of Omens', 'Dark Intimations', 'Stitcher''s Graft', 'Edric, Spymaster of Trest', 'Tymaret, Chosen from Death', 'Murderous Cut', 'Elixir of Immortality', 'Reinforced Ronin', 'Lurching Rotbeast', 'Watcher for Tomorrow', 'Joraga Warcaller', 'Might Sliver', 'Sigarda''s Splendor', 'Lose Focus', 'Vivid Grove', 'Drossforge Bridge', 'Mire Triton', 'Mission Briefing', 'Edgewall Innkeeper', 'Falkenrath Aristocrat', 'Avaricious Dragon', 'Sigil of Valor', 'Hornet Queen', 'Cosmos Elixir', 'Power Depot', 'Piranha Marsh', 'Woodfall Primus', 'Sylvan Scrying', 'Memnarch', 'Eiganjo Castle', 'Flame Slash', 'Drannith Stinger', 'Nature''s Lore', 'Power Sink', 'The Underworld Cookbook', 'Jace, Memory Adept', 'Jwari Disruption', 'Grapeshot', 'Timeless Witness', 'Soul Spike', 'Archetype of Endurance', 'White Sun''s Zenith', 'Splendor Mare', 'Arcus Acolyte', 'Beast Whisperer', 'Soul Snare', 'Pyrrhic Revival', 'Ashenmoor Liege', 'Mythos of Nethroi', 'Animate Dead', 'Darkheart Sliver', 'Burst Lightning', 'Vivid Marsh', 'Lumbering Falls', 'Tectonic Giant', 'Ponder', 'Dryad Militant', 'Fact or Fiction', 'Avacyn''s Pilgrim', 'Avatar of Woe', 'Duty-Bound Dead', 'Ancient Stirrings', 'Rootborn Defenses', 'Sharuum the Hegemon', 'Master Splicer', 'Cloudcrest Lake', 'Catch // Release', 'Azorius Charm', 'Kiln Fiend', 'Barren Moor', 'Resurgent Belief', 'Porphyry Nodes', 'Elvish Harbinger', 'Tendrils of Agony', 'Tangleroot', 'Elvish Visionary', 'Stone Rain', 'Thermo-Alchemist', 'Sliver Queen', 'Stormblood Berserker', 'Brokers Charm', 'Repeal', 'Vessel of Nascency', 'Esper Charm', 'Flayer of the Hatebound', 'Chance Encounter', 'Arcane Sanctum', 'Silverblade Paladin', 'Raging Ravine', 'Dead // Gone', 'Voldaren Epicure', 'Call of the Conclave', 'Enigma Sphinx', 'Fungus Sliver', 'March of Reckless Joy', 'Kitchen Imp', 'Chief of the Foundry', 'Crashing Drawbridge', 'Castigate', 'Invoke Calamity', 'Healer''s Hawk', 'Fertile Ground', 'Avatar of Discord', 'Go for Blood', 'Sylvan Advocate', 'Mirran Crusader', 'Akrasan Squire', 'Mirrodin Besieged', 'Terramorphic Expanse', 'Sundial of the Infinite', 'Iron Apprentice', 'Agonizing Remorse', 'Painful Truths', 'Sovereign''s Bite', 'Nissa''s Chosen', 'Secluded Courtyard', 'Obscura Charm', 'Cursecatcher', 'Netherborn Phalanx', 'Hypnotic Specter', 'Riveteers Overlook', 'Sphinx of Foresight', 'Dread Fugue', 'Brave the Elements', 'Arcbound Worker', 'Joraga Treespeaker', 'Snow-Covered Mountain', 'Duress', 'Crash Through', 'Silundi Vision', 'Doomskar Titan', 'Voltaic Servant', 'Memory Lapse', 'Terrarion', 'Izzet Boilerworks', 'Mobilized District', 'Harrow', 'Kodama''s Reach', 'Pia''s Revolution', 'Zurgo Bellstriker', 'Terminus', 'Assault Strobe', 'Harbinger of the Tides', 'Rakdos Charm', 'Darksteel Colossus', 'Kari Zev''s Expertise', 'Raise the Alarm', 'Unburial Rites', 'Tooth of Chiss-Goria', 'Geomancer''s Gambit', 'Frantic Inventory', 'Path to the World Tree', 'Kazuul''s Fury', 'Electrostatic Field', 'Bone Shards', 'Mausoleum Secrets', 'Sylvan Messenger', 'Ajani, the Greathearted', 'Orcish Lumberjack', 'Llanowar Wastes', 'Forgotten Cave', 'Ghoultree', 'Unlucky Witness', 'Bloodchief''s Thirst', 'Smallpox', 'Giant Killer', 'Arch of Orazca', 'Hythonia the Cruel', 'Doomed Traveler', 'Judith, the Scourge Diva', 'Rishadan Dockhand', 'Lodestone Golem', 'Obscura Storefront', 'Undead Butler', 'Masterful Replication', 'Battlefield Forge', 'Vivid Crag', 'Demonic Dread', 'Zombie Infestation', 'Fyndhorn Elves', 'Rotting Rats', 'Intruder Alarm', 'Skemfar Avenger', 'Scythe Leopard', 'Desperate Ritual', 'Unesh, Criosphinx Sovereign', 'Auramancer', 'Zenith Flare', 'Homing Sliver', 'Adanto Vanguard', 'Mystic Monastery', 'Psychatog', 'Viscera Seer', 'Field of Ruin', 'Coiling Oracle', 'Raze the Effigy', 'Lantern of the Lost', 'Tomb of Urami', 'Abrade', 'Sungold Sentinel', 'Dread Return', 'Abiding Grace', 'Fireblade Artist', 'Llanowar Mentor', 'Falkenrath Gorger', 'Rashmi, Eternities Crafter', 'Arrogant Wurm', 'Nicol Bolas, Planeswalker', 'Slagwoods Bridge', 'Treasure Hunt', 'Plated Geopede', 'Darigaaz Reincarnated', 'Karn''s Bastion', 'Snow-Covered Swamp', 'Ancestral Anger', 'Verdant Command', 'Wandering Mind', 'Logic Knot', 'Steppe Lynx', 'Llanowar Tribe'))) 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, 61.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (90.9 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Jace, Memory Adept', 'Woodfall Primus', 'Touch the Spirit Realm', 'Bedlam Reveler', 'Plow Under', 'Silent Arbiter', 'Grand Architect', 'Fire Covenant', 'Vault of the Archangel', 'Mystic Snake', 'Voidslime', 'Rashmi, Eternities Crafter', 'Anafenza, Kin-Tree Spirit', 'Feed the Swarm', 'Revitalize', 'Perilous Research', 'Akoum Hellhound', 'Skyclave Shade', 'Sarkhan the Mad', 'Sandsteppe Citadel', 'Rustvale Bridge', 'Dispel', 'Tooth of Chiss-Goria', 'Goblin Bombardment', 'Doomskar Titan', 'Tireless Provisioner', 'Ojutai''s Command', 'Sultai Charm', 'Blade Splicer', 'Game Trail', 'Shrieking Affliction', 'Seething Song', 'Discovery // Dispersal', 'Nicol Bolas, Planeswalker', 'Fertile Ground', 'Magmatic Insight', 'Wayward Guide-Beast', 'Lurching Rotbeast', 'Scrap Trawler', 'Frontier Bivouac', 'Grapeshot', 'Power Depot', 'Justice Strike', 'Duty-Bound Dead', 'Bloodchief''s Thirst', 'Cathar Commando', 'Wildfield Borderpost', 'Horror of the Broken Lands', 'Hive Stirrings', 'Kaya, Ghost Assassin', 'Nemesis of Mortals', 'Living Twister', 'Cosmos Elixir', 'Joraga Treespeaker', 'Circle of Confinement', 'Knight of Glory', 'Sovereign''s Bite', 'Arch of Orazca', 'Silvergill Adept', 'Mythos of Brokkos', 'The Scorpion God', 'Scrap Welder', 'Fiery Temper', 'Detention Sphere', 'Smallpox', 'Rakdos Cackler', 'Lumbering Falls', 'Rotting Rats', 'Delver of Secrets', 'Sylvan Primordial', 'Temple of Mystery', 'Gonti, Lord of Luxury', 'Tomb of Urami', 'Wonder', 'Kiln Fiend', 'Slagwoods Bridge', 'Nivmagus Elemental', 'Liliana Vess', 'Merfolk Mistbinder', 'Origin Spellbomb', 'Enigma Sphinx', 'Mirrodin Besieged', 'Evolving Wilds', 'Lantern of the Lost', 'Kher Keep', 'Slip Out the Back', 'Sign in Blood', 'Bogardan Hellkite', 'Profane Procession', 'Demonic Dread', 'Darksteel Colossus', 'Maul of the Skyclaves', 'Raging Ravine', 'Solitary Confinement', 'Tezzeret''s Gambit', 'Sleight of Hand', 'Ashenmoor Gouger', 'Buried Ruin', 'Outland Liberator', 'Sky Hussar', 'Falkenrath Pit Fighter', 'Ionize', 'Tectonic Reformation', 'Might Sliver', 'Unesh, Criosphinx Sovereign', 'Silent Submersible', 'Nylea''s Presence', 'Assert Authority', 'Sojourner''s Companion', 'Mizzium Skin', 'Edric, Spymaster of Trest', 'Arbor Elf', 'Hornet Queen', 'Sword-Point Diplomacy', 'Restore Balance', 'Explore', 'Abiding Grace', 'Sire of Insanity', 'Mythos of Nethroi', 'Lone Rider', 'Memorial to Glory', 'Den Protector', 'Secluded Steppe', 'Otherworldly Gaze', 'Myr Superion', 'Mask of the Mimic', 'Sarkhan the Masterless', 'Mobilized District', 'Master Splicer', 'Monstrous Carabid', 'Thirst for Discovery', 'Dream Trawler', 'Cultivate', 'Avaricious Dragon', 'Obscura Storefront', 'Tyrant''s Scorn', 'Adanto Vanguard', 'Elemental Masterpiece', 'Repeal', 'Timeless Witness', 'Sylvan Scrying', 'Glacial Fortress', 'Changeling Outcast', 'Coralhelm Commander', 'Pathrazer of Ulamog', 'Kabira Takedown', 'Lava Dart', 'It That Betrays', 'Wrath of God', 'Elvish Harbinger', 'Master of the Pearl Trident', 'Expansion // Explosion', 'Sphinx of the Steel Wind', 'Bump in the Night', 'Fyndhorn Elves', 'Scuttletide', 'Tendrils of Agony', 'Duskwielder', 'Myr Battlesphere', 'Korlash, Heir to Blackblade', 'Lose Focus', 'Runed Halo', 'Irencrag Pyromancer', 'Mistvault Bridge', 'Skophos Reaver', 'Flash of Insight', 'Iron Apprentice', 'Brushfire Elemental', 'Deep Forest Hermit', 'Zombie Infestation', 'Sungold Sentinel', 'Avacyn''s Pilgrim', 'Llanowar Wastes', 'Kumano Faces Kakkazan', 'Trinket Mage', 'Spirited Companion', 'Heartfire Immolator', 'Negate', 'Sunscorched Desert', 'March of Reckless Joy', 'Lochmere Serpent', 'Spell Burst', 'Invoke Calamity', 'Raise the Alarm', 'Midnight Reaper', 'Disenchant', 'Snow-Covered Swamp', 'Dregscape Sliver', 'Tectonic Giant', 'Primal Surge', 'General Ferrous Rokiric', 'Platinum Angel', 'Scale of Chiss-Goria', 'Sygg, River Cutthroat', 'Extractor Demon', 'Grisly Salvage', 'Fatal Grudge', 'Needle Spires', 'Shalai, Voice of Plenty', 'Mausoleum Secrets', 'Woodland Cemetery', 'Brimstone Dragon', 'Zenith Flare', 'Dark Withering', 'Tooth and Nail', 'Glorious End', 'Esper Charm', 'Crack the Earth', 'Darigaaz Reincarnated', 'Skyclave Cleric', 'Lavabelly Sliver', 'Asylum Visitor', 'Glowspore Shaman', 'Silverblade Paladin', 'Sunblade Samurai', 'Brave the Elements', 'Painful Truths', 'Dread Fugue', 'Orzhov Signet', 'Harbinger of the Tides', 'Windbrisk Heights', 'Galerider Sliver', 'Qasali Pridemage', 'Thornglint Bridge', 'Crumbling Necropolis', 'Falkenrath Gorger', 'Doomed Traveler', 'Blistercoil Weird', 'Wild Cantor', 'Chromatic Lantern', 'Lightning Rift', 'Mystic Monastery', 'Flame Javelin', 'Howling Mine', 'Blazing Shoal', 'Familiar''s Ruse', 'Vivid Crag', 'Duress', 'Tempered Sliver', 'Bastion of Remembrance', 'Zulaport Cutthroat', 'Collective Effort', 'Knight of Infamy', 'Memory Lapse', 'Obliterate', 'Sigarda''s Splendor', 'Distended Mindbender', 'Hypergenesis', 'Stormblood Berserker', 'Coalition Relic', 'Chain Lightning', 'Martyr of Sands', 'Snowfield Sinkhole', 'Sprite Dragon', 'Purphoros''s Intervention', 'Vivid Meadow', 'Razortide Bridge', 'Magister of Worth', 'Elvish Archdruid', 'Silundi Vision', 'Wandering Mind', 'Abundant Harvest', 'Stern Dismissal', 'Mission Briefing', 'Azorius Charm', 'Ground Rift', 'Marwyn, the Nurturer', 'Power Sink', 'Watcher for Tomorrow', 'Karn''s Bastion', 'Fireblade Charger', 'Shatterskull Charger', 'Netherborn Phalanx', 'Mirrorshell Crab', 'Mirage Mirror', 'Scythe Leopard', 'Slitherhead', 'Polymorph', 'Benevolent Bodyguard', 'Reveillark', 'Nature''s Lore', 'Raven''s Crime', 'Sundial of the Infinite', 'Tendo Ice Bridge', 'Dead // Gone', 'Conclave Mentor', 'Lavaclaw Reaches', 'Colossus of Akros', 'Garruk Wildspeaker', 'Anax, Hardened in the Forge', 'Tide Shaper', 'Restoration Angel', 'Ravenous Chupacabra', 'Eternal Dragon', 'Erebos''s Intervention', 'Stormtide Leviathan', 'Imperious Perfect', 'Sphinx of Foresight', 'Fungus Sliver', 'Mirror March', 'Vindicate', 'Kird Ape', 'Piranha Marsh', 'Radiant Scrollwielder', 'Rishkar, Peema Renegade', 'Moritte of the Frost', 'Dragonskull Summit', 'Startle', 'Izzet Charm', 'Trickbind', 'Retributive Wand', 'Giant Killer', 'Lonely Sandbar', 'Broodstar', 'Hinterland Harbor', 'Mind''s Desire', 'Chancellor of the Dross', 'Kazuul''s Fury', 'Mesmeric Fiend', 'Cosima, God of the Voyage', 'Ethersworn Sphinx', 'Unlucky Witness', 'Acidic Slime', 'Palace Siege', 'Mistvein Borderpost', 'Chance Encounter', 'Swarm Shambler', 'Drowned Catacomb', 'Llanowar Mentor', 'Bala Ged Recovery', 'Tanglepool Bridge', 'Temple of Malady', 'Arrogant Wurm', 'Ponder', 'Secluded Courtyard', 'Hissing Quagmire', 'Rakdos Headliner', 'Thirst for Meaning', 'Dormant Sliver', 'Jace Beleren', 'Fury of the Horde', 'Alchemist''s Gambit', 'Conduit of Ruin', 'Fireblade Artist', 'Tithe Taker', 'Porcelain Legionnaire', 'Murderous Cut', 'Wooded Bastion', 'Honor of the Pure', 'Nissa Revane', 'Stirring Wildwood', 'Goblin Dark-Dwellers', 'Phantasmagorian', 'Scrapheap Scrounger', 'Advent of the Wurm', 'Witch''s Cottage', 'Rishadan Dockhand', 'The Underworld Cookbook', 'Oona, Queen of the Fae', 'Thaumatic Compass', 'Scorched Rusalka', 'Crackleburr', 'Good-Fortune Unicorn', 'Aven Squire', 'Flourishing Fox', 'Crypt of Agadeem', 'The Birth of Meletis', 'Basking Rootwalla', 'Hunted Witness', 'Disciple of the Vault', 'Rakdos Charm', 'Abbot of Keral Keep', 'Nezahal, Primal Tide', 'Village Messenger', 'Crashing Drawbridge', 'Mishra''s Factory', 'Kessig Flamebreather', 'Battlefield Forge', 'Springbloom Druid', 'Diffusion Sliver', 'Kunoros, Hound of Athreos', 'Ob Nixilis, the Fallen', 'Reinforced Ronin', 'Sensor Splicer', 'Reflex Sliver', 'Barrin, Tolarian Archmage', 'Curious Pair', 'Dismal Backwater', 'Keruga, the Macrosage', 'Sharuum the Hegemon', 'Spawning Breath', 'Unsubstantiate', 'Shredded Sails', 'Heartless Summoning', 'Crash Through', 'Commit // Memory', 'Temple of Malice', 'Blazing Rootwalla', 'Putrid Imp', 'Frantic Search', 'Kazandu Mammoth', 'Fauna Shaman', 'Foreboding Ruins', 'Shardless Agent', 'Dizzy Spell', 'Intangible Virtue', 'Tempered in Solitude', 'Reap the Past', 'Cut // Ribbons', 'Electrostatic Field', 'Agonizing Remorse', 'Endbringer', 'Dread Return', 'Arcane Sanctum', 'Tower of Calamities', 'Greater Gargadon', 'Throne of Geth', 'Bituminous Blast', 'Dragonstorm', 'Shriekhorn', 'Veinfire Borderpost', 'Pyretic Ritual', 'Sinister Concoction', 'Beast Whisperer', 'Tangleroot', 'Day of Judgment', 'Skyclave Pick-Axe', 'Glorybringer', 'Bone Shards', 'Grimdancer', 'Virulent Sliver', 'Brainstone', 'Venom Sliver', 'Heartless Act', 'Everflowing Chalice', 'Shrapnel Blast', 'Soul Spike', 'Orim''s Chant', 'Dawn of Hope', 'Gitaxian Probe', 'Flayer of the Hatebound', 'Oni-Cult Anvil', 'Porphyry Nodes', 'Dragonkin Berserker', 'Zetalpa, Primal Dawn', 'Goblin Electromancer', 'Zurgo Bellstriker', 'See the Truth', 'Desecration Demon', 'Hour of Reckoning', 'Spawning Pool', 'Snow-Covered Plains', 'Deep Analysis', 'Hymn to Tourach', 'Demigod of Revenge', 'Sandwurm Convergence', 'Vryn Wingmare', 'Spell Pierce', 'Plated Geopede', 'Steppe Lynx', 'Merchant of the Vale', 'Okiba Reckoner Raid', 'Drossforge Bridge', 'Auramancer', 'Rosethorn Acolyte', 'Firewild Borderpost', 'Kodama''s Reach', 'Skemfar Avenger', 'Emmara, Soul of the Accord', 'Vital Splicer', 'Logic Knot', 'Brokers Charm', 'Animation Module', 'Wake Thrasher', 'Primalcrux', 'Hatching Plans', 'Transmogrify', 'Tidal Warrior', 'Llanowar Tribe', 'Homing Sliver', 'Harrow', 'Kefnet the Mindful', 'Blackmail', 'Heir of Falkenrath', 'Mirran Crusader', 'Cabaretti Courtyard', 'Sea''s Claim', 'Torrent Sculptor', 'Lodestone Golem', 'Stromkirk Noble', 'Fire-Lit Thicket', 'Resurgent Belief', 'Blood Fountain', 'Avatar of Woe', 'Tempest Djinn', 'Riveteers Overlook', 'Gideon Jura', 'Lotleth Troll', 'Anguished Unmaking', 'Promise of Bunrei', 'Dark Ritual', 'Viscera Seer', 'Vedalken Shackles', 'Obscura Charm', 'Geomancer''s Gambit', 'Izzet Boilerworks', 'Akrasan Squire', 'Bloodhall Priest', 'Assault Strobe', 'Fabricate', 'Swans of Bryn Argoll', 'Westvale Abbey', 'Terminus', 'Luminarch Ascension', 'Urza''s Factory', 'Champion of Wits', 'Caves of Koilos', 'Mogg War Marshal', 'Stitcher''s Graft', 'Firebolt', 'Thawing Glaciers', 'Varragoth, Bloodsky Sire', 'Hive Mind', 'Dovin Baan', 'Leechridden Swamp', 'Tyrant''s Choice', 'Obsessive Search', 'Gavony Township', 'Nested Shambler', 'Joraga Warcaller', 'Nomad Outpost', 'Eiganjo Castle', 'Lashwrithe', 'Verdant Command', 'Gemhide Sliver', 'Pyrrhic Revival', 'Ethersworn Canonist', 'Captured Sunlight', 'Glen Elendra Archmage', 'Fire Prophecy', 'Curiosity', 'Jwari Disruption', 'Fieldmist Borderpost', 'Phyrexian Dreadnought', 'Cloudcrest Lake', 'Master of Death', 'Talisman of Curiosity', 'Declaration in Stone', 'Kitchen Imp', 'Aether Spellbomb', 'Kami of False Hope', 'Cloudshift', 'Cabal Initiate', 'Arcbound Ravager', 'Myth Realized', 'Reality Ripple', 'Abrade', 'Dryad Militant', 'Forgotten Cave', 'Gatekeeper of Malakir', 'Ancient Stirrings', 'Hero of Precinct One', 'Twisted Abomination', 'Orcish Lumberjack', 'Gilded Lotus', 'Bloodbraid Elf', 'Darksteel Ingot', 'Vivid Creek', 'Snow-Covered Forest', 'Tidespout Tyrant', 'Reckless Impulse', 'Reckless Waif', 'Ghitu Lavarunner', 'Ultimate Price', 'White Sun''s Zenith', 'Lingering Mirage', 'Archetype of Endurance', 'Grim Haruspex', 'Champion of the Parish', 'Seismic Assault', 'Cleansing Wildfire', 'Drannith Stinger', 'Nissa''s Chosen', 'Reliquary Tower', 'Gaea''s Will', 'Multiple Choice', 'Realm Razer', 'Buried Alive', 'Voldaren Epicure', 'Krark''s Thumb', 'Arcus Acolyte', 'Faithful Mending', 'Commune with the Gods', 'Old Stickfingers', 'Raze the Effigy', 'Edgewall Innkeeper', 'Dark Intimations', 'Clifftop Retreat', 'Condemn', 'Bile Blight', 'Voldaren Pariah', 'Oversoul of Dusk', 'Satyr Wayfinder', 'Tymaret, Chosen from Death', 'Shriekmaw', 'Metalwork Colossus', 'Mana Leak', 'Benalish Marshal', 'Psychatog', 'Thraben Inspector', 'Judge''s Familiar', 'Akroma''s Memorial', 'Chief of the Foundry', 'Oust', 'Claim the Firstborn', 'Vampire Nighthawk', 'Cursecatcher', 'Ghoultree', 'Rootborn Defenses', 'Fact or Fiction', 'Decree of Justice', 'Ranger of Eos', 'Brokers Hideout', 'Kari Zev''s Expertise', 'Waterfront District', 'Selesnya Charm', 'Healer''s Hawk', 'Bonescythe Sliver', 'Mire Triton', 'Seasoned Hallowblade', 'Lifecrafter''s Bestiary', 'Ash Zealot', 'Path to the World Tree', 'Jokulhaups', 'Vampire''s Kiss', 'Serrated Scorpion', 'Snow-Covered Mountain', 'Brain Freeze', 'Temple of Deceit', 'Frenetic Sliver', 'Call of the Conclave', 'Hollowhead Sliver', 'Scrapyard Recombiner', 'Renewed Faith', 'Heliod''s Pilgrim', 'Dread Presence', 'Elvish Mystic', 'Think Twice', 'Voltaic Servant', 'Arcbound Worker', 'Tradewind Rider', 'Zabaz, the Glimmerwasp', 'All Suns'' Dawn', 'Sylvan Library', 'Unburial Rites', 'Swiftwater Cliffs', 'Sylvan Messenger', 'Spikefield Hazard', 'Call the Bloodline', 'Stone Rain', 'Nimble Mongoose', 'Jace, the Living Guildpact', 'Frantic Inventory', 'Maestros Charm', 'Sangrophage', 'Sleeper Agent', 'Go for the Throat', 'Darkheart Sliver', 'Steel Overseer', 'Birds of Paradise', 'Mizzium Mortars', 'Treasure Cruise', 'Worldgorger Dragon', 'Avatar of Discord', 'Firebrand Archer', 'Kjeldoran Outpost', 'Terrarion', 'Pia''s Revolution', 'Seaside Citadel', 'Approach of the Second Sun', 'Scab-Clan Berserker', 'Thermo-Alchemist', 'Ornithopter', 'Treasure Hunt', 'Oblivion Ring', 'Grave Scrabbler', 'Treacherous Blessing', 'Barren Moor', 'Pyroclasm', 'Hythonia the Cruel', 'Masterful Replication', 'Temple of Silence', 'First-Sphere Gargantua', 'Arguel''s Blood Fast', 'Thirst for Knowledge', 'Undead Butler', 'Incinerate', 'Temple of Epiphany', 'Claws of Gix', 'Chief Engineer', 'Possibility Storm', 'Barbarian Ring', 'Spark Spray', 'Flame Rift', 'Splendor Mare', 'Judith, the Scourge Diva', 'Mindslaver', 'Knight of the White Orchid', 'Mistveil Plains', 'Vapor Snag', 'Mesa Enchantress', 'Goldmire Bridge', 'Falkenrath Aristocrat', 'Panharmonicon', 'Nevermore', 'Ajani, the Greathearted', 'Rune-Scarred Demon', 'Dark-Dweller Oracle', 'Cloudpost', 'Growth-Chamber Guardian', 'Counterflux', 'Angel of Sanctions', 'Ghost Quarter', 'Cathartic Reunion', 'Go for Blood', 'Elves of Deep Shadow', 'Experimental Synthesizer', 'Coiling Oracle', 'Ancestral Anger', 'Acolyte of Affliction', 'Burst Lightning', 'Gideon''s Lawkeeper', 'Flame Slash', 'Wild Nacatl', 'Diabolic Edict', 'Temple of Enlightenment', 'Soul Snare', 'Sigil of Valor', 'Skirk Ridge Exhumer', 'Slagstorm', 'Blacklance Paragon', 'Battle Screech', 'Canyon Slough', 'Castigate', 'Tyrant of Discord', 'Biting Rain', 'Obstinate Baloth', 'Llanowar Elves', 'Primal Command', 'Rootbound Crag', 'Colossal Skyturtle', 'Kira, Great Glass-Spinner', 'Circular Logic', 'The Bloodsky Massacre', 'Merrow Reejerey', 'Ashenmoor Liege', 'Terramorphic Expanse', 'Dimir Aqueduct', 'Silverbluff Bridge', 'Earthshaker Khenra', 'Wall of Omens', 'Animate Dead', 'Vessel of Nascency', 'Elvish Visionary', 'Hell Mongrel', 'Lonis, Cryptozoologist', 'Forbid', 'Farseek', 'Temporal Fissure', 'Opt', 'Angel of Despair', 'Search for Tomorrow', 'Viashino Pyromancer', 'Skull Prophet', 'Underworld Connections', 'Thought Scour', 'Hagra Mauling', 'Hypnotic Specter', 'Ghostly Pilferer', 'Dauntless Bodyguard', 'Chandra, Pyromaster', 'Vivid Marsh', 'Grimoire Thief', 'Catch // Release', 'Drannith Healer', 'Dreg Mangler', 'Sliver Queen', 'Imposing Vantasaur', 'Glimmerpost', 'Vivid Grove', 'Intruder Alarm', 'Throes of Chaos', 'Sylvan Advocate', 'Lyzolda, the Blood Witch', 'Desperate Ritual', 'Flame Jab', 'Behold the Multiverse', 'Elixir of Immortality', 'Moorland Haunt', 'Stubborn Denial', 'Field of Ruin', 'Disallow', 'Memnarch'))) 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, 90.9, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (83.1 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Power Sink', 'Woodland Cemetery', 'Homing Sliver', 'Mythos of Brokkos', 'Dovin Baan', 'Edgewall Innkeeper', 'Wild Cantor', 'Llanowar Wastes', 'Drannith Healer', 'Zulaport Cutthroat', 'Lotleth Troll', 'It That Betrays', 'Mistveil Plains', 'Arcus Acolyte', 'Ponder', 'Countervailing Winds', 'Bile Blight', 'Myr Retriever', 'Rosethorn Acolyte', 'Wild Nacatl', 'Sphinx of Foresight', 'Reap the Past', 'Sphinx''s Tutelage', 'Pathrazer of Ulamog', 'Voldaren Pariah', 'Abundant Harvest', 'Kira, Great Glass-Spinner', 'Arcbound Worker', 'Kunoros, Hound of Athreos', 'Cosmos Elixir', 'Cathar Commando', 'Plow Under', 'Skirk Ridge Exhumer', 'Mesmeric Fiend', 'Wrath of God', 'Skyclave Shade', 'Faerie Vandal', 'Wandering Mind', 'Merchant of the Vale', 'Honor of the Pure', 'Scrapyard Recombiner', 'Chromatic Lantern', 'Darksteel Ingot', 'Arbor Elf', 'Krark''s Thumb', 'Ethereal Haze', 'Gonti, Lord of Luxury', 'See the Truth', 'Sojourner''s Companion', 'Nomad Outpost', 'Day of Judgment', 'The Scorpion God', 'Grapeshot', 'Fact or Fiction', 'Oust', 'Harrow', 'Timeless Witness', 'Rune-Scarred Demon', 'Ground Rift', 'Coalition Relic', 'Call of the Conclave', 'Go for Blood', 'Waterfront District', 'Sylvan Scrying', 'Think Twice', 'Kumano Faces Kakkazan', 'Eiganjo Castle', 'Terramorphic Expanse', 'Valiant Rescuer', 'Dread Fugue', 'Bloodchief''s Thirst', 'Broodstar', 'Spell Burst', 'Wonder', 'Fireblade Artist', 'Ethersworn Canonist', 'Sky Hussar', 'Dark-Dweller Oracle', 'Lumbering Falls', 'Duskwielder', 'Swans of Bryn Argoll', 'Bogardan Hellkite', 'Reckless Impulse', 'Blazing Shoal', 'Runed Halo', 'Dark Intimations', 'Field of Ruin', 'Dryad Militant', 'Kami of False Hope', 'Bala Ged Recovery', 'Ravenous Chupacabra', 'Bone Shards', 'Lashwrithe', 'Tide Shaper', 'Urza''s Factory', 'Nissa Revane', 'Akrasan Squire', 'Howling Mine', 'Dizzy Spell', 'Thirst for Meaning', 'Drossforge Bridge', 'Profane Procession', 'Cleansing Wildfire', 'Hypnotic Specter', 'Lone Rider', 'Obscura Charm', 'Bump in the Night', 'Perilous Research', 'Vivid Creek', 'Voidslime', 'Coiling Oracle', 'Stone Rain', 'Blistercoil Weird', 'Falkenrath Pit Fighter', 'Mirrorshell Crab', 'Llanowar Mentor', 'Incinerate', 'Fyndhorn Elves', 'Vault of the Archangel', 'Painful Truths', 'Ancient Stirrings', 'Leechridden Swamp', 'Mirrodin Besieged', 'Lose Focus', 'Ancestral Anger', 'Temple of Enlightenment', 'Torrent Sculptor', 'Arrogant Wurm', 'Animation Module', 'Spirited Companion', 'Silent Arbiter', 'The Bloodsky Massacre', 'Brokers Charm', 'Raging Ravine', 'Spikefield Hazard', 'Nemesis of Mortals', 'Primal Surge', 'Realm Razer', 'Unburial Rites', 'Skophos Reaver', 'Mystic Monastery', 'Drowned Catacomb', 'Myth Realized', 'Purphoros''s Intervention', 'Altar of the Brood', 'Bonescythe Sliver', 'Sarkhan the Mad', 'Flame Slash', 'Sliver Queen', 'Thraben Inspector', 'Shalai, Voice of Plenty', 'Nested Shambler', 'Scythe Leopard', 'Knight of Glory', 'Murderous Cut', 'Kari Zev''s Expertise', 'Changeling Outcast', 'Lurching Rotbeast', 'Flame Javelin', 'Scale of Chiss-Goria', 'Chancellor of the Dross', 'Lyzolda, the Blood Witch', 'Dragonskull Summit', 'Ethersworn Sphinx', 'Spawning Pool', 'Wooded Bastion', 'Reality Ripple', 'Viashino Pyromancer', 'Condemn', 'Keruga, the Macrosage', 'Snow-Covered Forest', 'Tendrils of Agony', 'Gideon''s Lawkeeper', 'Conduit of Ruin', 'Jwari Disruption', 'Fiery Temper', 'Promise of Bunrei', 'Kodama''s Reach', 'Temple of Malady', 'Heartless Summoning', 'Irencrag Pyromancer', 'Snow-Covered Swamp', 'Goblin Electromancer', 'Alchemist''s Gambit', 'Festival Crasher', 'Lonis, Cryptozoologist', 'Dregscape Sliver', 'Vivid Marsh', 'Brainstone', 'Stromkirk Noble', 'Earthshaker Khenra', 'Dread Presence', 'Tempered in Solitude', 'Brave the Elements', 'Sign in Blood', 'Garruk Wildspeaker', 'Intangible Virtue', 'Den Protector', 'Primal Command', 'Frenetic Sliver', 'Razortide Bridge', 'Bloodbraid Elf', 'Snow-Covered Mountain', 'Marwyn, the Nurturer', 'Shredded Sails', 'Decree of Justice', 'Restoration Angel', 'Heir of Falkenrath', 'Mizzium Mortars', 'Dreg Mangler', 'Ash Zealot', 'Tanglepool Bridge', 'Sleight of Hand', 'Tangleroot', 'Anafenza, Kin-Tree Spirit', 'Glorious End', 'Nivmagus Elemental', 'Putrid Imp', 'Skull Prophet', 'Sylvan Advocate', 'Hollowhead Sliver', 'Dispel', 'Dark Ritual', 'Sigil of Valor', 'Tezzeret''s Gambit', 'Worldgorger Dragon', 'Avaricious Dragon', 'Glimmerpost', 'Treasure Cruise', 'Curious Pair', 'Silverblade Paladin', 'Enigma Sphinx', 'Biting Rain', 'Mogg War Marshal', 'Myr Superion', 'Psychatog', 'Farseek', 'Shrapnel Blast', 'Rishkar, Peema Renegade', 'Needle Spires', 'Ranger of Eos', 'General Ferrous Rokiric', 'Unsubstantiate', 'Elvish Mystic', 'Crack the Earth', 'Dawn Charm', 'Arguel''s Blood Fast', 'Mistvein Borderpost', 'Metalwork Colossus', 'Darigaaz Reincarnated', 'Archetype of Endurance', 'Forgotten Cave', 'Kessig Flamebreather', 'Imposing Vantasaur', 'Unesh, Criosphinx Sovereign', 'Tithe Taker', 'Sovereign''s Bite', 'Duress', 'Vedalken Shackles', 'Distended Mindbender', 'Eternal Dragon', 'Luminarch Ascension', 'Stormblood Berserker', 'Rashmi, Eternities Crafter', 'The Underworld Cookbook', 'Splendor Mare', 'Commune with the Gods', 'Angel of Sanctions', 'Barrin, Tolarian Archmage', 'Shriekhorn', 'Darkheart Sliver', 'Mind''s Desire', 'Anax, Hardened in the Forge', 'Sunscorched Desert', 'Porcelain Legionnaire', 'Ashenmoor Gouger', 'Acolyte of Affliction', 'Holy Day', 'Undead Butler', 'Repeal', 'Secluded Steppe', 'Cathartic Pyre', 'Mirror March', 'Old Stickfingers', 'Flash of Insight', 'Reckless Charge', 'Kird Ape', 'Grim Haruspex', 'Feed the Swarm', 'Crashing Drawbridge', 'Tooth and Nail', 'Knight of Infamy', 'Wildfield Borderpost', 'Akoum Hellhound', 'Obstinate Baloth', 'Diffusion Sliver', 'Mistvault Bridge', 'Knight of the White Orchid', 'Treasure Hunt', 'Silent Submersible', 'Tomb of Urami', 'Benevolent Bodyguard', 'Windbrisk Heights', 'Kabira Takedown', 'Village Messenger', 'Blacklance Paragon', 'Watcher for Tomorrow', 'Hatching Plans', 'Lightning Rift', 'Shrieking Affliction', 'Bloodhall Priest', 'Fungus Sliver', 'Dormant Sliver', 'Midnight Reaper', 'Blackmail', 'Sygg, River Cutthroat', 'Flourishing Fox', 'Tidal Warrior', 'Tradewind Rider', 'Jace, the Living Guildpact', 'Polymorph', 'Orcish Lumberjack', 'Fireblade Charger', 'Tyrant''s Scorn', 'Captured Sunlight', 'Detention Sphere', 'Explore', 'Fire Prophecy', 'Reliquary Tower', 'Circle of Confinement', 'Joraga Treespeaker', 'Brain Freeze', 'Rakdos Headliner', 'Temple Bell', 'Talisman of Curiosity', 'Seaside Citadel', 'Auramancer', 'Iron Apprentice', 'Wake Thrasher', 'Akroma''s Memorial', 'Doomed Traveler', 'Hinterland Harbor', 'Battle Screech', 'Cosima, God of the Voyage', 'Flayer of the Hatebound', 'Wayward Guide-Beast', 'Reinforced Ronin', 'Silverbluff Bridge', 'Monstrous Carabid', 'Cathartic Reunion', 'Dark Withering', 'Orim''s Chant', 'Blazing Rootwalla', 'Serrated Scorpion', 'Fieldmist Borderpost', 'Elemental Masterpiece', 'Master of the Pearl Trident', 'Gavony Township', 'Flame Rift', 'Buried Alive', 'Aven Squire', 'Tempered Sliver', 'Okiba Reckoner Raid', 'Temporal Fissure', 'Maestros Charm', 'Tectonic Reformation', 'Sigarda''s Splendor', 'Mizzium Skin', 'Master of Death', 'Zabaz, the Glimmerwasp', 'Caves of Koilos', 'Benalish Marshal', 'Fatal Grudge', 'Vessel of Nascency', 'Fertile Ground', 'Izzet Boilerworks', 'Throne of Geth', 'Primalcrux', 'Stormtide Leviathan', 'Gideon Jura', 'Porphyry Nodes', 'Terminus', 'Search for Tomorrow', 'Dream Trawler', 'Greater Gargadon', 'Witching Well', 'Ultimate Price', 'Imperious Perfect', 'Abrade', 'Glacial Fortress', 'Reckoner''s Bargain', 'Drannith Stinger', 'Giant Killer', 'Cabal Initiate', 'Nimble Mongoose', 'Deep Forest Hermit', 'Evolving Wilds', 'Firebrand Archer', 'Karn''s Bastion', 'Skyclave Pick-Axe', 'Crypt of Agadeem', 'Jace, Memory Adept', 'Curiosity', 'Wall of Omens', 'Sundial of the Infinite', 'Temple of Malice', 'Phyrexian Dreadnought', 'Sword-Point Diplomacy', 'Sangrophage', 'Elvish Harbinger', 'Treacherous Blessing', 'Azorius Charm', 'Rishadan Dockhand', 'Arch of Orazca', 'Sensor Splicer', 'Steppe Lynx', 'Hypergenesis', 'Vivid Grove', 'Sire of Insanity', 'Erebos''s Intervention', 'Blade Splicer', 'Trickbind', 'Phantasmagorian', 'Dread Return', 'Sandsteppe Citadel', 'Moritte of the Frost', 'Tower of Calamities', 'Scrap Welder', 'The Birth of Meletis', 'Resurgent Belief', 'Gitaxian Probe', 'Assault Strobe', 'Varragoth, Bloodsky Sire', 'Fabricate', 'Thaumatic Compass', 'Demonic Dread', 'Glorybringer', 'Abbot of Keral Keep', 'Commit // Memory', 'Izzet Charm', 'Brimstone Dragon', 'Soul Snare', 'Dauntless Bodyguard', 'Good-Fortune Unicorn', 'Netherborn Phalanx', 'Gaea''s Will', 'Master Splicer', 'Transmogrify', 'Nissa''s Chosen', 'Gemhide Sliver', 'Behold the Multiverse', 'Vital Splicer', 'Arcbound Ravager', 'Opt', 'Demigod of Revenge', 'Pyroclasm', 'Doomskar Titan', 'Sleeper Agent', 'Power Depot', 'Woodfall Primus', 'Memorial to Glory', 'Stitcher''s Graft', 'Sea''s Claim', 'Scorched Rusalka', 'Oblivion Ring', 'Gilded Lotus', 'Hour of Reckoning', 'Call the Bloodline', 'Temple of Deceit', 'Tectonic Giant', 'Tymaret, Chosen from Death', 'Magmatic Insight', 'Piranha Marsh', 'Falkenrath Gorger', 'Thought Scour', 'Thirst for Knowledge', 'Origin Spellbomb', 'Approach of the Second Sun', 'Mythos of Nethroi', 'Claim the Firstborn', 'Otherworldly Gaze', 'Faithful Mending', 'Hymn to Tourach', 'Negate', 'Bituminous Blast', 'Hornet Queen', 'Acidic Slime', 'Reveillark', 'Viscera Seer', 'Temple of Epiphany', 'Temple of Mystery', 'Grand Architect', 'Voldaren Epicure', 'Basking Rootwalla', 'Arcane Sanctum', 'Satyr Wayfinder', 'Lavaclaw Reaches', 'Disenchant', 'Lantern of the Lost', 'Dawn of Hope', 'Experimental Synthesizer', 'Heartless Act', 'Hagra Mauling', 'First-Sphere Gargantua', 'Colossal Skyturtle', 'Bastion of Remembrance', 'Mausoleum Secrets', 'Darksteel Colossus', 'Healer''s Hawk', 'Ghitu Lavarunner', 'Obscura Storefront', 'Possibility Storm', 'Pia''s Revolution', 'Dead // Gone', 'Cabaretti Courtyard', 'Canyon Slough', 'Zombie Infestation', 'Dragonkin Berserker', 'Sultai Charm', 'Memnarch', 'All Suns'' Dawn', 'Touch the Spirit Realm', 'Horror of the Broken Lands', 'Sylvan Messenger', 'Frantic Inventory', 'Muddle the Mixture', 'Glen Elendra Archmage', 'Scab-Clan Berserker', 'Esper Charm', 'Hissing Quagmire', 'Crumbling Necropolis', 'Grisly Salvage', 'Adanto Vanguard', 'Westvale Abbey', 'Champion of the Parish', 'Mana Leak', 'Harbinger of the Tides', 'Circular Logic', 'Joraga Warcaller', 'Merfolk Mistbinder', 'Brokers Hideout', 'Mirage Mirror', 'Ob Nixilis, the Fallen', 'Seething Song', 'Lingering Mirage', 'Tyrant of Discord', 'Myr Battlesphere', 'Slagstorm', 'Skyclave Cleric', 'Scuttletide', 'Kiln Fiend', 'Silvergill Adept', 'Growth-Chamber Guardian', 'Orzhov Signet', 'Stern Dismissal', 'Spell Pierce', 'Asylum Visitor', 'Mobilized District', 'Kjeldoran Outpost', 'Pillage', 'Lifecrafter''s Bestiary', 'Gatekeeper of Malakir', 'Scrap Trawler', 'Goblin Dark-Dwellers', 'Solitary Confinement', 'Rootbound Crag', 'Outland Liberator', 'Panharmonicon', 'Lochmere Serpent', 'Kefnet the Mindful', 'Soul Spike', 'Folio of Fancies', 'Elves of Deep Shadow', 'Tireless Provisioner', 'Veinfire Borderpost', 'Moorland Haunt', 'Judith, the Scourge Diva', 'Buried Ruin', 'Hunted Witness', 'Stubborn Denial', 'Foreboding Ruins', 'Pyrrhic Revival', 'Dragonstorm', 'Go for the Throat', 'Angel of Despair', 'Sprite Dragon', 'Thermo-Alchemist', 'Qasali Pridemage', 'Heliod''s Pilgrim', 'Raise the Alarm', 'Sunblade Samurai', 'Reflex Sliver', 'Lonely Sandbar', 'Llanowar Elves', 'Tendo Ice Bridge', 'Snowfield Sinkhole', 'Mishra''s Factory', 'Crash Through', 'Oni-Cult Anvil', 'Skyscribing', 'Magister of Worth', 'Disciple of the Vault', 'Fire Covenant', 'Cloudpost', 'White Sun''s Zenith', 'Sphinx of the Steel Wind', 'Slip Out the Back', 'Vampire''s Kiss', 'Palace Siege', 'Desperate Ritual', 'Korlash, Heir to Blackblade', 'Seasoned Hallowblade', 'Avatar of Woe', 'Plated Geopede', 'Tidespout Tyrant', 'Claws of Gix', 'Raven''s Crime', 'Startle', 'March of Reckless Joy', 'Twinflame', 'Catch // Release', 'Elixir of Immortality', 'Conclave Mentor', 'Venom Sliver', 'Kaya, Ghost Assassin', 'Endbringer', 'Mindslaver', 'Bedlam Reveler', 'Nevermore', 'Castigate', 'Selesnya Charm', 'Hive Stirrings', 'Cut // Ribbons', 'Sandwurm Convergence', 'Path to the World Tree', 'Anguished Unmaking', 'Spawning Breath', 'Aether Spellbomb', 'Oversoul of Dusk', 'Goblin Bombardment', 'Lodestone Golem', 'Vryn Wingmare', 'Kher Keep', 'Shriekmaw', 'Temple of Silence', 'Fauna Shaman', 'Merrow Reejerey', 'Masterful Replication', 'Rustvale Bridge', 'Rakdos Charm', 'Chandra, Pyromaster', 'Raze the Effigy', 'Nicol Bolas, Planeswalker', 'Cloudshift', 'Shardless Agent', 'Might Sliver', 'Birds of Paradise', 'Chief Engineer', 'Liliana Vess', 'Cloudcrest Lake', 'Dimir Aqueduct', 'Skemfar Avenger', 'Maul of the Skyclaves', 'Lava Dart', 'Shatterskull Charger', 'Swarm Shambler', 'Swiftwater Cliffs', 'Voltaic Servant', 'Expansion // Explosion', 'Chain Lightning', 'Ashenmoor Liege', 'Desecration Demon', 'Tyrant''s Choice', 'Restore Balance', 'Clifftop Retreat', 'Terrarion', 'Falkenrath Aristocrat', 'Steel Overseer', 'Familiar''s Ruse', 'Seismic Assault', 'Silundi Vision', 'Colossus of Akros', 'Unlucky Witness', 'Nezahal, Primal Tide', 'Grimoire Thief', 'Judge''s Familiar', 'Abiding Grace', 'Barren Moor', 'Chance Encounter', 'Glowspore Shaman', 'Kazandu Mammoth', 'Barbarian Ring', 'Vampire Nighthawk', 'Blood Fountain', 'Agonizing Remorse', 'Logic Knot', 'Elvish Visionary', 'Emmara, Soul of the Accord', 'Ghost Quarter', 'Living Twister', 'Underworld Connections', 'Avacyn''s Pilgrim', 'Frantic Search', 'Brushfire Elemental', 'Spark Spray', 'Hell Mongrel', 'Edric, Spymaster of Trest', 'Fury of the Horde', 'Obliterate', 'Electrostatic Field', 'Diabolic Edict', 'Coralhelm Commander', 'Ajani, the Greathearted', 'Ghitu Encampment', 'Stirring Wildwood', 'Zetalpa, Primal Dawn', 'Sarkhan the Masterless', 'Vapor Snag', 'Dismal Backwater', 'Tooth of Chiss-Goria', 'Intruder Alarm', 'Trinket Mage', 'Twisted Abomination', 'Game Trail', 'Jokulhaups', 'Kazuul''s Fury', 'Lavabelly Sliver', 'Thornglint Bridge', 'Pyretic Ritual', 'Riveteers Overlook', 'Jace Beleren', 'Hythonia the Cruel', 'Vivid Crag', 'Secluded Courtyard', 'Mystic Snake', 'Rakdos Cackler', 'Rotting Rats', 'Sharuum the Hegemon', 'Virulent Sliver', 'Sylvan Primordial', 'Grimdancer', 'Avatar of Discord', 'Mirran Crusader', 'Justice Strike', 'Slagwoods Bridge', 'Mission Briefing', 'Geomancer''s Gambit', 'Fire-Lit Thicket', 'Discovery // Dispersal', 'Ghostly Pilferer', 'Chief of the Foundry', 'Delver of Secrets', 'Platinum Angel', 'Animate Dead', 'Firewild Borderpost', 'Retributive Wand', 'Verdant Command', 'Zurgo Bellstriker', 'Everflowing Chalice', 'Forbid', 'Smallpox', 'Firebolt', 'Martyr of Sands', 'Throes of Chaos', 'Zenith Flare', 'Slitherhead', 'Rootborn Defenses', 'Declaration in Stone', 'Ionize', 'Nature''s Lore', 'Multiple Choice', 'Heartfire Immolator', 'Springbloom Druid', 'Sungold Sentinel', 'Ojutai''s Command', 'Deep Analysis', 'Vindicate', 'Memory Lapse', 'Tempest Djinn', 'Collective Effort', 'Sylvan Library', 'Nylea''s Presence', 'Oona, Queen of the Fae', 'Invoke Calamity', 'Frontier Bivouac', 'Renewed Faith', 'Thawing Glaciers', 'Battlefield Forge', 'Reckless Waif', 'Goldmire Bridge', 'Ghoultree', 'Vivid Meadow', 'Tribute Mage', 'Cultivate', 'Mask of the Mimic', 'Llanowar Tribe', 'Revitalize', 'Kitchen Imp', 'Extractor Demon', 'Mire Triton', 'Champion of Wits', 'Galerider Sliver', 'Witch''s Cottage', 'Scrapheap Scrounger', 'Mesa Enchantress', 'Counterflux', 'Beast Whisperer', 'Hive Mind', 'Thirst for Discovery', 'Snow-Covered Plains', 'Assert Authority', 'Cursecatcher', 'Obsessive Search', 'Duty-Bound Dead', 'Ornithopter', 'Grave Scrabbler', 'Hero of Precinct One', 'Radiant Scrollwielder', 'Flame Jab', 'Crackleburr', 'Burst Lightning', 'Disallow', 'Elvish Archdruid', 'Sinister Concoction', 'Advent of the Wurm'))) 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, 83.1, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (64.5 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Tyrant of Discord', 'Thraben Inspector', 'Shrieking Affliction', 'Wandering Mind', 'Monstrous Carabid', 'Maul of the Skyclaves', 'Raven''s Crime', 'Unesh, Criosphinx Sovereign', 'Kari Zev''s Expertise', 'Fungus Sliver', 'Obliterate', 'Heir of Falkenrath', 'Glorious End', 'Stormtide Leviathan', 'Tymaret, Chosen from Death', 'Piranha Marsh', 'Abundant Harvest', 'Undead Butler', 'Rune-Scarred Demon', 'Kird Ape', 'Ravenous Chupacabra', 'Perilous Research', 'Lose Focus', 'Nature''s Lore', 'Akoum Hellhound', 'Good-Fortune Unicorn', 'Silverbluff Bridge', 'Vivid Creek', 'Tezzeret''s Gambit', 'Electrostatic Field', 'Extractor Demon', 'Call the Bloodline', 'Assert Authority', 'Nevermore', 'Heliod''s Pilgrim', 'Ultimate Price', 'Wake Thrasher', 'Brave the Elements', 'Fiery Temper', 'Coralhelm Commander', 'Magister of Worth', 'Ghoultree', 'Thirst for Knowledge', 'Tower of Calamities', 'Invoke Calamity', 'Sword-Point Diplomacy', 'Vapor Snag', 'Fieldmist Borderpost', 'Scorched Rusalka', 'Firebrand Archer', 'Pyrrhic Revival', 'Merrow Reejerey', 'Acolyte of Affliction', 'Snow-Covered Swamp', 'Tangleroot', 'The Bloodsky Massacre', 'Goldmire Bridge', 'Basking Rootwalla', 'Falkenrath Aristocrat', 'Sandsteppe Citadel', 'Bituminous Blast', 'Thirst for Discovery', 'Pyroclasm', 'Darigaaz Reincarnated', 'Sigarda''s Splendor', 'Razortide Bridge', 'Vivid Meadow', 'Giant Ox', 'Hotshot Mechanic', 'Masterful Replication', 'Opt', 'Lonely Sandbar', 'Gideon Jura', 'Springbloom Druid', 'Disciple of the Vault', 'Endbringer', 'Temple of Epiphany', 'Realm Razer', 'Rakdos Headliner', 'Obstinate Baloth', 'Nemesis of Mortals', 'Brimstone Dragon', 'Kira, Great Glass-Spinner', 'Palace Siege', 'Selesnya Charm', 'Abrade', 'Multiple Choice', 'Silverblade Paladin', 'Asylum Visitor', 'Everflowing Chalice', 'Tidal Warrior', 'Dimir Aqueduct', 'Jwari Disruption', 'Power Depot', 'Mirror March', 'Broodstar', 'Arcbound Worker', 'Murderous Cut', 'Thaumatic Compass', 'Duty-Bound Dead', 'Kazuul''s Fury', 'Mission Briefing', 'Secluded Courtyard', 'Seething Song', 'Vessel of Nascency', 'Hatching Plans', 'Hymn to Tourach', 'Flourishing Fox', 'Rashmi, Eternities Crafter', 'Profane Procession', 'Dreg Mangler', 'Shalai, Voice of Plenty', 'Heartless Act', 'Dark Withering', 'Timeless Witness', 'Chance Encounter', 'Cathartic Reunion', 'Soul Spike', 'Skull Prophet', 'Kiln Fiend', 'Goblin Bombardment', 'Beast Whisperer', 'Skirk Ridge Exhumer', 'Elemental Masterpiece', 'Zabaz, the Glimmerwasp', 'Diabolic Edict', 'Rootborn Defenses', 'Lodestone Golem', 'Akroma''s Memorial', 'Goblin Dark-Dwellers', 'Adanto Vanguard', 'Sky Hussar', 'Woodfall Primus', 'Tempest Djinn', 'Scrapyard Recombiner', 'Heartfire Immolator', 'White Sun''s Zenith', 'Unburial Rites', 'Plated Geopede', 'Runed Halo', 'Nissa''s Chosen', 'Possibility Storm', 'Scrap Welder', 'Vindicate', 'Firewild Borderpost', 'Grisly Salvage', 'Garruk Wildspeaker', 'Torrent Sculptor', 'Snow-Covered Plains', 'Tomb of Urami', 'Sungold Sentinel', 'Path to the World Tree', 'Brute Suit', 'Plow Under', 'Imposing Vantasaur', 'Howling Mine', 'Erebos''s Intervention', 'Needle Spires', 'Intangible Virtue', 'Witch''s Cottage', 'Caves of Koilos', 'Hinterland Harbor', 'Hissing Quagmire', 'Sarkhan the Masterless', 'Scale of Chiss-Goria', 'Circular Logic', 'Glowspore Shaman', 'Dawn Charm', 'Vivid Crag', 'Mana Leak', 'Advent of the Wurm', 'Sphinx''s Tutelage', 'Abiding Grace', 'Hypnotic Specter', 'Temple of Deceit', 'Merchant of the Vale', 'Healer''s Hawk', 'Holy Day', 'Mindslaver', 'Elvish Harbinger', 'Wildfield Borderpost', 'Go for Blood', 'Faerie Vandal', 'Flame Jab', 'Elvish Visionary', 'Gatekeeper of Malakir', 'Ash Zealot', 'Stormblood Berserker', 'Slagstorm', 'Virulent Sliver', 'Hypergenesis', 'Knight of Infamy', 'Think Twice', 'Hunted Witness', 'Putrid Imp', 'Slitherhead', 'Nylea''s Presence', 'Wooded Bastion', 'Underworld Connections', 'Treasure Cruise', 'Retributive Wand', 'Ajani, the Greathearted', 'Mind''s Desire', 'Scythe Leopard', 'Blood Fountain', 'Master of the Pearl Trident', 'Snow-Covered Mountain', 'Mythos of Nethroi', 'Reckless Charge', 'Steel Overseer', 'Kjeldoran Outpost', 'Flash of Insight', 'Mistvein Borderpost', 'Earthshaker Khenra', 'Avatar of Discord', 'Maestros Charm', 'Barren Moor', 'Alchemist''s Gambit', 'Temple of Malady', 'General Ferrous Rokiric', 'Knight of Glory', 'Llanowar Mentor', 'Falkenrath Gorger', 'Giant Killer', 'Temple of Enlightenment', 'Cursecatcher', 'Wild Cantor', 'Logic Knot', 'Seasoned Hallowblade', 'Grand Architect', 'Moorland Haunt', 'Barrin, Tolarian Archmage', 'Lavaclaw Reaches', 'Orcish Lumberjack', 'Repeal', 'Agonizing Remorse', 'Pillage', 'Prodigy''s Prototype', 'Crashing Drawbridge', 'Unsubstantiate', 'Dark Intimations', 'Silvergill Adept', 'Ob Nixilis, the Fallen', 'Hythonia the Cruel', 'Wayward Guide-Beast', 'Drowned Catacomb', 'Crumbling Necropolis', 'Thirst for Meaning', 'Vivid Grove', 'Rustvale Bridge', 'Psychatog', 'Fauna Shaman', 'Myr Retriever', 'Declaration in Stone', 'Imperious Perfect', 'Mirrorshell Crab', 'Discovery // Dispersal', 'Restore Balance', 'Jace, Memory Adept', 'Trickbind', 'Wall of Omens', 'Vivid Marsh', 'Secluded Steppe', 'Ancestral Anger', 'Dread Return', 'Satyr Wayfinder', 'Cathartic Pyre', 'Woodland Cemetery', 'Bile Blight', 'Raze the Effigy', 'Jace Beleren', 'Dread Fugue', 'Restoration Angel', 'Claim the Firstborn', 'Voldaren Pariah', 'Nivmagus Elemental', 'Ghost Quarter', 'Spark Spray', 'Urza''s Factory', 'Goblin Electromancer', 'Orim''s Chant', 'Sundial of the Infinite', 'Evolving Wilds', 'Obscura Storefront', 'All Suns'' Dawn', 'Chromatic Lantern', 'Tribute Mage', 'Korlash, Heir to Blackblade', 'Panharmonicon', 'Obsessive Search', 'Kunoros, Hound of Athreos', 'Colossal Skyturtle', 'Mystic Monastery', 'Hive Stirrings', 'Demonic Dread', 'Village Messenger', 'Orzhov Signet', 'Raging Ravine', 'Netherborn Phalanx', 'Darksteel Colossus', 'Rishadan Dockhand', 'Zombie Infestation', 'Den Protector', 'Wild Nacatl', 'Desecration Demon', 'Gonti, Lord of Luxury', 'Might Sliver', 'Expansion // Explosion', 'Burst Lightning', 'Waterfront District', 'Enigma Sphinx', 'Glen Elendra Archmage', 'Skyscribing', 'Ornithopter', 'Brain Freeze', 'Tanglepool Bridge', 'Justice Strike', 'Sylvan Scrying', 'Counterflux', 'Disenchant', 'Tithe Taker', 'Oblivion Ring', 'Fury of the Horde', 'Mesa Enchantress', 'Krark''s Thumb', 'Trinket Mage', 'Thawing Glaciers', 'Cosima, God of the Voyage', 'Talisman of Curiosity', 'Living Twister', 'Zurgo Bellstriker', 'Elves of Deep Shadow', 'Demigod of Revenge', 'Crack the Earth', 'Shrapnel Blast', 'Forgotten Cave', 'Anax, Hardened in the Forge', 'Clifftop Retreat', 'Blistercoil Weird', 'Renewed Faith', 'Kodama''s Reach', 'Catch // Release', 'Memorial to Glory', 'Sarkhan the Mad', 'Incinerate', 'Spikefield Hazard', 'Kefnet the Mindful', 'Origin Spellbomb', 'Fatal Grudge', 'Lifecrafter''s Bestiary', 'Brokers Charm', 'Primal Command', 'Castigate', 'Glacial Fortress', 'Duress', 'Fire Prophecy', 'Twisted Abomination', 'Mishra''s Factory', 'Sleight of Hand', 'Eternal Dragon', 'Nested Shambler', 'Dizzy Spell', 'Tyrant''s Scorn', 'Mirrodin Besieged', 'Dragonskull Summit', 'Rootbound Crag', 'Birds of Paradise', 'Kazandu Mammoth', 'Faithful Mending', 'Diffusion Sliver', 'Muddle the Mixture', 'Battlefield Forge', 'Steppe Lynx', 'Temporal Fissure', 'Reckless Impulse', 'Dawn of Hope', 'Mesmeric Fiend', 'Judith, the Scourge Diva', 'Porcelain Legionnaire', 'Grave Scrabbler', 'Lightning Rift', 'Champion of Wits', 'Champion of the Parish', 'Veinfire Borderpost', 'The Scorpion God', 'Myr Battlesphere', 'Lotleth Troll', 'Knight of the White Orchid', 'Nicol Bolas, Planeswalker', 'Rakdos Cackler', 'Shatterskull Charger', 'Silent Arbiter', 'Sylvan Messenger', 'It That Betrays', 'Call of the Conclave', 'Falkenrath Pit Fighter', 'Tooth and Nail', 'Magmatic Insight', 'Grimdancer', 'Shredded Sails', 'Joraga Treespeaker', 'Hour of Reckoning', 'Ionize', 'Luminarch Ascension', 'Familiar''s Ruse', 'Lingering Mirage', 'See the Truth', 'Animate Dead', 'Jace, the Living Guildpact', 'Twinflame', 'Edric, Spymaster of Trest', 'Mizzium Skin', 'Stern Dismissal', 'Throes of Chaos', 'Drossforge Bridge', 'Dormant Sliver', 'Blade Splicer', 'Buried Ruin', 'Transmogrify', 'Snow-Covered Forest', 'Mirage Mirror', 'Tempered Sliver', 'Hornet Queen', 'Obscura Charm', 'Snowfield Sinkhole', 'Temporal Extortion', 'Blacklance Paragon', 'Dragonstorm', 'Azorius Charm', 'Anguished Unmaking', 'Verdant Command', 'Farseek', 'Chandra, Pyromaster', 'Sinister Concoction', 'Cloudshift', 'Hive Mind', 'Sygg, River Cutthroat', 'Lonis, Cryptozoologist', 'Cloudpost', 'Oversoul of Dusk', 'Crash Through', 'Sovereign''s Bite', 'Hell Mongrel', 'Canyon Slough', 'Darksteel Ingot', 'Irencrag Pyromancer', 'Cathar Commando', 'Oni-Cult Anvil', 'Crypt of Agadeem', 'Cabal Initiate', 'Porphyry Nodes', 'Wonder', 'Approach of the Second Sun', 'Polymorph', 'Gemhide Sliver', 'Primalcrux', 'Reflex Sliver', 'Chief of the Foundry', 'Ground Rift', 'Seismic Assault', 'Viashino Pyromancer', 'Mystic Snake', 'Phantasmagorian', 'Honor of the Pure', 'Stone Rain', 'Slip Out the Back', 'Seaside Citadel', 'Lochmere Serpent', 'Lantern of the Lost', 'Arbor Elf', 'Dream Trawler', 'Fabricate', 'Sigil of Valor', 'Benevolent Bodyguard', 'Sea''s Claim', 'Gitaxian Probe', 'Crackleburr', 'Kessig Flamebreather', 'Tendo Ice Bridge', 'Arguel''s Blood Fast', 'Coalition Relic', 'Tendrils of Agony', 'Treasure Hunt', 'Vedalken Engineer', 'Startle', 'Reckless Waif', 'Sultai Charm', 'Serrated Scorpion', 'Altar of the Brood', 'Skemfar Avenger', 'Rotting Rats', 'Dark Ritual', 'Search for Tomorrow', 'Cabaretti Courtyard', 'Mask of the Mimic', 'Liliana Vess', 'Commit // Memory', 'Splendor Mare', 'Sensor Splicer', 'Detention Sphere', 'Bedlam Reveler', 'Llanowar Tribe', 'Fireblade Charger', 'Assault Strobe', 'Bloodhall Priest', 'The Birth of Meletis', 'Rakdos Charm', 'Flame Javelin', 'Thermo-Alchemist', 'Conclave Mentor', 'Spirited Companion', 'Llanowar Wastes', 'Ghitu Encampment', 'Watcher for Tomorrow', 'Lashwrithe', 'Lava Dart', 'Dead // Gone', 'Bastion of Remembrance', 'Metalwork Colossus', 'Emmara, Soul of the Accord', 'Nimble Mongoose', 'Cultivate', 'Reap the Past', 'Tempered in Solitude', 'Experimental Synthesizer', 'Otherworldly Gaze', 'Sphinx of Foresight', 'Merfolk Mistbinder', 'Deep Forest Hermit', 'Ancient Stirrings', 'Geomancer''s Gambit', 'Edgewall Innkeeper', 'Spell Pierce', 'Mech Hangar', 'Flame Rift', 'Dovin Baan', 'Tireless Provisioner', 'Benalish Marshal', 'Underworld Dreams', 'Festival Crasher', 'Born to Drive', 'Vryn Wingmare', 'Mistvault Bridge', 'Kher Keep', 'Westvale Abbey', 'Vedalken Shackles', 'Chief Engineer', 'Abbot of Keral Keep', 'Glorybringer', 'Pia''s Revolution', 'Mizzium Mortars', 'Gilded Lotus', 'Vampire Nighthawk', 'Shardless Agent', 'Vampire''s Kiss', 'Dryad Militant', 'Hagra Mauling', 'Leechridden Swamp', 'Brushfire Elemental', 'Zetalpa, Primal Dawn', 'Ethersworn Canonist', 'Ghostly Pilferer', 'Master of Death', 'Soul Snare', 'Fire-Lit Thicket', 'Forbid', 'Grasp of Darkness', 'Vault of the Archangel', 'Blackmail', 'Spell Burst', 'Okiba Reckoner Raid', 'Day of Judgment', 'Kitchen Imp', 'Lyzolda, the Blood Witch', 'Game Trail', 'Tooth of Chiss-Goria', 'Ojutai''s Command', 'Reckoner''s Bargain', 'Unlucky Witness', 'Flame Slash', 'Sylvan Library', 'Colossus of Akros', 'Scuttletide', 'Cosmos Elixir', 'Bump in the Night', 'Grimoire Thief', 'Gaea''s Will', 'Drannith Stinger', 'Dispel', 'Vital Splicer', 'Tidespout Tyrant', 'Decree of Justice', 'Sphinx of the Steel Wind', 'Viscera Seer', 'Treacherous Blessing', 'Outland Liberator', 'Arcbound Ravager', 'Voldaren Epicure', 'Ghitu Lavarunner', 'Arch of Orazca', 'Dread Shade', 'Etherium Sculptor', 'Lumbering Falls', 'Dauntless Bodyguard', 'Sylvan Advocate', 'Frenetic Sliver', 'Gideon''s Lawkeeper', 'Intruder Alarm', 'Kaya, Ghost Assassin', 'Mythos of Brokkos', 'Karn''s Bastion', 'Tyrant''s Choice', 'Painful Truths', 'Swiftwater Cliffs', 'Shriekmaw', 'Reinforced Ronin', 'Curious Pair', 'Sliver Queen', 'Arcane Sanctum', 'Shriekhorn', 'Terrarion', 'Wrath of God', 'Frontier Bivouac', 'Angel of Sanctions', 'Aven Squire', 'Dread Presence', 'Izzet Boilerworks', 'Revitalize', 'Dismal Backwater', 'Captured Sunlight', 'First-Sphere Gargantua', 'Doomed Traveler', 'Foreboding Ruins', 'Skyclave Pick-Axe', 'Primal Surge', 'Temple Bell', 'Barbarian Ring', 'Chancellor of the Dross', 'Bogardan Hellkite', 'Bone Shards', 'Skophos Reaver', 'Terramorphic Expanse', 'Claws of Gix', 'Rishkar, Peema Renegade', 'Delver of Secrets', 'Resurgent Belief', 'Phyrexian Dreadnought', 'Folio of Fancies', 'Greater Gargadon', 'Distended Mindbender', 'Qasali Pridemage', 'Nissa Revane', 'Sandwurm Convergence', 'Lone Rider', 'Reveillark', 'Spawning Breath', 'Mistveil Plains', 'Terminus', 'Circle of Confinement', 'Silundi Vision', 'Temple of Silence', 'Coiling Oracle', 'Changeling Outcast', 'Doomskar Titan', 'Swans of Bryn Argoll', 'Buried Alive', 'Voidslime', 'Sire of Insanity', 'Mogg War Marshal', 'Elvish Archdruid', 'Grapeshot', 'Fireblade Artist', 'Avaricious Dragon', 'Zulaport Cutthroat', 'Go for the Throat', 'Temple of Malice', 'Elixir of Immortality', 'Memnarch', 'Martyr of Sands', 'Sunscorched Desert', 'Ethereal Haze', 'Fire Covenant', 'Harbinger of the Tides', 'Ranger of Eos', 'Temple of Mystery', 'Desperate Ritual', 'Bloodchief''s Thirst', 'Thought Scour', 'Ethersworn Sphinx', 'Scrap Trawler', 'Cleansing Wildfire', 'Explore', 'Homing Sliver', 'Dregscape Sliver', 'March of Reckless Joy', 'Sojourner''s Companion', 'Glimmerpost', 'Aether Spellbomb', 'Galerider Sliver', 'Auramancer', 'Mobilizer Mech', 'Cut // Ribbons', 'Jokulhaups', 'Chain Lightning', 'Radiant Scrollwielder', 'Sign in Blood', 'Memory Lapse', 'Skyclave Shade', 'Scrapheap Scrounger', 'Elvish Mystic', 'Sunblade Samurai', 'Darkheart Sliver', 'Stromkirk Noble', 'Dragonkin Berserker', 'Fyndhorn Elves', 'Thornglint Bridge', 'Power Sink', 'Myr Superion', 'Harrow', 'Mausoleum Secrets', 'Growth-Chamber Guardian', 'Rosethorn Acolyte', 'Brainstone', 'Deep Analysis', 'Biting Rain', 'Sadistic Sacrament', 'Drannith Healer', 'Sylvan Primordial', 'Grim Haruspex', 'Lavabelly Sliver', 'Ashenmoor Liege', 'Sleeper Agent', 'Tradewind Rider', 'Blazing Shoal', 'Swarm Shambler', 'Firebolt', 'Joraga Warcaller', 'Battle Screech', 'Oust', 'Reality Ripple', 'Scab-Clan Berserker', 'Field of Ruin', 'Midnight Reaper', 'Bloodbraid Elf', 'Flayer of the Hatebound', 'Feed the Swarm', 'Conduit of Ruin', 'Old Stickfingers', 'Purphoros''s Intervention', 'Platinum Angel', 'Archetype of Endurance', 'Venom Sliver', 'Ashenmoor Gouger', 'Sprite Dragon', 'Slagwoods Bridge', 'Frantic Search', 'Animation Module', 'Tectonic Giant', 'Gray Merchant of Asphodel', 'Riveteers Overlook', 'Behold the Multiverse', 'Condemn', 'Keruga, the Macrosage', 'Solitary Confinement', 'Anafenza, Kin-Tree Spirit', 'Marwyn, the Nurturer', 'Skyclave Cleric', 'Gavony Township', 'Bala Ged Recovery', 'Brokers Hideout', 'Esper Charm', 'Voltaic Servant', 'Kami of False Hope', 'Mire Triton', 'Tide Shaper', 'Avacyn''s Pilgrim', 'The Underworld Cookbook', 'Akrasan Squire', 'Zenith Flare', 'Negate', 'Curiosity', 'Touch the Spirit Realm', 'Silent Submersible', 'Avatar of Woe', 'Moritte of the Frost', 'Arcus Acolyte', 'Kumano Faces Kakkazan', 'Smallpox', 'Dark-Dweller Oracle', 'Countervailing Winds', 'Hero of Precinct One', 'Ponder', 'Fact or Fiction', 'Witching Well', 'Iron Apprentice', 'Windbrisk Heights', 'Mirran Crusader', 'Stitcher''s Graft', 'Commune with the Gods', 'Oona, Queen of the Fae', 'Nezahal, Primal Tide', 'Blazing Rootwalla', 'Horror of the Broken Lands', 'Judge''s Familiar', 'Heartless Summoning', 'Izzet Charm', 'Kabira Takedown', 'Cloudcrest Lake', 'Nether Traitor', 'Eiganjo Castle', 'Nomad Outpost', 'Sharuum the Hegemon', 'Bonescythe Sliver', 'Hollowhead Sliver', 'Angel of Despair', 'Throne of Geth', 'Disallow', 'Collective Effort', 'Acidic Slime', 'Pyretic Ritual', 'Arrogant Wurm', 'Varragoth, Bloodsky Sire', 'Master Splicer', 'Frantic Inventory', 'Sangrophage', 'Mobilized District', 'Lurching Rotbeast', 'Valiant Rescuer', 'Raise the Alarm', 'Pathrazer of Ulamog', 'Fertile Ground', 'Promise of Bunrei', 'Futurist Sentinel', 'Llanowar Elves', 'Worldgorger Dragon', 'Stirring Wildwood', 'Reliquary Tower', 'Myth Realized', 'Tectonic Reformation', 'Spawning Pool', 'Duskwielder', 'Stubborn Denial'))) 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, 64.5, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (61.9 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Barrin, Tolarian Archmage', 'Orzhov Signet', 'Terrarion', 'Mystic Snake', 'Ball Lightning', 'Coiling Oracle', 'Graveyard Marshal', 'Harbinger of the Tides', 'Intangible Virtue', 'Scrapheap Scrounger', 'Brimstone Dragon', 'Beast Whisperer', 'Graf Reaver', 'Liliana Vess', 'Nivmagus Elemental', 'Benevolent Bodyguard', 'Angel of Sanctions', 'Heartless Act', 'Sarkhan the Masterless', 'Crypt of Agadeem', 'Tomb of Urami', 'Scorched Rusalka', 'Old Stickfingers', 'Treacherous Blessing', 'Demonic Dread', 'Secluded Courtyard', 'Resurgent Belief', 'Catch // Release', 'Iron Apprentice', 'Abbot of Keral Keep', 'Lotleth Troll', 'Cleansing Wildfire', 'Lord of the Undead', 'Lashwrithe', 'Verdant Command', 'Irencrag Pyromancer', 'Ramunap Excavator', 'Patchwork Automaton', 'Bump in the Night', 'Sliver Queen', 'General Ferrous Rokiric', 'Voidslime', 'Tempered Sliver', 'Midnight Reaper', 'Declaration in Stone', 'Captured Sunlight', 'Enigma Sphinx', 'Kitchen Imp', 'Trickbind', 'Plow Under', 'Zenith Flare', 'Logic Knot', 'Raging Ravine', 'Fire Prophecy', 'Goblin Chieftain', 'Mirran Crusader', 'Restore Balance', 'The Underworld Cookbook', 'Wandering Mind', 'Woodland Cemetery', 'Glorybringer', 'Brainstone', 'Dark-Dweller Oracle', 'Broodstar', 'Forbid', 'The Bloodsky Massacre', 'Shriekmaw', 'Elixir of Immortality', 'Tithe Taker', 'Coralhelm Commander', 'Zetalpa, Primal Dawn', 'Mythos of Brokkos', 'Mishra''s Factory', 'Frontier Bivouac', 'Spark Spray', 'Dragonskull Summit', 'Abrade', 'Firebolt', 'Psychatog', 'Llanowar Elves', 'Bituminous Blast', 'Game Trail', 'Bonescythe Sliver', 'Demigod of Revenge', 'Champion of the Parish', 'Shrapnel Blast', 'Go for Blood', 'Brave the Elements', 'Skirk Ridge Exhumer', 'Good-Fortune Unicorn', 'Anafenza, Kin-Tree Spirit', 'Thirst for Knowledge', 'Cabaretti Courtyard', 'Rabbit Battery', 'Elemental Masterpiece', 'Grapeshot', 'Goblin Cratermaker', 'Korlash, Heir to Blackblade', 'Thraben Inspector', 'Oversoul of Dusk', 'Reality Ripple', 'Vivid Meadow', 'Spark Elemental', 'Basking Rootwalla', 'Rishadan Dockhand', 'Viashino Pyromancer', 'Signal Pest', 'Fireblade Charger', 'Skyclave Cleric', 'Panharmonicon', 'Arcbound Mouser', 'Living Twister', 'Cloudcrest Lake', 'Sovereign''s Bite', 'Incinerate', 'Sky Hussar', 'Arch of Orazca', 'Ethereal Haze', 'Razortide Bridge', 'Bloodhall Priest', 'Ground Rift', 'Justice Strike', 'Diregraf Ghoul', 'Burst Lightning', 'Satyr Wayfinder', 'Futurist Sentinel', 'Stone Rain', 'Dismal Backwater', 'Hunted Witness', 'Sangrophage', 'Touch the Spirit Realm', 'Faithful Mending', 'Unlucky Witness', 'Underworld Dreams', 'Lyzolda, the Blood Witch', 'Hive Stirrings', 'Flame Javelin', 'Dark Ritual', 'Murderous Redcap', 'Fanatical Firebrand', 'Wooded Bastion', 'Castigate', 'Wayward Guide-Beast', 'Goldmire Bridge', 'Stitcher''s Graft', 'Galerider Sliver', 'Behold the Multiverse', 'Duty-Bound Dead', 'Tidal Warrior', 'Moritte of the Frost', 'Champion of Wits', 'Countervailing Winds', 'Thirst for Discovery', 'Folio of Fancies', 'Goblin Bombardment', 'Memory Lapse', 'Grimoire Thief', 'Drannith Healer', 'Porphyry Nodes', 'Rotting Rats', 'Tangleroot', 'Skophos Reaver', 'Homing Sliver', 'Gatekeeper of Malakir', 'Eternal Dragon', 'Goblin Trashmaster', 'Grim Haruspex', 'Unburial Rites', 'Feed the Swarm', 'Rootbound Crag', 'Faerie Vandal', 'Tyrant''s Scorn', 'Marwyn, the Nurturer', 'Seismic Assault', 'Animation Module', 'Sphinx of Foresight', 'Battlefield Forge', 'Alchemist''s Gambit', 'Joraga Warcaller', 'Tooth and Nail', 'Netherborn Phalanx', 'Squadron Hawk', 'Bogardan Hellkite', 'Temple of Malice', 'Mirage Mirror', 'Sygg, River Cutthroat', 'Reliquary Tower', 'Staff of Domination', 'Tidespout Tyrant', 'Raze the Effigy', 'Obsessive Search', 'Bloodchief''s Thirst', 'Lumbering Falls', 'Tooth of Chiss-Goria', 'Discovery // Dispersal', 'Myr Battlesphere', 'Dennick, Pious Apprentice', 'Rakdos Headliner', 'Reflex Sliver', 'Warleader''s Helix', 'Riveteers Overlook', 'Crashing Drawbridge', 'Mizzium Mortars', 'Village Messenger', 'Acidic Slime', 'Spell Pierce', 'Mogg War Marshal', 'Hymn to Tourach', 'Giant Killer', 'Siege-Gang Commander', 'Lonely Sandbar', 'Firebrand Archer', 'Perilous Research', 'Kefnet the Mindful', 'Runed Halo', 'Field of Ruin', 'Animate Dead', 'Reckoner''s Bargain', 'Waterfront District', 'Glint Hawk', 'Howling Mine', 'Gigantomancer', 'Blazing Shoal', 'Goblin Ringleader', 'Scrapyard Recombiner', 'Knight of Infamy', 'Acquisitions Expert', 'Sprite Dragon', 'Seasoned Hallowblade', 'Tyrant''s Choice', 'Reckless Charge', 'Wrench Mind', 'Born to Drive', 'Tide Shaper', 'Stormblood Berserker', 'Hell Mongrel', 'Barbarian Ring', 'Kjeldoran Outpost', 'Arcbound Ravager', 'Counterflux', 'Realm Razer', 'Gemhide Sliver', 'Fury of the Horde', 'Izzet Boilerworks', 'Arcbound Worker', 'Oona, Queen of the Fae', 'Vital Splicer', 'Kher Keep', 'Tendrils of Agony', 'Chandra, Pyromaster', 'Biting Rain', 'Detention Sphere', 'Mirrorshell Crab', 'Wight', 'Commune with the Gods', 'Flourishing Fox', 'Lingering Mirage', 'Ashenmoor Liege', 'Serrated Scorpion', 'Flame Jab', 'Tempered in Solitude', 'Wall of Omens', 'Quest for the Holy Relic', 'Tempest Djinn', 'Thornglint Bridge', 'Invoke Calamity', 'Dread Shade', 'Palace Siege', 'Zombie Infestation', 'Shatterskull Charger', 'Mesmeric Fiend', 'Silverbluff Bridge', 'Cultivate', 'Fact or Fiction', 'Maul of the Skyclaves', 'Adanto Vanguard', 'Sandwurm Convergence', 'Slagstorm', 'Vivid Grove', 'Mind''s Desire', 'Temporal Fissure', 'Sinister Concoction', 'Arrogant Wurm', 'Geomancer''s Gambit', 'Sarkhan the Mad', 'Spirited Companion', 'Ojutai''s Command', 'Shriekhorn', 'Rune-Scarred Demon', 'Kaya, Ghost Assassin', 'Chance Encounter', 'Wonder', 'Sharuum the Hegemon', 'Knight of Glory', 'Arcus Acolyte', 'Elves of Deep Shadow', 'Leechridden Swamp', 'Rishkar, Peema Renegade', 'Gavony Township', 'Call of the Conclave', 'Bedlam Reveler', 'Lose Focus', 'See the Truth', 'Keruga, the Macrosage', 'Thought Scour', 'Path to the World Tree', 'Collective Effort', 'Wild Nacatl', 'Hotshot Mechanic', 'Skyscribing', 'Hellspark Elemental', 'Gilded Lotus', 'Trinket Mage', 'Advent of the Wurm', 'Sign in Blood', 'Blade Splicer', 'Brokers Charm', 'Chain Lightning', 'Fiery Temper', 'Merfolk Mistbinder', 'Brokers Hideout', 'Ghitu Lavarunner', 'Ravenous Chupacabra', 'Sylvan Scrying', 'Sunscorched Desert', 'Angel of Despair', 'Rashmi, Eternities Crafter', 'Crumbling Necropolis', 'Myth Realized', 'Otherworldly Gaze', 'Dark Salvation', 'White Sun''s Zenith', 'Masterful Replication', 'Thirst for Meaning', 'Sparksmith', 'Ionize', 'Judge''s Familiar', 'It That Betrays', 'Abiding Grace', 'Valiant Rescuer', 'Kumano Faces Kakkazan', 'Metalwork Colossus', 'Mech Hangar', 'Sire of Insanity', 'Sultai Charm', 'Barren Moor', 'Mindslaver', 'Jace Beleren', 'Bastion of Remembrance', 'Ashenmoor Gouger', 'Firemane Avenger', 'Heir of Falkenrath', 'Mistvein Borderpost', 'Temple of Silence', 'Decree of Justice', 'Oblivion Ring', 'Rakdos Charm', 'Doomskar Titan', 'Temple of Mystery', 'Scale of Chiss-Goria', 'Tireless Provisioner', 'Tower of Calamities', 'Arguel''s Blood Fast', 'Heartless Summoning', 'Sylvan Advocate', 'Rosethorn Acolyte', 'Benalish Marshal', 'Stirring Wildwood', 'Frenetic Sliver', 'Power Depot', 'Electrostatic Field', 'Mana Leak', 'Arcane Sanctum', 'Primalcrux', 'Delver of Secrets', 'Ghitu Encampment', 'Akroma''s Memorial', 'Brushfire Elemental', 'Urza''s Factory', 'Loyal Pegasus', 'Dovin Baan', 'Okiba Reckoner Raid', 'Diffusion Sliver', 'Mirror March', 'Wildfield Borderpost', 'Darkheart Sliver', 'Muddle the Mixture', 'Dead // Gone', 'March of Reckless Joy', 'Sigarda''s Splendor', 'Lavaclaw Reaches', 'Lantern of the Lost', 'Grave Scrabbler', 'Scab-Clan Berserker', 'Clifftop Retreat', 'Expansion // Explosion', 'Thawing Glaciers', 'Cathar Commando', 'Watcher for Tomorrow', 'Lone Rider', 'Dark Withering', 'Qasali Pridemage', 'Drowned Catacomb', 'Gideon''s Lawkeeper', 'Cathartic Pyre', 'Unsubstantiate', 'Sea''s Claim', 'Approach of the Second Sun', 'Krark''s Thumb', 'Healer''s Hawk', 'Sarcomancy', 'Heartfire Immolator', 'Avatar of Woe', 'Eiganjo Castle', 'Secluded Steppe', 'Steppe Lynx', 'Duskwielder', 'Anguished Unmaking', 'Conduit of Ruin', 'Myr Retriever', 'Orcish Lumberjack', 'Blacklance Paragon', 'Opt', 'Porcelain Legionnaire', 'Ultimate Price', 'Nature''s Lore', 'Mistveil Plains', 'Grumgully, the Generous', 'Nezahal, Primal Tide', 'Tectonic Giant', 'Blazing Rootwalla', 'Dregscape Sliver', 'Scrap Trawler', 'Shredded Sails', 'Thaumatic Compass', 'Memorial to Glory', 'Outland Liberator', 'Shard Volley', 'Fertile Ground', 'Crackleburr', 'Venom Sliver', 'Hollowhead Sliver', 'Reinforced Ronin', 'Temple of Epiphany', 'Grasp of Darkness', 'Zurgo Bellstriker', 'Archetype of Endurance', 'Arcbound Javelineer', 'Nomad Outpost', 'Holy Day', 'Darksteel Colossus', 'Reckless Impulse', 'Voldaren Epicure', 'Think Twice', 'Mythos of Nethroi', 'Merchant of the Vale', 'Arbor Elf', 'Retributive Wand', 'Slitherhead', 'Ash Zealot', 'Might Sliver', 'Piranha Marsh', 'Transmogrify', 'Mire Triton', 'Llanowar Wastes', 'Elvish Mystic', 'Vampire''s Kiss', 'Flash of Insight', 'Just the Wind', 'Fauna Shaman', 'Agonizing Remorse', 'Splendor Mare', 'Call the Bloodline', 'Azorius Charm', 'Diregraf Colossus', 'Dread Return', 'Chamber Sentry', 'Jokulhaups', 'Woodfall Primus', 'Chief of the Foundry', 'All Suns'' Dawn', 'Silvergill Adept', 'Vryn Wingmare', 'Witch''s Cottage', 'Silent Submersible', 'Memnarch', 'Herald of Leshrac', 'Gonti, Lord of Luxury', 'Fireblade Artist', 'Magister of Worth', 'Shardless Agent', 'Falkenrath Aristocrat', 'Witching Well', 'Karn''s Bastion', 'Rustvale Bridge', 'Revitalize', 'Grimdancer', 'Swans of Bryn Argoll', 'Voldaren Pariah', 'Glowspore Shaman', 'Temple of Enlightenment', 'Sojourner''s Companion', 'Master of the Pearl Trident', 'Assert Authority', 'Imposing Vantasaur', 'Extractor Demon', 'Foreboding Ruins', 'Explore', 'Swiftwater Cliffs', 'Sleeper Agent', 'Disciple of the Vault', 'Soul Spike', 'Imperious Perfect', 'Reap the Past', 'Lodestone Golem', 'Purphoros''s Intervention', 'Torrent Sculptor', 'Merrow Reejerey', 'Stubborn Denial', 'Sensor Splicer', 'Battle Screech', 'Unesh, Criosphinx Sovereign', 'Earthshaker Khenra', 'Ghoultree', 'Spikefield Hazard', 'Vivid Creek', 'Claws of Gix', 'Nylea''s Presence', 'Kami of False Hope', 'Caves of Koilos', 'Silent Arbiter', 'Hypergenesis', 'Mesa Enchantress', 'Distended Mindbender', 'Gideon Jura', 'Slagwoods Bridge', 'Primal Surge', 'Silundi Vision', 'Master Splicer', 'Search for Tomorrow', 'Temple of Malady', 'Goblin Matron', 'Scrap Welder', 'Vedalken Shackles', 'Lonis, Cryptozoologist', 'Emmara, Soul of the Accord', 'Westvale Abbey', 'Hagra Mauling', 'Flame Rift', 'Moorland Haunt', 'Vapor Snag', 'Canyon Slough', 'Lava Dart', 'Ancient Stirrings', 'Skyclave Pick-Axe', 'Sylvan Library', 'Nimble Mongoose', 'Voltaic Servant', 'Master of Death', 'Snow-Covered Swamp', 'Darigaaz Reincarnated', 'Giant Ox', 'Hornet Queen', 'Circular Logic', 'Timeless Witness', 'Crash Through', 'Avacyn''s Pilgrim', 'Forgotten Cave', 'Fire Covenant', 'Needle Spires', 'Sylvan Messenger', 'Snow-Covered Forest', 'Avatar of Discord', 'Lifecrafter''s Bestiary', 'Hive Mind', 'Inga Rune-Eyes', 'Luminarch Ascension', 'Restoration Angel', 'Nissa Revane', 'Jace, the Living Guildpact', 'Erebos''s Intervention', 'Fungus Sliver', 'Noosegraf Mob', 'Dreg Mangler', 'Skull Prophet', 'Cloudshift', 'Cathartic Reunion', 'Obscura Storefront', 'Tymaret, Chosen from Death', 'Nissa''s Chosen', 'Raven''s Crime', 'Falkenrath Gorger', 'Thermo-Alchemist', 'Virulent Sliver', 'Obstinate Baloth', 'Mausoleum Secrets', 'Joraga Treespeaker', 'Edric, Spymaster of Trest', 'Hypnotic Specter', 'Kabira Takedown', 'Brain Freeze', 'Chancellor of the Dross', 'Abundant Harvest', 'Adorned Pouncer', 'Dimir Aqueduct', 'Ancestral Anger', 'Birds of Paradise', 'Hero of Precinct One', 'Festival Crasher', 'Jace, Memory Adept', 'Fieldmist Borderpost', 'Scythe Leopard', 'Sphinx''s Tutelage', 'Origin Spellbomb', 'Dawn of Hope', 'Vivid Marsh', 'Tribute Mage', 'Hinterland Harbor', 'Snow-Covered Mountain', 'Pyretic Ritual', 'Zulaport Cutthroat', 'Blackmail', 'Pillage', 'Anticipate', 'Painful Truths', 'Ajani, the Greathearted', 'Sephara, Sky''s Blade', 'Kird Ape', 'Radiant Scrollwielder', 'Dragonkin Berserker', 'Slip Out the Back', 'Bazaar Trademage', 'Buried Alive', 'Sylvan Primordial', 'Hour of Reckoning', 'Ornithopter', 'Blackbloom Rogue', 'Dark Intimations', 'Drossforge Bridge', 'Glimmerpost', 'Curious Pair', 'Pyrrhic Revival', 'Akrasan Squire', 'Defiant Strike', 'Oni-Cult Anvil', 'Brute Suit', 'Phantasmagorian', 'Reckless Waif', 'Terramorphic Expanse', 'Sungold Sentinel', 'Dawn Charm', 'Mask of the Mimic', 'Nevermore', 'Conclave Mentor', 'Frantic Search', 'Dread Fugue', 'Plague Belcher', 'Judith, the Scourge Diva', 'Sleight of Hand', 'Flayer of the Hatebound', 'Zabaz, the Glimmerwasp', 'Falkenrath Pit Fighter', 'Cosmos Elixir', 'Gitaxian Probe', 'Bloodbraid Elf', 'Deep Analysis', 'Blistercoil Weird', 'Cemetery Reaper', 'Springbloom Druid', 'Trostani''s Summoner', 'Scuttletide', 'Harrow', 'Repeal', 'Honor of the Pure', 'First-Sphere Gargantua', 'Bala Ged Recovery', 'The Birth of Meletis', 'Carnophage', 'Elvish Visionary', 'Vessel of Nascency', 'Everflowing Chalice', 'Goblin Electromancer', 'Cabal Initiate', 'Ob Nixilis, the Fallen', 'Death Baron', 'Cut // Ribbons', 'Phyrexian Dreadnought', 'Goblin Dark-Dwellers', 'Go for the Throat', 'Mirrodin Besieged', 'Vedalken Engineer', 'Forked Bolt', 'Prodigy''s Prototype', 'Spawning Breath', 'Mobilizer Mech', 'Avaricious Dragon', 'Familiar''s Ruse', 'Sandsteppe Citadel', 'Silverblade Paladin', 'Promise of Bunrei', 'Sundial of the Infinite', 'Colossus of Akros', 'Michiko''s Reign of Truth', 'Bone Shards', 'Fabricate', 'Seaside Citadel', 'Circle of Confinement', 'Desperate Ritual', 'Treasure Cruise', 'Etherium Sculptor', 'Disallow', 'Izzet Charm', 'Greater Gargadon', 'Spell Burst', 'Kira, Great Glass-Spinner', 'Sword-Point Diplomacy', 'Mission Briefing', 'Lochmere Serpent', 'Steel Overseer', 'Pia''s Revolution', 'Intruder Alarm', 'Oust', 'Skirk Prospector', 'Esper Charm', 'Worldgorger Dragon', 'Dream Trawler', 'Cerodon Yearling', 'Cosima, God of the Voyage', 'Lavabelly Sliver', 'Elvish Harbinger', 'Power Sink', 'Dread Presence', 'Stormtide Leviathan', 'Collateral Damage', 'Obliterate', 'Sphinx of the Steel Wind', 'Glorious End', 'Desecration Demon', 'Multiple Choice', 'The Scorpion God', 'Altar of the Brood', 'Dragonstorm', 'Sticky Fingers', 'Training Grounds', 'Tendo Ice Bridge', 'Renewed Faith', 'Swarm Shambler', 'Fatal Grudge', 'Negate', 'Shrieking Affliction', 'Midnight Clock', 'Vampire Nighthawk', 'Tyrant of Discord', 'Vindicate', 'Plated Geopede', 'Stern Dismissal', 'Edgewall Innkeeper', 'Wake Thrasher', 'Throne of Geth', 'Mobilized District', 'Twisted Abomination', 'Putrid Imp', 'Quest for the Nihil Stone', 'Lightning Rift', 'Startle', 'Selesnya Charm', 'Pyroclasm', 'Deep Forest Hermit', 'Drannith Stinger', 'Argentum Armor', 'Grenzo, Dungeon Warden', 'Sadistic Sacrament', 'Undead Butler', 'Akoum Hellhound', 'Knight of the White Orchid', 'Horror of the Broken Lands', 'Snow-Covered Plains', 'Twinflame', 'Acolyte of Affliction', 'Temporal Extortion', 'Underworld Connections', 'Auramancer', 'Assault Strobe', 'Profane Procession', 'Hissing Quagmire', 'Blood Fountain', 'Elvish Archdruid', 'Wild Cantor', 'Crack the Earth', 'Chromatic Lantern', 'Flame Slash', 'Tradewind Rider', 'Tanglepool Bridge', 'Treasure Hunt', 'Llanowar Tribe', 'Nether Spirit', 'Stromkirk Noble', 'Possibility Storm', 'Polymorph', 'Rakdos Cackler', 'Orim''s Chant', 'Frantic Inventory', 'Tezzeret''s Gambit', 'Endbringer', 'Ghostly Pilferer', 'Angel of Glory''s Rise', 'Heliod''s Pilgrim', 'Nicol Bolas, Planeswalker', 'Murderous Cut', 'Hythonia the Cruel', 'Halimar Excavator', 'Dauntless Bodyguard', 'Wrath of God', 'Hatching Plans', 'Soul Snare', 'Nether Traitor', 'Sunblade Samurai', 'Darksteel Ingot', 'Glacial Fortress', 'Vivid Crag', 'Hieroglyphic Illumination', 'Diabolic Edict', 'Skemfar Avenger', 'Dispel', 'Solitary Confinement', 'Cloudpost', 'Dryad Militant', 'Kazandu Mammoth', 'Mistvault Bridge', 'Changeling Outcast', 'Curiosity', 'Glen Elendra Archmage', 'Jwari Disruption', 'Skyclave Shade', 'Kazuul''s Fury', 'Seething Song', 'Temple Bell', 'Ghost Quarter', 'Vault of the Archangel', 'Kiln Fiend', 'Day of Judgment', 'Martyr of Sands', 'Aven Squire', 'Mizzium Skin', 'Chief Engineer', 'Den Protector', 'Doomed Traveler', 'Varragoth, Bloodsky Sire', 'Nested Shambler', 'Commit // Memory', 'Primal Command', 'Grand Architect', 'Asylum Visitor', 'Windbrisk Heights', 'Raise the Alarm', 'Aether Spellbomb', 'Magmatic Insight', 'Veinfire Borderpost', 'Pieces of the Puzzle', 'Grisly Salvage', 'Buried Ruin', 'Port of Karfell', 'Dizzy Spell', 'Experimental Synthesizer', 'Cursecatcher', 'Snowfield Sinkhole', 'Condemn', 'Garruk Wildspeaker', 'Naban, Dean of Iteration', 'Ranger of Eos', 'Reveillark', 'Kessig Flamebreather', 'Mystic Monastery', 'Pathrazer of Ulamog', 'Putrid Goblin', 'Gaea''s Will', 'Kodama''s Reach', 'Llanowar Mentor', 'Claim the Firstborn', 'Duress', 'Colossal Skyturtle', 'Path of Mettle', 'Spawning Pool', 'Ethersworn Canonist', 'Terminus', 'Maestros Charm', 'Ethersworn Sphinx', 'Disenchant', 'Clarion Spirit', 'Growth-Chamber Guardian', 'Kari Zev''s Expertise', 'Firewild Borderpost', 'Fire-Lit Thicket', 'Farseek', 'Nemesis of Mortals', 'Smallpox', 'Talisman of Curiosity', 'Myr Superion', 'Dormant Sliver', 'Throes of Chaos', 'Gray Merchant of Asphodel', 'Tectonic Reformation', 'Bile Blight', 'Monstrous Carabid', 'Vault Skirge', 'Evolving Wilds', 'Rootborn Defenses', 'Kunoros, Hound of Athreos', 'Fyndhorn Elves', 'Platinum Angel', 'Temple of Deceit', 'Obscura Charm', 'Ponder', 'Viscera Seer', 'Lurching Rotbeast', 'Anax, Hardened in the Forge', 'Sigil of Valor', 'Disciple of Bolas', 'Shalai, Voice of Plenty', 'Coalition Relic'))) 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, 61.9, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (63.0 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Varragoth, Bloodsky Sire', 'Rosethorn Acolyte', 'Sphinx of Foresight', 'Secluded Steppe', 'Blacklance Paragon', 'Esper Charm', 'First-Sphere Gargantua', 'Temporal Extortion', 'Reflex Sliver', 'Silundi Vision', 'Vessel of Nascency', 'Goblin Cratermaker', 'Cathartic Reunion', 'Electrostatic Field', 'Wayward Guide-Beast', 'Goblin Dark-Dwellers', 'Rakdos Headliner', 'Fire Prophecy', 'Cosmos Elixir', 'Akrasan Squire', 'Gonti, Lord of Luxury', 'Wrath of God', 'Kefnet the Mindful', 'Elvish Visionary', 'Zabaz, the Glimmerwasp', 'Unsubstantiate', 'Vivid Crag', 'Restoration Angel', 'Negate', 'Lose Focus', 'Brimstone Dragon', 'Skophos Reaver', 'Dragonstorm', 'Curiosity', 'Edgewall Innkeeper', 'Carnophage', 'Goblin Matron', 'Commune with the Gods', 'Skirk Ridge Exhumer', 'Karn''s Bastion', 'Counterflux', 'Wrench Mind', 'Sangrophage', 'Aether Spellbomb', 'Evolving Wilds', 'Tyrant of Discord', 'Mishra''s Factory', 'Bone Shards', 'Raze the Effigy', 'Dispel', 'Go for Blood', 'Carth the Lion', 'Heliod''s Pilgrim', 'Sleight of Hand', 'Tireless Provisioner', 'Wake Thrasher', 'Glacial Fortress', 'Flame-Kin Zealot', 'Wall of Omens', 'Think Twice', 'Barbarian Ring', 'Seismic Assault', 'Rishadan Dockhand', 'Chamber Sentry', 'Glorybringer', 'Bile Blight', 'Flame Javelin', 'Bloodbraid Elf', 'Dimir Charm', 'Rift Sower', 'Ultimate Price', 'Warleader''s Helix', 'Distended Mindbender', 'Asylum Visitor', 'Shardless Agent', 'Pyroclasm', 'Rakdos Cackler', 'Izzet Charm', 'Hypnotic Specter', 'Demigod of Revenge', 'Ghostly Pilferer', 'Okiba Reckoner Raid', 'Zurgo Bellstriker', 'Torrent Sculptor', 'Dormant Sliver', 'Tyrant''s Scorn', 'Geomancer''s Gambit', 'Orzhov Signet', 'Sylvan Primordial', 'Obscura Charm', 'Arrogant Wurm', 'Brain Freeze', 'Underworld Dreams', 'Elixir of Immortality', 'Nissa''s Chosen', 'Metalwork Colossus', 'Darksteel Colossus', 'Gideon''s Lawkeeper', 'Primal Surge', 'Mire Triton', 'Captivating Vampire', 'Sojourner''s Companion', 'Sphinx of the Steel Wind', 'Nested Shambler', 'Bloodhall Priest', 'Zetalpa, Primal Dawn', 'Terrarion', 'Swiftwater Cliffs', 'Deep Analysis', 'Sultai Charm', 'Squadron Hawk', 'Sovereign''s Bite', 'Mirror March', 'Skyscribing', 'Porcelain Legionnaire', 'Tradewind Rider', 'Korlash, Heir to Blackblade', 'Auramancer', 'Ghitu Encampment', 'Blood Fountain', 'Temporal Fissure', 'Cloudcrest Lake', 'Diabolic Edict', 'Frantic Search', 'Virulent Sliver', 'Orim''s Chant', 'Zenith Flare', 'Origin Spellbomb', 'Feed the Swarm', 'Animate Dead', 'Darkheart Sliver', 'Claim the Firstborn', 'Blade Splicer', 'Myr Superion', 'Kjeldoran Outpost', 'Voldaren Pariah', 'Crashing Drawbridge', 'Thought Scour', 'Vital Splicer', 'Elvish Mystic', 'Lyzolda, the Blood Witch', 'Intangible Virtue', 'Aetherling', 'Ajani Unyielding', 'Stirring Wildwood', 'Doomskar Titan', 'Acidic Slime', 'Lavabelly Sliver', 'Path of Mettle', 'Treasure Cruise', 'Tymaret, Chosen from Death', 'Graveyard Marshal', 'Nimble Mongoose', 'Cosima, God of the Voyage', 'Mission Briefing', 'Luminarch Ascension', 'Naban, Dean of Iteration', 'Angel of Despair', 'Alchemist''s Gambit', 'Chief Engineer', 'Den Protector', 'Mesa Enchantress', 'Gaea''s Will', 'Temple of Mystery', 'Kher Keep', 'Assault Strobe', 'Qasali Pridemage', 'Purphoros''s Intervention', 'Dragonkin Berserker', 'Hagra Mauling', 'Advent of the Wurm', 'Joraga Warcaller', 'Twisted Abomination', 'Azorius Charm', 'Hymn to Tourach', 'Timeless Witness', 'Rescue', 'Psychatog', 'Stormtide Leviathan', 'Unlucky Witness', 'Memory Lapse', 'Woodland Cemetery', 'Thraben Inspector', 'Raven''s Crime', 'Fireblade Artist', 'Putrid Goblin', 'Solitary Confinement', 'Realm Razer', 'Springbloom Druid', 'Spark Spray', 'Ghoultree', 'Treasure Hunt', 'Midnight Clock', 'Defiant Strike', 'Marwyn, the Nurturer', 'Erebos''s Intervention', 'Worldgorger Dragon', 'Silent Arbiter', 'Orcish Lumberjack', 'Blistercoil Weird', 'Fact or Fiction', 'Perilous Research', 'Llanowar Mentor', 'Fabricate', 'Arcbound Worker', 'Hotshot Mechanic', 'Might Sliver', 'White Sun''s Zenith', 'Emmara, Soul of the Accord', 'Lone Rider', 'Stromkirk Noble', 'Bastion of Remembrance', 'Hythonia the Cruel', 'Hour of Reckoning', 'Nicol Bolas, Planeswalker', 'Witch''s Cottage', 'Ancestral Anger', 'Buried Alive', 'Agonizing Remorse', 'Throne of Geth', 'Cabal Initiate', 'Tidal Warrior', 'Countervailing Winds', 'Scythe Leopard', 'Silverbluff Bridge', 'Pieces of the Puzzle', 'Duty-Bound Dead', 'Dread Return', 'Falkenrath Aristocrat', 'Cemetery Reaper', 'Nemesis of Mortals', 'Vapor Snag', 'Voltaic Servant', 'Merrow Reejerey', 'Cathar Commando', 'Sticky Fingers', 'Bump in the Night', 'Liliana Vess', 'Iron Apprentice', 'Growth-Chamber Guardian', 'Festival Crasher', 'Fiery Temper', 'Fire Covenant', 'The Bloodsky Massacre', 'Coralhelm Commander', 'Logic Knot', 'Caves of Koilos', 'Jace Beleren', 'Stern Dismissal', 'Sylvan Library', 'Earthshaker Khenra', 'Jwari Disruption', 'Resurgent Belief', 'Lonely Sandbar', 'Colossal Skyturtle', 'Altar of the Brood', 'Reality Ripple', 'Slip Out the Back', 'Skyclave Shade', 'Call the Bloodline', 'Sire of Insanity', 'Cut // Ribbons', 'Extractor Demon', 'Eternal Dragon', 'Knight of the White Orchid', 'Crumbling Necropolis', 'Llanowar Tribe', 'Viscera Seer', 'Hive Mind', 'Lightning Rift', 'Biting Rain', 'Go for the Throat', 'Rakdos Charm', 'Lodestone Golem', 'Glowspore Shaman', 'Edric, Spymaster of Trest', 'Goblin Chieftain', 'Bala Ged Recovery', 'Claws of Gix', 'Spellweaver Helix', 'Kami of False Hope', 'Bonescythe Sliver', 'Gitaxian Probe', 'Frenetic Sliver', 'Grim Haruspex', 'Broodstar', 'Maestros Charm', 'Chain Lightning', 'Ornithopter', 'Sygg, River Cutthroat', 'Raise the Alarm', 'Grisly Salvage', 'Desecration Demon', 'Howling Mine', 'Coiling Oracle', 'Vedalken Engineer', 'Master of Death', 'Imposing Vantasaur', 'Basking Rootwalla', 'Blackbloom Rogue', 'Deep Forest Hermit', 'Patchwork Automaton', 'Mobilizer Mech', 'Tyrant''s Choice', 'Reckless Charge', 'Mythos of Nethroi', 'Lavaclaw Reaches', 'Firewild Borderpost', 'Trostani''s Summoner', 'Anax, Hardened in the Forge', 'Arcane Sanctum', 'Flayer of the Hatebound', 'Soul Spike', 'Clifftop Retreat', 'Infernal Grasp', 'Quicksilver Fountain', 'Plow Under', 'Lashwrithe', 'Glint Hawk', 'Arcbound Ravager', 'Death Baron', 'Cremate', 'Sphinx''s Tutelage', 'Blazing Rootwalla', 'Cruel Ultimatum', 'Drowned Catacomb', 'Spark Elemental', 'Circular Logic', 'Skyclave Cleric', 'Sunblade Samurai', 'Myr Battlesphere', 'Sunscorched Desert', 'Gemhide Sliver', 'Tangleroot', 'Nomad Outpost', 'Tribute Mage', 'Zulaport Cutthroat', 'Ranger of Eos', 'Wight', 'Dark Withering', 'Reveillark', 'Homing Sliver', 'Galerider Sliver', 'Abbot of Keral Keep', 'Myr Retriever', 'Desperate Ritual', 'Kari Zev''s Expertise', 'Cultivate', 'See the Truth', 'Shredded Sails', 'Crackleburr', 'Pyretic Ritual', 'Captured Sunlight', 'Arch of Orazca', 'Pia''s Revolution', 'All Suns'' Dawn', 'Phantasmagorian', 'Flame Rift', 'Vedalken Shackles', 'Mirrodin Besieged', 'Putrid Imp', 'Diregraf Ghoul', 'Stubborn Denial', 'Skyclave Relic', 'Sarcomite Myr', 'Arcbound Javelineer', 'Soul Snare', 'Coordinated Assault', 'Commit // Memory', 'Scrap Welder', 'Tidespout Tyrant', 'Lumbering Falls', 'Forbid', 'Gigantomancer', 'Skemfar Avenger', 'Jokulhaups', 'Snow-Covered Mountain', 'Ash Zealot', 'Vivid Creek', 'Signal Pest', 'Forked Bolt', 'Dive Down', 'Akroma''s Memorial', 'Oni-Cult Anvil', 'Harrow', 'Mizzium Mortars', 'Fungus Sliver', 'Snow-Covered Forest', 'Dreg Mangler', 'Changeling Outcast', 'Diffusion Sliver', 'Tempest Djinn', 'Primal Command', 'Curious Pair', 'Heir of Falkenrath', 'Bloodline Keeper', 'Flame Jab', 'Forgotten Cave', 'Etherium Sculptor', 'Revitalize', 'Herald of Leshrac', 'Darigaaz Reincarnated', 'Fyndhorn Elves', 'Shrapnel Blast', 'Mythos of Brokkos', 'Dryad Militant', 'Hieroglyphic Illumination', 'Acquisitions Expert', 'Waterfront District', 'Urza''s Factory', 'Tower of Calamities', 'Nether Spirit', 'Tooth of Chiss-Goria', 'Arcbound Mouser', 'Scuttletide', 'Falkenrath Gorger', 'Graf Reaver', 'Benalish Marshal', 'Goblin Ringleader', 'Wooded Bastion', 'Rootbound Crag', 'Midnight Reaper', 'Benevolent Bodyguard', 'Kunoros, Hound of Athreos', 'Porphyry Nodes', 'Kabira Takedown', 'Animation Module', 'Ashenmoor Liege', 'Windbrisk Heights', 'Rotting Rats', 'Multiple Choice', 'Kira, Great Glass-Spinner', 'Disallow', 'Avatar of Woe', 'Oath of Liliana', 'Dread Shade', 'Chance Encounter', 'Tendo Ice Bridge', 'Silent Submersible', 'Falkenrath Pit Fighter', 'Heartfire Immolator', 'Temple of Silence', 'Viashino Pyromancer', 'Wildfield Borderpost', 'Arbor Elf', 'Hinterland Harbor', 'Mystic Monastery', 'Steel Overseer', 'Reinforced Ronin', 'Ob Nixilis, the Fallen', 'Condemn', 'Outland Liberator', 'Kazuul''s Fury', 'Kaya, Ghost Assassin', 'Living Twister', 'Pillage', 'Reckless Impulse', 'Slitherhead', 'Dimir Aqueduct', 'Lotleth Troll', 'Containment Construct', 'Brute Suit', 'Tithe Taker', 'Giant Killer', 'Justice Strike', 'Dennick, Pious Apprentice', 'Disenchant', 'Talisman of Curiosity', 'Judith, the Scourge Diva', 'Village Messenger', 'Hatching Plans', 'Nevermore', 'Thirst for Meaning', 'Ghost Quarter', 'Master of the Pearl Trident', 'Siege-Gang Commander', 'Tectonic Giant', 'Faithful Mending', 'Selesnya Charm', 'Bedlam Reveler', 'Startle', 'It That Betrays', 'Lava Dart', 'Bloodchief''s Thirst', 'Deploy the Gatewatch', 'Reap the Past', 'Sundial of the Infinite', 'Cleansing Wildfire', 'Masterful Replication', 'Beast Whisperer', 'Hive Stirrings', 'Quest for the Holy Relic', 'Sharuum the Hegemon', 'Training Grounds', 'Anafenza, Kin-Tree Spirit', 'Moorland Haunt', 'Search for Tomorrow', 'Thawing Glaciers', 'Fatal Grudge', 'Frontier Bivouac', 'Dawn Charm', 'Silverblade Paladin', 'Kazandu Mammoth', 'Adanto Vanguard', 'Crack the Earth', 'Quest for the Nihil Stone', 'Vampire of the Dire Moon', 'Verdant Command', 'Magmatic Insight', 'Seasoned Hallowblade', 'Abrade', 'Sigil of Valor', 'Intruder Alarm', 'Profane Procession', 'Obstinate Baloth', 'Fieldmist Borderpost', 'Needle Spires', 'Mistvault Bridge', 'Throes of Chaos', 'Ajani, the Greathearted', 'Giant Ox', 'Plague Belcher', 'Reliquary Tower', 'Razortide Bridge', 'Garruk Wildspeaker', 'Temple of Deceit', 'Dovin Baan', 'Elves of Deep Shadow', 'Experimental Synthesizer', 'Colossus of Akros', 'Angel of Sanctions', 'The Underworld Cookbook', 'Lurching Rotbeast', 'Goldmire Bridge', 'Ethereal Haze', 'Behold the Multiverse', 'Trinket Mage', 'Shard Volley', 'Fury of the Horde', 'Decree of Justice', 'Maul of the Skyclaves', 'Zombie Infestation', 'Spell Pierce', 'Krark''s Thumb', 'Rabbit Battery', 'Avaricious Dragon', 'Sadistic Sacrament', 'Barren Moor', 'Grimdancer', 'Lingering Mirage', 'Holy Day', 'Prodigy''s Prototype', 'Firemane Avenger', 'Chandra, Pyromaster', 'Vivid Meadow', 'Lochmere Serpent', 'Polymorph', 'Mech Hangar', 'Heartless Summoning', 'Skyclave Pick-Axe', 'Debt to the Kami', 'Maestros Theater', 'Heartless Act', 'Muddle the Mixture', 'Enigma Sphinx', 'Llanowar Elves', 'Demonic Dread', 'Satyr Wayfinder', 'Rootborn Defenses', 'Diregraf Colossus', 'Spell Burst', 'Oblivion Ring', 'Rampant Growth', 'Elemental Masterpiece', 'Futurist Sentinel', 'Sandwurm Convergence', 'Adorned Pouncer', 'Otherworldly Gaze', 'Lord of the Undead', 'Sea''s Claim', 'Sorin Markov', 'Avatar of Discord', 'Tempered Sliver', 'Splendor Mare', 'Dread Presence', 'Moritte of the Frost', 'Everflowing Chalice', 'Flash of Insight', 'Mana Leak', 'Sarcomancy', 'Shrieking Affliction', 'Firebrand Archer', 'Terramorphic Expanse', 'Declaration in Stone', 'Nissa Revane', 'Burst Lightning', 'Satyr Hoplite', 'Dawn of Hope', 'Inga Rune-Eyes', 'Oversoul of Dusk', 'Power Sink', 'Sephara, Sky''s Blade', 'Vault Skirge', 'Chief of the Foundry', 'Ball Lightning', 'Sleeper Agent', 'Nivmagus Elemental', 'Rune-Scarred Demon', 'Dark Salvation', 'Michiko''s Reign of Truth', 'Mizzium Skin', 'Vryn Wingmare', 'Riveteers Overlook', 'Acolyte of Affliction', 'Archetype of Endurance', 'Cloudshift', 'Battle Screech', 'Call of the Conclave', 'Aven Squire', 'Goblin Bombardment', 'Woodfall Primus', 'Joraga Treespeaker', 'Slagstorm', 'Cloudpost', 'Indulgent Aristocrat', 'Judge''s Familiar', 'Coalition Relic', 'Foreboding Ruins', 'Reckoner''s Bargain', 'Irencrag Pyromancer', 'Omen of the Sun', 'Hissing Quagmire', 'Kiln Fiend', 'Grimoire Thief', 'Palace Siege', 'Hypergenesis', 'Nature''s Lore', 'Collective Effort', 'Venom Sliver', 'The Birth of Meletis', 'Swarm Shambler', 'Arcus Acolyte', 'Rush of Adrenaline', 'Kitchen Imp', 'Mistveil Plains', 'Secluded Courtyard', 'Brainstone', 'Temple of Enlightenment', 'Ponder', 'Abiding Grace', 'Ghitu Lavarunner', 'Elvish Archdruid', 'Lifecrafter''s Bestiary', 'Bolt Hound', 'Glen Elendra Archmage', 'March of Reckless Joy', 'Fertile Ground', 'Myth Realized', 'Raging Ravine', 'Glimmerpost', 'Faerie Vandal', 'Sliver Queen', 'Mistvein Borderpost', 'Gideon Jura', 'Sandsteppe Citadel', 'Knight of Glory', 'Gilded Lotus', 'Valiant Rescuer', 'Thirst for Knowledge', 'Voldaren Epicure', 'Veinfire Borderpost', 'Crumbling Vestige', 'Retributive Wand', 'Martyr of Sands', 'Sprite Dragon', 'Nether Traitor', 'Grand Architect', 'Battlefield Forge', 'Obscura Storefront', 'Goblin Electromancer', 'Drannith Stinger', 'Brave the Elements', 'Hellrider', 'Cabaretti Courtyard', 'Brushfire Elemental', 'Mindslaver', 'Undead Butler', 'Grasp of Darkness', 'Sarkhan the Masterless', 'Sword-Point Diplomacy', 'Nezahal, Primal Tide', 'Dragonskull Summit', 'Plated Geopede', 'Explore', 'Disciple of Bolas', 'Thermo-Alchemist', 'Merfolk Sovereign', 'Ramunap Excavator', 'Scrapheap Scrounger', 'Birds of Paradise', 'Grenzo, Dungeon Warden', 'Smallpox', 'Folio of Fancies', 'Dregscape Sliver', 'Just the Wind', 'Spawning Pool', 'Vivid Grove', 'Tectonic Reformation', 'Bituminous Blast', 'Hero of Precinct One', 'Akroan Crusader', 'Radiant Scrollwielder', 'Endbringer', 'Rashmi, Eternities Crafter', 'Crux of Fate', 'Kumano Faces Kakkazan', 'Memorial to Glory', 'Abundant Harvest', 'Vampire Nighthawk', 'Duress', 'Vampire''s Kiss', 'Mystic Snake', 'Monstrous Carabid', 'Obsessive Search', 'Tempered in Solitude', 'Piranha Marsh', 'Imperious Perfect', 'Vault of the Archangel', 'Mirran Crusader', 'Rustvale Bridge', 'Mind''s Desire', 'Honor of the Pure', 'Fauna Shaman', 'Phyrexian Dreadnought', 'Scorched Rusalka', 'Power Depot', 'Staff of Domination', 'Hornet Queen', 'Scab-Clan Berserker', 'Sparksmith', 'Brokers Charm', 'Wandering Mind', 'Obsessive Stitcher', 'Myr Sire', 'Sensor Splicer', 'Stitcher''s Graft', 'Runed Halo', 'Collateral Damage', 'Harbinger of the Tides', 'Ethersworn Canonist', 'Temple of Malice', 'Ancient Stirrings', 'Lonis, Cryptozoologist', 'Brute Force', 'Sky Hussar', 'Westvale Abbey', 'Fire-Lit Thicket', 'Kopala, Warden of Waves', 'Tide Shaper', 'Hellspark Elemental', 'Chromatic Lantern', 'Panharmonicon', 'Swans of Bryn Argoll', 'Old Stickfingers', 'Cathartic Pyre', 'Wild Cantor', 'Duskwielder', 'Thaumatic Compass', 'Dark Intimations', 'Hell Mongrel', 'Bogardan Hellkite', 'Dark Ritual', 'Merchant of the Vale', 'Promise of Bunrei', 'Dead // Gone', 'Jace, the Living Guildpact', 'Glimpse of Tomorrow', 'Conclave Mentor', 'Mist-Cloaked Herald', 'Oust', 'Mask of the Mimic', 'Healer''s Hawk', 'Incinerate', 'Skirk Prospector', 'Grapeshot', 'Fireblade Charger', 'Doomed Traveler', 'Barrin, Tolarian Archmage', 'Path to the World Tree', 'Delver of Secrets', 'Treacherous Blessing', 'Mogg War Marshal', 'Nylea''s Presence', 'Restore Balance', 'Sign in Blood', 'Mobilized District', 'Keruga, the Macrosage', 'Pyrrhic Revival', 'Frantic Inventory', 'Scale of Chiss-Goria', 'Brokers Hideout', 'Stormblood Berserker', 'Mesmeric Fiend', 'Snowfield Sinkhole', 'Ashenmoor Gouger', 'Shriekhorn', 'Izzet Boilerworks', 'Disciple of the Vault', 'Flame Slash', 'Unesh, Criosphinx Sovereign', 'Knight of Infamy', 'Tooth and Nail', 'Expansion // Explosion', 'Seething Song', 'Trickbind', 'Painful Truths', 'Culling Scales', 'Drossforge Bridge', 'Underworld Connections', 'Dauntless Bodyguard', 'Approach of the Second Sun', 'Transmogrify', 'Possibility Storm', 'Mirrorshell Crab', 'Arguel''s Blood Fast', 'Horror of the Broken Lands', 'Mausoleum Secrets', 'Repeal', 'Platinum Angel', 'Kodama''s Reach', 'Inevitable Betrayal', 'Thornglint Bridge', 'Temple of Malady', 'Bazaar Trademage', 'Greater Gargadon', 'Dizzy Spell', 'Shatterskull Charger', 'Avacyn''s Pilgrim', 'Invoke Calamity', 'Mirage Mirror', 'Tezzeret''s Gambit', 'Firebolt', 'Wonder', 'Thirst for Discovery', 'Sigarda''s Splendor', 'Touch the Spirit Realm', 'Kessig Flamebreather', 'Tanglepool Bridge', 'Champion of Wits', 'Born to Drive', 'Shriekmaw', 'Drannith Healer', 'Eiganjo Castle', 'Opt', 'Darksteel Ingot', 'Good-Fortune Unicorn', 'Reckless Waif', 'Master Splicer', 'Halimar Excavator', 'Cruel Edict', 'Llanowar Wastes', 'Flourishing Fox', 'Clarion Spirit', 'Familiar''s Ruse', 'Primalcrux', 'Sylvan Messenger', 'Castigate', 'Argentum Armor', 'Renewed Faith', 'Ionize', 'Spirited Companion', 'Temple of Epiphany', 'Twinflame', 'Farseek', 'Grumgully, the Generous', 'Rishkar, Peema Renegade', 'Terminus', 'The Scorpion God', 'Blackmail', 'Blazing Shoal', 'Wavesifter', 'Jace, Memory Adept', 'Snow-Covered Plains', 'Hunted Witness', 'Game Trail', 'Circle of Confinement', 'Murderous Redcap', 'Magister of Worth', 'Fanatical Firebrand', 'Seaside Citadel', 'Doom Foretold', 'Crash Through', 'Gray Merchant of Asphodel', 'Anguished Unmaking', 'Loyal Pegasus', 'Spawning Breath', 'Discovery // Dispersal', 'Scrap Trawler', 'Conduit of Ruin', 'Dread Fugue', 'Noosegraf Mob', 'Snow-Covered Swamp', 'Tomb of Urami', 'Goblin Trashmaster', 'Day of Judgment', 'Steppe Lynx', 'Vindicate', 'Sinister Concoction', 'Assert Authority', 'Ravenous Chupacabra', 'Tendrils of Agony', 'Cerodon Yearling', 'Dismal Backwater', 'Voidslime', 'Cordial Vampire', 'Wild Nacatl', 'Port of Karfell', 'Unburial Rites', 'Serrated Scorpion', 'Merfolk Mistbinder', 'Hollowhead Sliver', 'Shalai, Voice of Plenty', 'Sarkhan the Mad', 'Watcher for Tomorrow', 'Glorious End', 'Dark-Dweller Oracle', 'Temple Bell', 'Slagwoods Bridge', 'Detention Sphere', 'Skull Prophet', 'Field of Ruin', 'Drown in Sorrow', 'Murderous Cut', 'Ground Rift', 'Gatekeeper of Malakir', 'Champion of the Parish', 'Netherborn Phalanx', 'Gavony Township', 'Dream Trawler', 'Canyon Slough', 'Oona, Queen of the Fae', 'Witching Well', 'Myr Reservoir', 'Anticipate', 'Grave Scrabbler', 'Crypt of Agadeem', 'Obliterate', 'Leechridden Swamp', 'Kird Ape', 'Chancellor of the Dross', 'Spikefield Hazard', 'Catch // Release', 'Angel of Glory''s Rise', 'Cursecatcher', 'Stone Rain', 'Rite of Oblivion', 'Akoum Hellhound', 'Elvish Harbinger', 'Sylvan Scrying', 'Ojutai''s Command', 'Pathrazer of Ulamog', 'Silvergill Adept', 'Buried Ruin', 'Prophetic Prism', 'Vivid Marsh', 'Sungold Sentinel', 'Lantern of the Lost', 'Parcel Myr', 'Scrapyard Recombiner', 'Memnarch', 'General Ferrous Rokiric', 'Ethersworn Sphinx', 'Sylvan Advocate'))) 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, 63.0, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (113.7 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Obscura Storefront', 'Greater Gargadon', 'Temple of Silence', 'Primal Command', 'Stone Rain', 'Edric, Spymaster of Trest', 'Nissa''s Chosen', 'Hornet Queen', 'Monstrous Carabid', 'Gideon''s Lawkeeper', 'Graveyard Marshal', 'Sword-Point Diplomacy', 'Arch of Orazca', 'Spell Pierce', 'Kaya, Ghost Assassin', 'Panharmonicon', 'Demonic Dread', 'Glint Hawk', 'Fungus Sliver', 'Abiding Grace', 'Aetherling', 'Izzet Boilerworks', 'Worldgorger Dragon', 'Vivid Meadow', 'Sleight of Hand', 'Rishkar, Peema Renegade', 'Razortide Bridge', 'Colossus of Akros', 'Forbid', 'Blood Fountain', 'Jace, the Living Guildpact', 'White Sun''s Zenith', 'Mirran Crusader', 'Ghostly Pilferer', 'Curiosity', 'Cemetery Reaper', 'Mythos of Nethroi', 'Nemesis of Mortals', 'Sleeper Agent', 'Desperate Ritual', 'Kira, Great Glass-Spinner', 'Hotshot Mechanic', 'Ancestral Anger', 'Angel of Glory''s Rise', 'Heartfire Immolator', 'Giant Ox', 'Acolyte of Affliction', 'Born to Drive', 'Commit // Memory', 'Windbrisk Heights', 'Vivid Marsh', 'Cathartic Pyre', 'Silundi Vision', 'Irencrag Pyromancer', 'Sarkhan the Masterless', 'Cloudcrest Lake', 'Scythe Leopard', 'Mirror March', 'Tidal Warrior', 'Twisted Abomination', 'Advent of the Wurm', 'Rift Sower', 'Bloodchief''s Thirst', 'Sprite Dragon', 'Desecration Demon', 'Vampire of the Dire Moon', 'Woodfall Primus', 'See the Truth', 'Skyscribing', 'Smallpox', 'Reckless Impulse', 'Dark Salvation', 'Tower of Calamities', 'Bogardan Hellkite', 'Oona, Queen of the Fae', 'Darigaaz Reincarnated', 'Varragoth, Bloodsky Sire', 'Mindslaver', 'Sylvan Scrying', 'Brain Freeze', 'Arbor Elf', 'Mirrodin Besieged', 'Firebrand Archer', 'Martyr of Sands', 'Harrow', 'Deploy the Gatewatch', 'Raise the Alarm', 'Dauntless Bodyguard', 'Mogg War Marshal', 'Plated Geopede', 'Reflex Sliver', 'Stormblood Berserker', 'Acidic Slime', 'Jace, Memory Adept', 'Temple of Malady', 'Heir of Falkenrath', 'Keruga, the Macrosage', 'The Bloodsky Massacre', 'Containment Construct', 'Buried Alive', 'Anticipate', 'Voidslime', 'Swans of Bryn Argoll', 'Dismal Backwater', 'Disciple of Bolas', 'Dread Return', 'Goblin Ringleader', 'Abbot of Keral Keep', 'Frenetic Sliver', 'Thornglint Bridge', 'Gonti, Lord of Luxury', 'Brave the Elements', 'Forked Bolt', 'Benevolent Bodyguard', 'Gigantomancer', 'Captured Sunlight', 'Painful Truths', 'Howling Mine', 'Rashmi, Eternities Crafter', 'Crumbling Necropolis', 'Bituminous Blast', 'Myr Superion', 'Grave Scrabbler', 'Orcish Lumberjack', 'Grimoire Thief', 'Ramunap Excavator', 'Hissing Quagmire', 'Burning Vengeance', 'Fanatical Firebrand', 'Sticky Fingers', 'Justice Strike', 'Terminus', 'Scrap Welder', 'Knight of Glory', 'Grimdancer', 'Black Sun''s Zenith', 'Mistveil Plains', 'Stubborn Denial', 'Sylvan Primordial', 'Ethersworn Canonist', 'Terramorphic Expanse', 'Thermo-Alchemist', 'Bone Shards', 'Decree of Justice', 'Debt to the Kami', 'Angel of Sanctions', 'Dregscape Sliver', 'Mirage Mirror', 'Argentum Armor', 'Deep Forest Hermit', 'Cursecatcher', 'Llanowar Mentor', 'Temple of Mystery', 'Throes of Chaos', 'Phantasmagorian', 'Dragonkin Berserker', 'Spikefield Hazard', 'Goblin Cratermaker', 'Lingering Mirage', 'Agonizing Remorse', 'Fireblade Charger', 'Seething Song', 'Bloodhall Priest', 'Cruel Ultimatum', 'Day of Judgment', 'Prodigy''s Prototype', 'Mizzium Mortars', 'Kefnet the Mindful', 'Sunblade Samurai', 'Sultai Charm', 'Farseek', 'Goblin Dark-Dwellers', 'Forgotten Cave', 'Kitchen Imp', 'Avatar of Woe', 'Viscera Seer', 'Old Stickfingers', 'Underworld Dreams', 'Drannith Stinger', 'Judith, the Scourge Diva', 'Chain Lightning', 'Skophos Reaver', 'Tendo Ice Bridge', 'Goblin Trashmaster', 'Obsessive Search', 'Rishadan Dockhand', 'Scale of Chiss-Goria', 'Solitary Confinement', 'Vessel of Nascency', 'Phyrexian Dreadnought', 'Infernal Grasp', 'Fauna Shaman', 'Twinflame', 'Cathar Commando', 'Pia''s Revolution', 'Sphinx''s Tutelage', 'Wake Thrasher', 'Sparksmith', 'Nevermore', 'Orim''s Chant', 'Mind''s Desire', 'Kunoros, Hound of Athreos', 'Lavaclaw Reaches', 'Flame Jab', 'Skyclave Shade', 'Brokers Charm', 'Elvish Archdruid', 'Duty-Bound Dead', 'Culling Scales', 'Harbinger of the Tides', 'Grisly Salvage', 'Falkenrath Gorger', 'Ethereal Haze', 'Slitherhead', 'Halimar Excavator', 'Homing Sliver', 'Elixir of Immortality', 'Firewild Borderpost', 'Netherborn Phalanx', 'Temple of Enlightenment', 'Death Cloud', 'Signal Pest', 'Mistvein Borderpost', 'Ghitu Lavarunner', 'Lightning Rift', 'Rite of Oblivion', 'Blackmail', 'Tymaret, Chosen from Death', 'Polymorph', 'Game Trail', 'Barrin, Tolarian Archmage', 'Viashino Pyromancer', 'Bastion of Remembrance', 'Pyrrhic Revival', 'Avacyn''s Pilgrim', 'Nature''s Lore', 'Jokulhaups', 'Woodland Cemetery', 'Tectonic Giant', 'Stern Dismissal', 'Incinerate', 'Sungold Sentinel', 'Kazandu Mammoth', 'Hellspark Elemental', 'Flame-Kin Zealot', 'Dovin Baan', 'Disallow', 'Westvale Abbey', 'Firebolt', 'Knight of the White Orchid', 'Zulaport Cutthroat', 'Putrid Imp', 'Satyr Wayfinder', 'Think Twice', 'Colossal Skyturtle', 'Spark Elemental', 'Drown in Sorrow', 'Fury of the Horde', 'Hinterland Harbor', 'Gilded Lotus', 'Mire Triton', 'Rustvale Bridge', 'Tezzeret''s Gambit', 'Mausoleum Secrets', 'Nightscape Familiar', 'Touch the Spirit Realm', 'Experimental Synthesizer', 'Undead Butler', 'Murderous Cut', 'Zenith Flare', 'Tide Shaper', 'Sigarda''s Splendor', 'Akrasan Squire', 'Lumbering Falls', 'Mystic Retrieval', 'Thaumatic Compass', 'Hollowhead Sliver', 'Tooth of Chiss-Goria', 'Ancient Stirrings', 'Sliver Queen', 'Voldaren Epicure', 'Pyretic Ritual', 'Scoured Barrens', 'Extractor Demon', 'Claim the Firstborn', 'Conclave Mentor', 'Counterflux', 'Hunted Witness', 'Talisman of Curiosity', 'Urza''s Factory', 'Fyndhorn Elves', 'Sigil of Valor', 'Maul of the Skyclaves', 'Master of Death', 'Trickbind', 'Kodama''s Reach', 'Obstinate Baloth', 'Merchant of the Vale', 'Den Protector', 'Wayward Guide-Beast', 'Lantern of the Lost', 'Silverbluff Bridge', 'Kiln Fiend', 'Inevitable Betrayal', 'Silvergill Adept', 'Promise of Bunrei', 'Skull Prophet', 'Electrostatic Field', 'Flame Javelin', 'Treasure Cruise', 'Unesh, Criosphinx Sovereign', 'Stitcher''s Graft', 'Cabal Initiate', 'Captivating Vampire', 'Erebos''s Intervention', 'Blacklance Paragon', 'Honor of the Pure', 'Naban, Dean of Iteration', 'Grim Haruspex', 'Living Twister', 'Tooth and Nail', 'Foreboding Ruins', 'Chance Encounter', 'Battlefield Forge', 'Gaea''s Will', 'Logic Knot', 'Fiery Temper', 'Lavabelly Sliver', 'Go for the Throat', 'Nether Spirit', 'General Ferrous Rokiric', 'Vivid Crag', 'Cloudpost', 'Treacherous Blessing', 'Arcbound Worker', 'Endbringer', 'Platinum Angel', 'Castigate', 'Voltaic Servant', 'Scab-Clan Berserker', 'Primalcrux', 'Dawn of Hope', 'Crackleburr', 'Hero of Precinct One', 'Obsessive Stitcher', 'Sire of Insanity', 'Secluded Steppe', 'Brushfire Elemental', 'Lonis, Cryptozoologist', 'Llanowar Tribe', 'Nezahal, Primal Tide', 'Cloudshift', 'Snow-Covered Forest', 'Dream Trawler', 'Blackbloom Rogue', 'Muddle the Mixture', 'Imperious Perfect', 'Witch''s Cottage', 'Flayer of the Hatebound', 'Avatar of Discord', 'Ground Rift', 'Bedlam Reveler', 'Crumbling Vestige', 'Flame Slash', 'Akroma''s Memorial', 'Opt', 'Graf Reaver', 'Beast Whisperer', 'Throne of Geth', 'Dread Shade', 'Abrade', 'Coralhelm Commander', 'Indulgent Aristocrat', 'Caves of Koilos', 'Shriekhorn', 'Hypergenesis', 'Dormant Sliver', 'Gray Merchant of Asphodel', 'Thirst for Meaning', 'Dread Fugue', 'Heartless Act', 'The Birth of Meletis', 'Skyclave Cleric', 'Vedalken Shackles', 'Grasp of Darkness', 'Scrap Trawler', 'Selesnya Charm', 'Frontier Bivouac', 'Temple of Epiphany', 'Magister of Worth', 'Kari Zev''s Expertise', 'Raven''s Crime', 'Mishra''s Factory', 'Noosegraf Mob', 'Circular Logic', 'Asylum Visitor', 'Underworld Connections', 'Treasure Hunt', 'Hive Stirrings', 'Good-Fortune Unicorn', 'Sygg, River Cutthroat', 'Lonely Sandbar', 'Brute Suit', 'Watcher for Tomorrow', 'Lashwrithe', 'Steppe Lynx', 'Spawning Breath', 'Tectonic Reformation', 'Reliquary Tower', 'Chandra, Pyromaster', 'Patchwork Automaton', 'Springbloom Druid', 'The Scorpion God', 'Crux of Fate', 'Archetype of Endurance', 'Doomskar Titan', 'Slip Out the Back', 'Clifftop Retreat', 'Multiple Choice', 'Goblin Matron', 'Cultivate', 'Maestros Theater', 'Quest for the Nihil Stone', 'Dragonstorm', 'Mystic Snake', 'Rescue', 'Imposing Vantasaur', 'Diffusion Sliver', 'Diabolic Edict', 'Kird Ape', 'Bloodbraid Elf', 'Defiant Strike', 'Valiant Rescuer', 'Origin Spellbomb', 'Sojourner''s Companion', 'Emmara, Soul of the Accord', 'Mask of the Mimic', 'Ravenous Chupacabra', 'Llanowar Wastes', 'Buried Ruin', 'Dive Down', 'Radiant Scrollwielder', 'Loyal Pegasus', 'Masterful Replication', 'Diregraf Ghoul', 'Ojutai''s Command', 'Elvish Harbinger', 'Llanowar Elves', 'Cut // Ribbons', 'Lose Focus', 'Timeless Witness', 'Kjeldoran Outpost', 'Fire Prophecy', 'Dispel', 'Wildfield Borderpost', 'Wild Cantor', 'Assault Strobe', 'Obscura Charm', 'Growth-Chamber Guardian', 'Startle', 'Collateral Damage', 'Jace Beleren', 'Village Messenger', 'Otherworldly Gaze', 'Zombie Infestation', 'Qasali Pridemage', 'Hieroglyphic Illumination', 'Purphoros''s Intervention', 'Holy Day', 'Duress', 'Repeal', 'Tidespout Tyrant', 'Mistvault Bridge', 'Giant Killer', 'Frantic Inventory', 'Canyon Slough', 'Festival Crasher', 'Spark Spray', 'Moorland Haunt', 'Glowspore Shaman', 'Vedalken Engineer', 'Orzhov Signet', 'Trinket Mage', 'Secrets of the Dead', 'Silent Submersible', 'Elvish Mystic', 'Zabaz, the Glimmerwasp', 'Unsubstantiate', 'Arrogant Wurm', 'Zurgo Bellstriker', 'Knight of Infamy', 'Glen Elendra Archmage', 'Adanto Vanguard', 'Thraben Inspector', 'Tithe Taker', 'Brainstone', 'Rakdos Charm', 'Delver of Secrets', 'Joraga Treespeaker', 'Verdant Command', 'Karn''s Bastion', 'Oversoul of Dusk', 'Clarion Spirit', 'Skyclave Pick-Axe', 'Cremate', 'Enigma Sphinx', 'Goblin Chieftain', 'Memory Lapse', 'Temple of Deceit', 'Dimir Aqueduct', 'Sangrophage', 'Lava Dart', 'Drannith Healer', 'Revitalize', 'Rabbit Battery', 'Tendrils of Agony', 'Eternal Dragon', 'Empty the Pits', 'Dark-Dweller Oracle', 'Wall of Omens', 'Quest for the Holy Relic', 'Tireless Provisioner', 'Ornithopter', 'Sign in Blood', 'Pyroclasm', 'Plow Under', 'Wavesifter', 'Etherium Sculptor', 'Blazing Rootwalla', 'Negate', 'Ionize', 'Demigod of Revenge', 'Rootborn Defenses', 'Cabaretti Courtyard', 'Cathartic Reunion', 'Sephara, Sky''s Blade', 'Nicol Bolas, Planeswalker', 'Intangible Virtue', 'Scorched Rusalka', 'Power Depot', 'Feed the Swarm', 'Grand Architect', 'Doomed Traveler', 'Temple of Malice', 'Myr Battlesphere', 'Terrarion', 'Temporal Fissure', 'Dark Ritual', 'Fact or Fiction', 'Detention Sphere', 'Flame Rift', 'Fieldmist Borderpost', 'Lord of the Undead', 'Dizzy Spell', 'Nether Traitor', 'Goblin Bombardment', 'Ajani, the Greathearted', 'Bump in the Night', 'Arcus Acolyte', 'Darkheart Sliver', 'Shard Volley', 'Myth Realized', 'Tempered Sliver', 'Gemhide Sliver', 'Hypnotic Specter', 'Sharuum the Hegemon', 'Parcel Myr', 'Fatal Grudge', 'Acquisitions Expert', 'Liliana Vess', 'Lyzolda, the Blood Witch', 'Adorned Pouncer', 'Hymn to Tourach', 'Psychatog', 'Marwyn, the Nurturer', 'Azorius Charm', 'Needle Spires', 'Grenzo, Dungeon Warden', 'Sky Hussar', 'Kessig Flamebreather', 'Jwari Disruption', 'Obliterate', 'Ranger of Eos', 'Akoum Hellhound', 'Goblin Electromancer', 'Merfolk Mistbinder', 'Hellrider', 'Kami of False Hope', 'Steel Overseer', 'Bazaar Trademage', 'Spell Burst', 'Siege-Gang Commander', 'Judge''s Familiar', 'Distended Mindbender', 'Sadistic Sacrament', 'Rotting Rats', 'Trostani''s Summoner', 'Rush of Adrenaline', 'Reality Ripple', 'Rune-Scarred Demon', 'Call the Bloodline', 'Port of Karfell', 'Search for Tomorrow', 'Wrath of God', 'Cosmos Elixir', 'Kher Keep', 'Esper Charm', 'Sinister Concoction', 'Biting Rain', 'Glorious End', 'Unlucky Witness', 'Condemn', 'Murderous Redcap', 'Blazing Shoal', 'Vryn Wingmare', 'Dread Presence', 'Nissa Revane', 'Lone Rider', 'Path to the World Tree', 'Restoration Angel', 'Geomancer''s Gambit', 'Anafenza, Kin-Tree Spirit', 'Brokers Hideout', 'Shriekmaw', 'Metalwork Colossus', 'Scrapyard Recombiner', 'Raze the Effigy', 'Champion of Wits', 'Futurist Sentinel', 'Tradewind Rider', 'Thought Scour', 'Cerodon Yearling', 'Chief Engineer', 'Scuttletide', 'Approach of the Second Sun', 'Korlash, Heir to Blackblade', 'Slagstorm', 'Ball Lightning', 'Arcbound Mouser', 'Seasoned Hallowblade', 'Mirrorshell Crab', 'Dark Intimations', 'Swarm Shambler', 'March of Reckless Joy', 'Stromkirk Noble', 'Secluded Courtyard', 'Gitaxian Probe', 'Arcbound Ravager', 'Disenchant', 'Healer''s Hawk', 'Anguished Unmaking', 'Pillage', 'Chamber Sentry', 'Glacial Fortress', 'Herald of Leshrac', 'Animation Module', 'Quicksilver Fountain', 'Memnarch', 'Staff of Domination', 'Splendor Mare', 'Outland Liberator', 'Tempest Djinn', 'Chief of the Foundry', 'Coalition Relic', 'Mission Briefing', 'Thirst for Knowledge', 'Resurgent Belief', 'Power Sink', 'All Suns'' Dawn', 'Myr Retriever', 'Reap the Past', 'Sarkhan the Mad', 'Nested Shambler', 'Bonescythe Sliver', 'Battle Screech', 'Inga Rune-Eyes', 'Fabricate', 'Temple Bell', 'Merrow Reejerey', 'Vindicate', 'Porphyry Nodes', 'Lifecrafter''s Bestiary', 'Bolt Hound', 'Arcbound Javelineer', 'Elvish Visionary', 'Reckless Waif', 'Flash of Insight', 'Barbarian Ring', 'Swiftwater Cliffs', 'Cosima, God of the Voyage', 'Shatterskull Charger', 'Satyr Hoplite', 'Okiba Reckoner Raid', 'Ashenmoor Liege', 'Tanglepool Bridge', 'Sunscorched Desert', 'Bloodline Keeper', 'Nomad Outpost', 'Myr Reservoir', 'Skemfar Avenger', 'Sarcomancy', 'Assert Authority', 'Call of the Conclave', 'Curious Pair', 'Arcane Sanctum', 'Sundial of the Infinite', 'Earthshaker Khenra', 'Basking Rootwalla', 'Carth the Lion', 'Wooded Bastion', 'Hour of Reckoning', 'Changeling Outcast', 'Dryad Militant', 'Restore Balance', 'Goldmire Bridge', 'Death Baron', 'Firemane Avenger', 'Spellweaver Helix', 'Darksteel Colossus', 'Auramancer', 'Profane Procession', 'Warleader''s Helix', 'Broodstar', 'Izzet Charm', 'Flourishing Fox', 'Seismic Assault', 'Silent Arbiter', 'Skirk Prospector', 'Shalai, Voice of Plenty', 'Fire Covenant', 'Dimir Charm', 'Soul Spike', 'Vampire''s Kiss', 'Catch // Release', 'Dreg Mangler', 'Skyclave Relic', 'Midnight Clock', 'Benalish Marshal', 'Squadron Hawk', 'Lotleth Troll', 'Magmatic Insight', 'Oath of Liliana', 'Reckoner''s Bargain', 'Arguel''s Blood Fast', 'Perilous Research', 'Collective Effort', 'Transmogrify', 'Circle of Confinement', 'Blade Splicer', 'Wild Nacatl', 'Glimmerpost', 'Intruder Alarm', 'Riveteers Overlook', 'Wonder', 'Crypt of Agadeem', 'Vapor Snag', 'Path of Mettle', 'Training Grounds', 'Primal Surge', 'Pathrazer of Ulamog', 'Piranha Marsh', 'Edgewall Innkeeper', 'Arcane Infusion', 'Fertile Ground', 'Retributive Wand', 'Duskwielder', 'Doom Foretold', 'Chancellor of the Dross', 'Sovereign''s Bite', 'Fireblade Artist', 'Shardless Agent', 'Expansion // Explosion', 'Realm Razer', 'Lurching Rotbeast', 'Nylea''s Presence', 'Oni-Cult Anvil', 'Ethersworn Sphinx', 'Akroan Crusader', 'Gideon Jura', 'Fire-Lit Thicket', 'Grapeshot', 'Virulent Sliver', 'Witching Well', 'Kabira Takedown', 'Falkenrath Pit Fighter', 'Hell Mongrel', 'Sea''s Claim', 'Coiling Oracle', 'Champion of the Parish', 'Brute Force', 'Invoke Calamity', 'Tyrant''s Scorn', 'Leechridden Swamp', 'Wandering Mind', 'Tyrant of Discord', 'Mythos of Brokkos', 'Kopala, Warden of Waves', 'Zetalpa, Primal Dawn', 'Mystic Monastery', 'Elves of Deep Shadow', 'Silverblade Paladin', 'Renewed Faith', 'Ultimate Price', 'Snow-Covered Plains', 'Hythonia the Cruel', 'Joraga Warcaller', 'Aven Squire', 'Falkenrath Aristocrat', 'Cruel Edict', 'Prophetic Prism', 'Voldaren Pariah', 'Reveillark', 'Dawn Charm', 'Go for Blood', 'Blistercoil Weird', 'Waterfront District', 'Porcelain Legionnaire', 'Anax, Hardened in the Forge', 'Serrated Scorpion', 'Sandsteppe Citadel', 'Midnight Reaper', 'Vault Skirge', 'Avaricious Dragon', 'Heliod''s Pilgrim', 'Explore', 'Shrapnel Blast', 'Tangleroot', 'Cleansing Wildfire', 'Crack the Earth', 'Vital Splicer', 'Sylvan Messenger', 'Eiganjo Castle', 'Dark Withering', 'Veinfire Borderpost', 'Pieces of the Puzzle', 'Mizzium Skin', 'Faithful Mending', 'Frantic Search', 'Tomb of Urami', 'Bala Ged Recovery', 'Gatekeeper of Malakir', 'Cordial Vampire', 'Vault of the Archangel', 'Rakdos Headliner', 'Countervailing Winds', 'Coordinated Assault', 'Sylvan Advocate', 'Deep Analysis', 'Ashenmoor Gouger', 'Commune with the Gods', 'Runed Halo', 'Discovery // Dispersal', 'Gavony Township', 'Plague Belcher', 'Sphinx of the Steel Wind', 'Flaying Tendrils', 'Master of the Pearl Trident', 'Altar of the Brood', 'Stirring Wildwood', 'Sandwurm Convergence', 'Dragonskull Summit', 'Michiko''s Reign of Truth', 'Heartless Summoning', 'Rosethorn Acolyte', 'Scrapheap Scrounger', 'Mesa Enchantress', 'The Underworld Cookbook', 'Memorial to Glory', 'Mist-Cloaked Herald', 'Soul Snare', 'Venom Sliver', 'Brimstone Dragon', 'Dennick, Pious Apprentice', 'Folio of Fancies', 'Crash Through', 'Master Splicer', 'Garruk Wildspeaker', 'Lochmere Serpent', 'Possibility Storm', 'Evolving Wilds', 'Everflowing Chalice', 'Spirited Companion', 'Crashing Drawbridge', 'Temporal Extortion', 'Fling', 'Skirk Ridge Exhumer', 'Shredded Sails', 'Glimpse of Tomorrow', 'Galerider Sliver', 'Lodestone Golem', 'Diregraf Colossus', 'Abundant Harvest', 'Mech Hangar', 'Claws of Gix', 'Oust', 'Hive Mind', 'Shrieking Affliction', 'Elemental Masterpiece', 'Bile Blight', 'Animate Dead', 'Vivid Grove', 'Ghitu Encampment', 'Kumano Faces Kakkazan', 'Oblivion Ring', 'Nivmagus Elemental', 'Sylvan Library', 'Palace Siege', 'Torrent Sculptor', 'Slagwoods Bridge', 'Drowned Catacomb', 'Myr Sire', 'Alchemist''s Gambit', 'Snow-Covered Mountain', 'Ash Zealot', 'Spawning Pool', 'Dead // Gone', 'Tribute Mage', 'Mobilized District', 'Birds of Paradise', 'Vampire Nighthawk', 'Mobilizer Mech', 'Ghoultree', 'Tempered in Solitude', 'Vivid Creek', 'Field of Ruin', 'Ajani Unyielding', 'Familiar''s Ruse', 'Rakdos Cackler', 'Carnophage', 'Might Sliver', 'Sarcomite Myr', 'Burst Lightning', 'Snowfield Sinkhole', 'Unburial Rites', 'Putrid Goblin', 'Reinforced Ronin', 'Faerie Vandal', 'Reckless Charge', 'Krark''s Thumb', 'Ghost Quarter', 'Angel of Despair', 'Nimble Mongoose', 'Moritte of the Frost', 'Iron Apprentice', 'First-Sphere Gargantua', 'Conduit of Ruin', 'Glorybringer', 'Sensor Splicer', 'Declaration in Stone', 'Maestros Charm', 'Thawing Glaciers', 'Rootbound Crag', 'Just the Wind', 'Tyrant''s Choice', 'Hatching Plans', 'Chromatic Lantern', 'Hagra Mauling', 'It That Betrays', 'Seaside Citadel', 'Thirst for Discovery', 'Rampant Growth', 'Merfolk Sovereign', 'Mana Leak', 'Barren Moor', 'Omen of the Sun', 'Sorin Markov', 'Aether Spellbomb', 'Kazuul''s Fury', 'Mesmeric Fiend', 'Raging Ravine', 'Grumgully, the Generous', 'Ob Nixilis, the Fallen', 'Ponder', 'Behold the Multiverse', 'Disciple of the Vault', 'Horror of the Broken Lands', 'Darksteel Ingot', 'Drossforge Bridge', 'Wrench Mind', 'Snow-Covered Swamp', 'Luminarch Ascension', 'Wight', 'Stormtide Leviathan', 'Sphinx of Foresight'))) 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, 113.7, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (69.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Obliterate', 'Slagstorm', 'Infernal Grasp', 'Panharmonicon', 'Blazing Shoal', 'Lightning Crafter', 'Arcane Sanctum', 'Banehound', 'Treacherous Blessing', 'Mindslicer', 'Electrostatic Field', 'Temple of Silence', 'Goro-Goro, Disciple of Ryusei', 'Voidslime', 'Hinterland Harbor', 'Hour of Promise', 'Scoured Barrens', 'Tempest Djinn', 'Krosan Grip', 'Tyrant''s Scorn', 'Dark Withering', 'Barrin, Tolarian Archmage', 'Acidic Slime', 'Rishadan Dockhand', 'Marwyn, the Nurturer', 'Tangleroot', 'Wrath of God', 'Treasure Cruise', 'Hour of Reckoning', 'Dovin Baan', 'Dregscape Sliver', 'Just the Wind', 'Lumbering Falls', 'Mana Leak', 'Sphinx''s Tutelage', 'Cerodon Yearling', 'Elite Guardmage', 'Doom Foretold', 'Greater Gargadon', 'Tomb of Urami', 'Elvish Mystic', 'Chance Encounter', 'Engulf the Shore', 'Keruga, the Macrosage', 'Frost Titan', 'Dread Shade', 'Ball Lightning', 'Reality Ripple', 'Treasure Hunt', 'Spellweaver Helix', 'Sunblade Samurai', 'Animal Magnetism', 'Skyclave Shade', 'Ajani, the Greathearted', 'Honor of the Pure', 'Terramorphic Expanse', 'Horror of the Broken Lands', 'Desperate Ritual', 'Tendrils of Agony', 'Stubborn Denial', 'Mesmeric Fiend', 'Dormant Sliver', 'Obscura Storefront', 'Orcish Lumberjack', 'Dead // Gone', 'Graveyard Marshal', 'Vryn Wingmare', 'Slagwoods Bridge', 'Genesis Hydra', 'Blessed Defiance', 'Fyndhorn Elves', 'Abiding Grace', 'Wild Nacatl', 'Regrowth', 'Deep Analysis', 'Lantern of the Lost', 'Pathrazer of Ulamog', 'Lead the Stampede', 'Justice Strike', 'Power Depot', 'Hanweir Garrison', 'Frontier Bivouac', 'Gitaxian Probe', 'Celestial Kirin', 'Plow Under', 'Lose Focus', 'Invoke Calamity', 'Conclave Cavalier', 'Catch // Release', 'Lurching Rotbeast', 'Call of the Conclave', 'Snow-Covered Plains', 'Mask of the Mimic', 'Dismal Backwater', 'Mythos of Nethroi', 'Mirrorshell Crab', 'Mirror March', 'Erebos''s Intervention', 'Falkenrath Gorger', 'Oversoul of Dusk', 'Tallowisp', 'Voldaren Pariah', 'Jace, Memory Adept', 'Iron Apprentice', 'Abbot of Keral Keep', 'Snow-Covered Forest', 'Rakdos Signet', 'Farseek', 'Shining Shoal', 'Bituminous Blast', 'Spikefield Hazard', 'Kira, Great Glass-Spinner', 'The Modern Age', 'Fallen Shinobi', 'Dark-Dweller Oracle', 'Otherworldly Gaze', 'Spark Elemental', 'Fiery Temper', 'Naban, Dean of Iteration', 'Sea Gate Wreckage', 'Crack the Earth', 'Experimental Synthesizer', 'Sarkhan the Mad', 'Arguel''s Blood Fast', 'Chromatic Lantern', 'Liliana Vess', 'Plated Geopede', 'Fire Prophecy', 'Heartless Act', 'Mistveil Plains', 'Riveteers Overlook', 'Spark Spray', 'Tendo Ice Bridge', 'Glowspore Shaman', 'Nightveil Predator', 'Magister Sphinx', 'Glorious End', 'Zenith Flare', 'Dawn of Hope', 'Reveillark', 'Mephidross Vampire', 'Blackmail', 'Wayward Guide-Beast', 'Shaman of the Great Hunt', 'Arcbound Javelineer', 'Prodigy''s Prototype', 'Kodama''s Reach', 'Thermo-Alchemist', 'Perilous Research', 'Mystic Snake', 'Edric, Spymaster of Trest', 'Vital Splicer', 'Viashino Pyromancer', 'Animation Module', 'Trostani''s Summoner', 'Bogardan Hellkite', 'Hypnotic Specter', 'Staggering Insight', 'Fire-Lit Thicket', 'Geomancer''s Gambit', 'Fatal Grudge', 'Spirited Companion', 'Lavabelly Sliver', 'End-Raze Forerunners', 'Ashenmoor Liege', 'Burning of Xinye', 'Darkheart Sliver', 'Ground Rift', 'Dimir Aqueduct', 'Rootborn Defenses', 'Fury of the Horde', 'Purphoros''s Intervention', 'Wilt-Leaf Liege', 'Weaver of Harmony', 'Firemane Avenger', 'Nemesis of Mortals', 'Merchant of the Vale', 'Rite of Oblivion', 'Gonti, Lord of Luxury', 'Obsessive Stitcher', 'Sigarda''s Splendor', 'Dire Tactics', 'Ojutai''s Command', 'Dauntless Bodyguard', 'Vedalken Shackles', 'Gideon Jura', 'Stormtide Leviathan', 'Ancestral Anger', 'Unesh, Criosphinx Sovereign', 'Curse of Misfortunes', 'Wall of Omens', 'Tradewind Rider', 'Goldmire Bridge', 'Path to the World Tree', 'Dead Weight', 'Honden of Infinite Rage', 'Secluded Courtyard', 'Ghostly Pilferer', 'Claim the Firstborn', 'Spikeshot Elder', 'Fieldmist Borderpost', 'Conclave Mentor', 'Everflowing Chalice', 'Jace, the Living Guildpact', 'Ancient Stirrings', 'Sojourner''s Companion', 'Irencrag Pyromancer', 'Myr Reservoir', 'Phyrexian Dreadnought', 'Watcher for Tomorrow', 'Judge''s Familiar', 'Elbrus, the Binding Blade', 'Runed Halo', 'Anafenza, Kin-Tree Spirit', 'Curious Pair', 'Cabaretti Courtyard', 'Animate Dead', 'Mythos of Brokkos', 'Cosmos Elixir', 'Bloodbraid Elf', 'Masterful Replication', 'Heartless Summoning', 'Growth-Chamber Guardian', 'Changeling Outcast', 'Battle Screech', 'Burning-Tree Shaman', 'Secluded Glen', 'Conclave Tribunal', 'Secluded Steppe', 'Blood Fountain', 'Disallow', 'Hissing Quagmire', 'Mogg War Marshal', 'Captured Sunlight', 'Azorius Charm', 'Stitcher''s Graft', 'Inga Rune-Eyes', 'Dream Trawler', 'Springbloom Druid', 'Scrap Trawler', 'Bump in the Night', 'Invisible Stalker', 'Myr Sire', 'Fabricate', 'Squadron Hawk', 'Ral, Storm Conduit', 'Advent of the Wurm', 'Jace Beleren', 'Endbringer', 'Reckless Impulse', 'Hornet Queen', 'Basking Rootwalla', 'Ensoul Artifact', 'Torment of Scarabs', 'Cairn Wanderer', 'Scrapheap Scrounger', 'Duress', 'Myth Realized', 'Malakir Rebirth', 'Thirst for Discovery', 'Fact or Fiction', 'Adorned Pouncer', 'Unlucky Witness', 'Angel of Sanctions', 'Primalcrux', 'Psychic Possession', 'Stone Rain', 'Wolf-Skull Shaman', 'Hymn to Tourach', 'Alms of the Vein', 'Magister of Worth', 'Bone Shards', 'Cathar Commando', 'Barbed Sextant', 'Earthshaker Khenra', 'Bloodchief''s Thirst', 'Sandsteppe Citadel', 'Skull Prophet', 'Serrated Scorpion', 'Dragonkin Berserker', 'Falkenrath Aristocrat', 'Seismic Assault', 'Darkmoss Bridge', 'Fire Covenant', 'Howling Mine', 'Temple of Enlightenment', 'Swarm Shambler', 'Bile Blight', 'Nature''s Lore', 'Dispel', 'Dreg Mangler', 'Feed the Swarm', 'Goblin Assault', 'Blistercoil Weird', 'Hythonia the Cruel', 'Mirrodin Besieged', 'Scrap Welder', 'Mishra''s Factory', 'Lashwrithe', 'Tombstalker', 'Pia''s Revolution', 'Doomskar Titan', 'Detention Sphere', 'Sylvan Messenger', 'March of Reckless Joy', 'Vampire Lacerator', 'Sire of Insanity', 'Shardless Agent', 'Sol Talisman', 'Throes of Chaos', 'Midnight Clock', 'Seaside Citadel', 'Mwonvuli Acid-Moss', 'Promise of Bunrei', 'Wandering Mind', 'Sarcomite Myr', 'Esper Charm', 'Loxodon Smiter', 'Intangible Virtue', 'Demigod of Revenge', 'Aven Squire', 'Grisly Salvage', 'Thought Scour', 'Bloodhall Priest', 'See the Truth', 'Radiant Scrollwielder', 'Talisman of Curiosity', 'Dizzy Spell', 'Tangled Florahedron', 'Anticipate', 'Alchemist''s Gambit', 'Faerie Miscreant', 'Tandem Lookout', 'Garruk Wildspeaker', 'Terminus', 'Lyzolda, the Blood Witch', 'Llanowar Wastes', 'Chandra, Pyromaster', 'Tidespout Tyrant', 'Search for Tomorrow', 'Coiling Oracle', 'Archfiend of Sorrows', 'Putrid Imp', 'Vampire of the Dire Moon', 'Obstinate Baloth', 'Skirk Ridge Exhumer', 'Unsubstantiate', 'Steel Overseer', 'Porphyry Nodes', 'Steppe Lynx', 'Shredded Sails', 'Incinerate', 'Glint Hawk', 'Grapeshot', 'Disciple of Bolas', 'Touch the Spirit Realm', 'Laboratory Maniac', 'Tireless Provisioner', 'Restore Balance', 'Worldgorger Dragon', 'Mikokoro, Center of the Sea', 'Commit // Memory', 'Sigil of Valor', 'Circle of Confinement', 'Drannith Healer', 'Vivid Crag', 'Buried Alive', 'Kalastria Highborn', 'Orzhov Signet', 'Goblin Dark-Dwellers', 'Fireblade Charger', 'Nicol Bolas, Planeswalker', 'Westvale Abbey', 'Dread Return', 'Vedalken Engineer', 'Nevermaker', 'Assert Authority', 'Carnophage', 'Nether Traitor', 'Glorybringer', 'Seasoned Hallowblade', 'Shriekhorn', 'Abundant Harvest', 'Reflex Sliver', 'Birds of Paradise', 'Pieces of the Puzzle', 'Strangle', 'Nested Shambler', 'Shatterskull Charger', 'Avatar of Discord', 'Sensor Splicer', 'Rustvale Bridge', 'Bazaar Trademage', 'Akoum Hellhound', 'Platinum Angel', 'Tymaret, Chosen from Death', 'Champion of Dusk', 'Hagra Mauling', 'Thornglint Bridge', 'Opt', 'Ingenious Infiltrator', 'Thoughtpicker Witch', 'Grave Scrabbler', 'Orim''s Chant', 'Terastodon', 'Hunted Witness', 'Kumano Faces Kakkazan', 'Kiln Fiend', 'Power Sink', 'Shrapnel Blast', 'Gilded Lotus', 'Lotleth Troll', 'Arcanum Wings', 'Cloudcrest Lake', 'Black Sun''s Zenith', 'Bosk Banneret', 'Frantic Search', 'Ghost Quarter', 'Castigate', 'Flayer of the Hatebound', 'Temple of Malady', 'Lavaclaw Reaches', 'Brokers Charm', 'Repeal', 'Temple of Mystery', 'Kitchen Imp', 'Cartel Aristocrat', 'Shinka, the Bloodsoaked Keep', 'Fatestitcher', 'Young Necromancer', 'Cruel Reality', 'Sword-Point Diplomacy', 'Wildfire', 'Fauna Shaman', 'Evolving Wilds', 'Spectra Ward', 'Parcel Myr', 'Go for the Throat', 'Restoration Angel', 'Desecration Demon', 'Ghoultree', 'Sangrophage', 'Glen Elendra Archmage', 'Snow-Covered Mountain', 'Crackling Drake', 'Firewild Borderpost', 'Counterflux', 'Sky Hussar', 'Angel of Despair', 'Grimdancer', 'Memorial to Glory', 'Tectonic Giant', 'Coalition Relic', 'Venom Sliver', 'Arrogant Wurm', 'Soul Snare', 'Sungold Sentinel', 'Zurgo Bellstriker', 'Lord of the Undead', 'Oblivion Ring', 'Hall of the Bandit Lord', 'Maestros Charm', 'Elixir of Immortality', 'Arrogant Bloodlord', 'Spell Burst', 'Curse of Death''s Hold', 'Weathered Wayfarer', 'Drannith Stinger', 'Llanowar Mentor', 'Vivid Marsh', 'Izzet Signet', 'Mire''s Grasp', 'Avatar of Woe', 'Flourishing Fox', 'Satyr Wayfinder', 'Mouth of Ronom', 'Mizzium Skin', 'Faerie Vandal', 'Empty the Pits', 'Reckless Waif', 'Thraben Inspector', 'Underworld Dreams', 'Mindslaver', 'Terrarion', 'Kunoros, Hound of Athreos', 'Fireblade Artist', 'Elvish Harbinger', 'Thirst for Knowledge', 'Bedlam Reveler', 'Anguished Unmaking', 'Nylea''s Presence', 'Sliver Queen', 'Tatsunari, Toad Rider', 'Judith, the Scourge Diva', 'Halimar Excavator', 'Nephalia Academy', 'Remorseful Cleric', 'Netherborn Phalanx', 'Firebrand Archer', 'Stirring Wildwood', 'Ethersworn Sphinx', 'Gemhide Sliver', 'Ethereal Haze', 'Blade Splicer', 'Enigma Sphinx', 'Piranha Marsh', 'Ash Zealot', 'Magmatic Insight', 'Inevitable Betrayal', 'Distended Mindbender', 'Tymaret Calls the Dead', 'Clifftop Retreat', 'Forked Bolt', 'Tidal Warrior', 'Waterfront District', 'Grasp of Darkness', 'Lone Rider', 'Krark''s Thumb', 'Brainstone', 'Woodfall Primus', 'Psychatog', 'Martyr of Sands', 'Demonic Dread', 'Resurgent Belief', 'Seething Song', 'Arcbound Ravager', 'Bala Ged Recovery', 'Goblin Bombardment', 'Scale of Chiss-Goria', 'Blazing Rootwalla', 'Silundi Vision', 'Vessel of Nascency', 'Goblin Anarchomancer', 'Temple Bell', 'Thunderous Wrath', 'Sprite Dragon', 'Fiend Hunter', 'Vampire Nighthawk', 'Lava Dart', 'Palace Siege', 'First-Sphere Gargantua', 'Flame Jab', 'Izzet Charm', 'Elvish Visionary', 'Curse of Thirst', 'Hollowhead Sliver', 'Obscura Charm', 'Kher Keep', 'Chancellor of the Dross', 'Rakdos Charm', 'Sinister Concoction', 'Galerider Sliver', 'Memorial to War', 'Rosethorn Acolyte', 'Memory Lapse', 'Annex', 'Court Homunculus', 'Anax, Hardened in the Forge', 'Pillage', 'Warstorm Surge', 'Grapple with the Past', 'Doomed Traveler', 'Cloudpost', 'Path of Mettle', 'Diabolic Edict', 'Colossal Skyturtle', 'Riftwing Cloudskate', 'Disenchant', 'Rise and Shine', 'Korlash, Heir to Blackblade', 'Spark Trooper', 'Hive Mind', 'Dynacharge', 'Bastion of Remembrance', 'Crashing Drawbridge', 'Gaea''s Will', 'Revitalize', 'Tower of Calamities', 'Old Stickfingers', 'Discovery // Dispersal', 'Brave the Elements', 'Elvish Archdruid', 'Leechridden Swamp', 'Tempered Sliver', 'Ethersworn Canonist', 'Zabaz, the Glimmerwasp', 'Metalwork Colossus', 'Tectonic Reformation', 'Demonic Embrace', 'Flame Javelin', 'Nissa, Worldwaker', 'Naya Hushblade', 'Mirrodin''s Core', 'Raze the Effigy', 'Adanto Vanguard', 'The Bloodsky Massacre', 'Sylvan Primordial', 'Pyrrhic Revival', 'Elves of Deep Shadow', 'Crash Through', 'Barbarian Ring', 'Vampire''s Kiss', 'Llanowar Elves', 'Dragonskull Summit', 'Sylvan Scrying', 'Reckless Charge', 'Thaumatic Compass', 'Wind Zendikon', 'Burst Lightning', 'Cloudshift', 'Undercity Informer', 'Delver of Secrets', 'Shrieking Affliction', 'Selesnya Charm', 'Mizzium Mortars', 'Falkenrath Pit Fighter', 'Sleight of Hand', 'Doom Blade', 'Prismatic Lens', 'Mind''s Desire', 'Dauntless Escort', 'Soulherder', 'Chain Lightning', 'Firedrinker Satyr', 'Varragoth, Bloodsky Sire', 'Rakdos Cackler', 'Mystic Monastery', 'Force of Nature', 'Drossforge Bridge', 'Voldaren Epicure', 'Undead Butler', 'Stromkirk Noble', 'Mission Briefing', 'Thirst for Meaning', 'Snow-Covered Swamp', 'The Underworld Cookbook', 'Colossification', 'Temple of Malice', 'Pyretic Ritual', 'Joraga Warcaller', 'Scythe Leopard', 'Llanowar Tribe', 'Conduit of Ruin', 'Trinket Mage', 'Sign in Blood', 'Soulflayer', 'Zombie Infestation', 'Ranger of Eos', 'Swans of Bryn Argoll', 'Qasali Pridemage', 'Windbrisk Heights', 'Nissa''s Chosen', 'Boros Signet', 'Plague Belcher', 'Lifecrafter''s Bestiary', 'Field of Ruin', 'Sandwurm Convergence', 'Massacre Girl', 'Scorched Rusalka', 'Brine Comber', 'Skyclave Pick-Axe', 'Overwhelming Splendor', 'Cabal Initiate', 'Heliod''s Pilgrim', 'Vicious Conquistador', 'Extractor Demon', 'Skyscribing', 'Mana Flare', 'Woodland Cemetery', 'Brute Suit', 'Deep Forest Hermit', 'Azami, Lady of Scrolls', 'Might Sliver', 'Giant Killer', 'Sundial of the Infinite', 'Darksteel Colossus', 'Firebolt', 'Mech Hangar', 'Diffusion Sliver', 'Aphemia, the Cacophony', 'Outland Liberator', 'Monstrous Carabid', 'Sylvan Library', 'Cordial Vampire', 'Joraga Treespeaker', 'Ghitu Lavarunner', 'Fungus Sliver', 'Hateful Eidolon', 'Jeskai Ascendancy', 'Edgewall Innkeeper', 'Renewed Faith', 'Dimir Infiltrator', 'Akrasan Squire', 'Pyroclasm', 'Curiosity', 'Primal Command', 'Earthquake', 'Smallpox', 'Jokulhaups', 'Shivan Dragon', 'Duskwielder', 'Dread Presence', 'Obsessive Search', 'Commune with the Gods', 'Mausoleum Secrets', 'Claws of Gix', 'Fanatical Firebrand', 'Snowfield Sinkhole', 'Kird Ape', 'Sharuum the Hegemon', 'Scuttletide', 'Profane Procession', 'Shard Volley', 'Mirran Crusader', 'Mistvault Bridge', 'Grim Haruspex', 'Flash of Insight', 'Kari Zev''s Expertise', 'Cosima, God of the Voyage', 'Bloodline Keeper', 'Signal Pest', 'Fertile Ground', 'Kami of False Hope', 'Needle Spires', 'Shriekmaw', 'Gray Merchant of Asphodel', 'Arashin Foremost', 'Kabira Takedown', 'Cathartic Reunion', 'Hellspark Elemental', 'Virulent Sliver', 'Ulvenwald Tracker', 'Giant Ox', 'Luminarch Ascension', 'Cleansing Wildfire', 'Collective Effort', 'Ultimate Price', 'Thief of Sanity', 'Grimoire Thief', 'Spell Pierce', 'Forbid', 'Bloodthrone Vampire', 'Folio of Fancies', 'Familiar''s Ruse', 'Vivid Grove', 'Ardent Recruit', 'Kessig Flamebreather', 'Faithful Mending', 'Bruna, Light of Alabaster', 'Altered Ego', 'Village Messenger', 'Emmara, Soul of the Accord', 'Illuminator Virtuoso', 'Bonescythe Sliver', 'Buried Ruin', 'Call the Bloodline', 'Zetalpa, Primal Dawn', 'Beast Whisperer', 'Myr Battlesphere', 'Unburial Rites', 'Barren Moor', 'Sarkhan the Masterless', 'Foreboding Ruins', 'Rabbit Battery', 'Blacklance Paragon', 'Acquisitions Expert', 'Broodstar', 'Evershrike', 'Oni-Cult Anvil', 'Realm Razer', 'Assault Strobe', 'Sultai Charm', 'Imperious Perfect', 'Argentum Armor', 'Faithless Salvaging', 'Tyrant''s Choice', 'Lodestone Golem', 'Feast of Blood', 'Akroma''s Memorial', 'It That Betrays', 'Kaya, Ghost Assassin', 'Memory''s Journey', 'Slip Out the Back', 'Hell Mongrel', 'Flaying Tendrils', 'Heir of Falkenrath', 'General Ferrous Rokiric', 'Vesperlark', 'Porcelain Legionnaire', 'Festival Crasher', 'Kazuul''s Fury', 'Possibility Storm', 'Painful Truths', 'Born to Drive', 'Lonis, Cryptozoologist', 'Duty-Bound Dead', 'Memnarch', 'Aether Spellbomb', 'Skyclave Cleric', 'Glacial Fortress', 'Abrade', 'Boon of Safety', 'The Birth of Meletis', 'Collateral Damage', 'Viscera Seer', 'Disciple of the Vault', 'Rotting Rats', 'Tooth of Chiss-Goria', 'Mikaeus, the Lunarch', 'Oracle of Mul Daya', 'Heartfire Immolator', 'Leaf-Crowned Elder', 'Vapor Snag', 'Cursecatcher', 'Zulaport Cutthroat', 'Archetype of Endurance', 'Lonely Sandbar', 'Tyrant of Discord', 'Scab-Clan Berserker', 'Drowned Catacomb', 'Razortide Bridge', 'Gavony Township', 'Oona, Queen of the Fae', 'White Sun''s Zenith', 'Knight of Infamy', 'Den Protector', 'Temple of Epiphany', 'Behold the Multiverse', 'Underworld Connections', 'Sidisi, Brood Tyrant', 'Mobilizer Mech', 'Teachings of the Kirin', 'Frantic Inventory', 'Rune-Scarred Demon', 'Dawn Charm', 'Skophos Reaver', 'Verdant Command', 'Decree of Justice', 'Avaricious Dragon', 'Tempered in Solitude', 'Ob Nixilis, the Fallen', 'Pelakka Predation', 'Spawning Pool', 'Brushfire Elemental', 'Logic Knot', 'Rootbound Crag', 'Sovereigns of Lost Alara', 'Mystifying Maze', 'Prophetic Prism', 'Master of Death', 'Triskelion', 'Hive Stirrings', 'Sticky Fingers', 'Ashenmoor Gouger', 'Lightning Rift', 'Futurist Sentinel', 'Drowned Secrets', 'Drogskol Captain', 'Colossus of Akros', 'Grand Architect', 'Benalish Marshal', 'Quest for the Holy Relic', 'Soul Spike', 'Nissa Revane', 'Think Twice', 'Rage Forger', 'Radha, Heart of Keld', 'Gatekeeper of Malakir', 'Dark Salvation', 'Talisman of Impulse', 'Silverblade Paladin', 'Defiant Strike', 'Izzet Boilerworks', 'Nomad Outpost', 'Rakdos Headliner', 'Circular Logic', 'Frenetic Sliver', 'Indulgent Aristocrat', 'Origin Spellbomb', 'Dark Ritual', 'Crypt of Agadeem', 'Skemfar Avenger', 'Nevermore', 'Asylum Visitor', 'The Scorpion God', 'Ravenous Chupacabra', 'Arch of Orazca', 'Smokestack', 'Dread Fugue', 'Healer''s Hawk', 'Demon of Dark Schemes', 'Sleeper Agent', 'Ornithopter', 'Time Stretch', 'Nimble Mongoose', 'Raven''s Crime', 'Glimmerpost', 'Homing Sliver', 'Nezahal, Primal Tide', 'Moon-Circuit Hacker', 'Auramancer', 'Wake Thrasher', 'Knight of the White Orchid', 'Wild Cantor', 'Mirage Mirror', 'Sterling Grove', 'Avacyn''s Pilgrim', 'Forgotten Cave', 'Dryad Militant', 'Dusk Legion Zealot', 'Arcus Acolyte', 'Holy Day', 'Explore', 'Patchwork Automaton', 'Myr Superion', 'Sovereign''s Bite', 'Temporal Extortion', 'Hero of Precinct One', 'Dream Leash', 'Orgg', 'Kuro, Pitlord', 'Jack-o''-Lantern', 'Eternal Dragon', 'Lotleth Giant', 'Throne of Geth', 'Wight', 'Champion of Wits', 'Ponder', 'Slitherhead', 'Shipwreck Sifters', 'Kazandu Mammoth', 'Sanctum of Stone Fangs', 'Good-Fortune Unicorn', 'Champion of the Parish', 'Day of Judgment', 'Vault of the Archangel', 'Angel of Glory''s Rise', 'Caves of Koilos', 'Raging Ravine', 'Balustrade Spy', 'Approach of the Second Sun', 'Temple of Abandon', 'Containment Construct', 'Living Twister', 'Hypergenesis', 'Benevolent Bodyguard', 'Multiple Choice', 'Arcbound Worker', 'Ramunap Excavator', 'Sadistic Sacrament', 'Ionize', 'Moorland Haunt', 'Wooded Bastion', 'Elemental Masterpiece', 'Trickbind', 'Wildfield Borderpost', 'Mire Triton', 'Battlefield Forge', 'Tooth and Nail', 'Kjeldoran Outpost', 'Death Baron', 'Brain Freeze', 'Ugin''s Conjurant', 'Gloomshrieker', 'Improbable Alliance', 'Dragonmaster Outcast', 'Tanglepool Bridge', 'Tithe Taker', 'Witch''s Cottage', 'Rishkar, Peema Renegade', 'Biting Rain', 'Arbor Elf', 'Transmogrify', 'Harrow', 'Captivating Vampire', 'Blackbloom Rogue', 'Warleader''s Helix', 'Crackleburr', 'Brokers Hideout', 'Phantasmagorian', 'Oust', 'Sunscorched Desert', 'Silverbluff Bridge', 'Midnight Reaper', 'Kefnet the Mindful', 'Etherium Sculptor', 'Thawing Glaciers', 'Stormblood Berserker', 'Master Splicer', 'Sylvan Advocate', 'Maul of the Skyclaves', 'Cemetery Reaper', 'Retributive Wand', 'Knight of Glory', 'Vivid Meadow', 'Graf Reaver', 'Nest Invader', 'Swiftwater Cliffs', 'Generous Visitor', 'Urza''s Factory', 'Canyon Slough', 'Fleecemane Lion', 'Wonder', 'Intruder Alarm', 'Crumbling Necropolis', 'Primal Surge', 'Solitary Confinement', 'Okiba Reckoner Raid', 'Chief Engineer', 'All Suns'' Dawn', 'Mystic Speculation', 'Silent Arbiter', 'Port of Karfell', 'Vivid Creek', 'Stern Dismissal', 'Agonizing Remorse', 'Rashmi, Eternities Crafter', 'Trespasser''s Curse', 'Staff of Domination', 'Game Trail', 'Vindicate', 'Reap the Past', 'Timeless Witness', 'Raise the Alarm', 'Jwari Disruption', 'Nivmagus Elemental', 'Mesa Enchantress', 'Temple of Deceit', 'Negate', 'Mistvein Borderpost', 'Sygg, River Cutthroat', 'Arcbound Mouser', 'Declaration in Stone', 'Death Cloud', 'Niv-Mizzet, the Firemind', 'Torrent Sculptor', 'Lochmere Serpent', 'Twisted Abomination', 'Sphinx of Foresight', 'Cultivate', 'Hotshot Mechanic', 'Sphinx of the Steel Wind', 'Reinforced Ronin', 'Mobilized District', 'Reliquary Tower', 'Flame Slash', 'Vithian Renegades', 'Veinfire Borderpost', 'Condemn', 'Zhalfirin Void', 'Hatching Plans', 'Diregraf Ghoul', 'Temporal Fissure', 'Acolyte of Affliction', 'Flame Rift', 'Valiant Rescuer'))) 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, 69.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (66.0 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Nature''s Lore', 'Thermo-Alchemist', 'Swarm Shambler', 'Archetype of Endurance', 'Temple of Deceit', 'Moorland Haunt', 'Benalish Marshal', 'Piranha Marsh', 'Aphemia, the Cacophony', 'Hymn to Tourach', 'Delver of Secrets', 'Call the Bloodline', 'Pyroclasm', 'Thirst for Discovery', 'Aether Spellbomb', 'Blood Fountain', 'Elvish Visionary', 'Cathartic Reunion', 'Rootbound Crag', 'Tooth and Nail', 'Brine Comber', 'Conclave Tribunal', 'Stormblood Berserker', 'Sandwurm Convergence', 'Battlefield Forge', 'Growth-Chamber Guardian', 'Obsessive Stitcher', 'Archfiend of Sorrows', 'Lyzolda, the Blood Witch', 'Goblin Assault', 'Sunscorched Desert', 'Sandsteppe Citadel', 'Gemhide Sliver', 'Plague Belcher', 'Dark Salvation', 'Alchemist''s Gambit', 'Auramancer', 'Vessel of Nascency', 'Possibility Storm', 'Everflowing Chalice', 'Horror of the Broken Lands', 'Ravenous Chupacabra', 'The Birth of Meletis', 'Tradewind Rider', 'Geomancer''s Gambit', 'Midnight Reaper', 'Improbable Alliance', 'Intruder Alarm', 'Wild Nacatl', 'Steppe Lynx', 'Cleansing Wildfire', 'Pieces of the Puzzle', 'Glowspore Shaman', 'Slagwoods Bridge', 'Temple of Malice', 'Lord of the Undead', 'Vivid Grove', 'Forbid', 'Extractor Demon', 'Fabricate', 'Platinum Angel', 'Martyr of Sands', 'Lurching Rotbeast', 'Selesnya Charm', 'Zhalfirin Void', 'Krark''s Thumb', 'Sarkhan the Mad', 'Vivid Meadow', 'Akrasan Squire', 'Skyclave Shade', 'Tyrant''s Choice', 'Viashino Pyromancer', 'Crack the Earth', 'Flash of Insight', 'Avatar of Woe', 'Edric, Spymaster of Trest', 'Decree of Justice', 'Field of Ruin', 'Healer''s Hawk', 'Spikefield Hazard', 'Esper Charm', 'Changeling Outcast', 'Transmogrify', 'Cloudshift', 'Sylvan Scrying', 'Power Sink', 'Kazandu Mammoth', 'Runed Halo', 'Diabolic Edict', 'Canyon Slough', 'Sygg, River Cutthroat', 'Darksteel Colossus', 'Roar of the Wurm', 'Alms of the Vein', 'Forked Bolt', 'Hypnotic Specter', 'Blazing Shoal', 'Blacklance Paragon', 'Angel of Glory''s Rise', 'Sign in Blood', 'Fireblade Artist', 'Mech Hangar', 'Raging Ravine', 'Secluded Glen', 'Sanctum of Stone Fangs', 'Resurgent Belief', 'It That Betrays', 'Mystic Snake', 'Fire Prophecy', 'Justice Strike', 'Sungold Sentinel', 'Mirrorshell Crab', 'Blazing Rootwalla', 'Fertile Ground', 'Kher Keep', 'Mirror March', 'Orgg', 'Sensor Splicer', 'Needle Spires', 'Arguel''s Blood Fast', 'Cartel Aristocrat', 'Brainstone', 'Mistvault Bridge', 'Obscura Storefront', 'Nest Invader', 'Duskwielder', 'Hornet Queen', 'Primalcrux', 'Reality Ripple', 'Glimmerpost', 'Cabaretti Courtyard', 'Chance Encounter', 'Festival Crasher', 'Netherborn Phalanx', 'Mistvein Borderpost', 'Deep Forest Hermit', 'Solitary Confinement', 'Bonescythe Sliver', 'Dimir Infiltrator', 'Maestros Charm', 'Benevolent Bodyguard', 'Dizzy Spell', 'Futurist Sentinel', 'Kunoros, Hound of Athreos', 'Thawing Glaciers', 'Smokestack', 'Mizzium Mortars', 'Dark Withering', 'Restoration Angel', 'Captivating Vampire', 'Zulaport Cutthroat', 'Thaumatic Compass', 'Ghitu Lavarunner', 'Underworld Connections', 'Skemfar Avenger', 'Doomskar Titan', 'Folio of Fancies', 'Hunted Witness', 'Advent of the Wurm', 'Grasp of Darkness', 'White Sun''s Zenith', 'Revitalize', 'Twisted Abomination', 'Familiar''s Ruse', 'Brokers Hideout', 'Logic Knot', 'Faerie Vandal', 'Spell Burst', 'Reap the Past', 'Commit // Memory', 'Dead // Gone', 'Cosmos Elixir', 'Purphoros''s Intervention', 'Vivid Creek', 'Undead Butler', 'Outland Liberator', 'Behold the Multiverse', 'Rune-Scarred Demon', 'Sky Hussar', 'Torrent Sculptor', 'Timeless Witness', 'Pillage', 'Mogg War Marshal', 'Ghoultree', 'Acolyte of Affliction', 'Firewild Borderpost', 'Mobilized District', 'Staggering Insight', 'Incinerate', 'Temple of Enlightenment', 'Vivid Crag', 'Cultivate', 'Angel of Despair', 'Sultai Charm', 'Rotting Rats', 'Ashenmoor Liege', 'Wildfield Borderpost', 'Containment Construct', 'Abrade', 'Reflex Sliver', 'Ashen Ghoul', 'Trostani''s Summoner', 'Feast of Blood', 'Scorched Rusalka', 'Wall of Omens', 'Earthshaker Khenra', 'Temple of Epiphany', 'Just the Wind', 'Rosethorn Acolyte', 'Tatsunari, Toad Rider', 'Throes of Chaos', 'Sidisi, Brood Tyrant', 'Soul Spike', 'Tithe Taker', 'Edgewall Innkeeper', 'Mobilizer Mech', 'Sprite Dragon', 'Dead Weight', 'Tyrant of Discord', 'Sticky Fingers', 'Radiant Scrollwielder', 'Treasure Hunt', 'Kazuul''s Fury', 'Thirst for Knowledge', 'Condemn', 'Gatekeeper of Malakir', 'Soul Snare', 'Call of the Conclave', 'Virulent Sliver', 'Joraga Warcaller', 'Crumbling Necropolis', 'First-Sphere Gargantua', 'Tyrant''s Scorn', 'End-Raze Forerunners', 'Foreboding Ruins', 'Honor of the Pure', 'Illuminator Virtuoso', 'Elvish Mystic', 'Graveyard Marshal', 'Disciple of the Vault', 'Sword-Point Diplomacy', 'Memorial to War', 'Temple of Mystery', 'Hagra Mauling', 'Ingenious Infiltrator', 'Sphinx''s Tutelage', 'Shining Shoal', 'Shipwreck Sifters', 'Crypt of Agadeem', 'Duty-Bound Dead', 'Conduit of Ruin', 'Vital Splicer', 'Commune with the Gods', 'Monstrous Carabid', 'Tempered Sliver', 'Knight of Glory', 'Grimoire Thief', 'Judge''s Familiar', 'Treasure Cruise', 'Hythonia the Cruel', 'Arch of Orazca', 'Inga Rune-Eyes', 'Silverblade Paladin', 'Crackleburr', 'Graf Reaver', 'Sylvan Advocate', 'Elixir of Immortality', 'Negate', 'Thunderous Wrath', 'Detention Sphere', 'Nivmagus Elemental', 'Porcelain Legionnaire', 'Rakdos Signet', 'Silverbluff Bridge', 'Zombie Infestation', 'Crashing Drawbridge', 'Hour of Reckoning', 'Tallowisp', 'Dragonskull Summit', 'Endbringer', 'Scythe Leopard', 'Falkenrath Pit Fighter', 'Engulf the Shore', 'Dismal Backwater', 'Wight', 'Maul of the Skyclaves', 'Cosima, God of the Voyage', 'Barren Moor', 'Cerodon Yearling', 'Profane Procession', 'Unlucky Witness', 'Thought Scour', 'Acidic Slime', 'Jace, the Living Guildpact', 'Dragonkin Berserker', 'Fungus Sliver', 'Unsubstantiate', 'Animate Dead', 'Lantern of the Lost', 'Brain Freeze', 'Swans of Bryn Argoll', 'Tanglepool Bridge', 'Dryad Militant', 'Myr Battlesphere', 'Time Stretch', 'Nylea''s Presence', 'Fanatical Firebrand', 'Grave Scrabbler', 'Eternal Dragon', 'Enigma Sphinx', 'Avaricious Dragon', 'Fieldmist Borderpost', 'Ponder', 'Liliana Vess', 'Secluded Courtyard', 'Heartfire Immolator', 'Skyclave Cleric', 'Dark Ritual', 'Bile Blight', 'Drogskol Captain', 'Mirage Mirror', 'Anax, Hardened in the Forge', 'Abbot of Keral Keep', 'Feed the Swarm', 'Ashenmoor Gouger', 'Fatal Grudge', 'Fireblade Charger', 'Fact or Fiction', 'Veinfire Borderpost', 'Magister of Worth', 'Grand Architect', 'The Underworld Cookbook', 'Assault Strobe', 'Mystic Monastery', 'Dread Fugue', 'Voidslime', 'Parcel Myr', 'Falkenrath Gorger', 'Young Necromancer', 'Search for Tomorrow', 'Dauntless Bodyguard', 'Thirst for Meaning', 'Desperate Ritual', 'Barbed Sextant', 'Rishkar, Peema Renegade', 'Caves of Koilos', 'Elvish Harbinger', 'Bloodhall Priest', 'Imperious Perfect', 'Shrapnel Blast', 'Giant Ox', 'Bituminous Blast', 'Beast Whisperer', 'Sleight of Hand', 'Slitherhead', 'Dark-Dweller Oracle', 'Glen Elendra Archmage', 'Obliterate', 'Vesperlark', 'Talisman of Curiosity', 'Ground Rift', 'Firebolt', 'Emmara, Soul of the Accord', 'Panharmonicon', 'Blistercoil Weird', 'Tandem Lookout', 'Shriekhorn', 'Shivan Dragon', 'Mwonvuli Acid-Moss', 'Arcane Sanctum', 'Phyrexian Dreadnought', 'Desecration Demon', 'Okiba Reckoner Raid', 'Nimble Mongoose', 'Spellweaver Helix', 'Izzet Boilerworks', 'Sovereign''s Bite', 'Rishadan Dockhand', 'Mesa Enchantress', 'Mythos of Nethroi', 'Bazaar Trademage', 'Magmatic Insight', 'Intangible Virtue', 'Kari Zev''s Expertise', 'Broodstar', 'Grim Haruspex', 'Snow-Covered Plains', 'Otherworldly Gaze', 'Brute Suit', 'Drossforge Bridge', 'Pia''s Revolution', 'Death Baron', 'Stitcher''s Graft', 'Evershrike', 'Abundant Harvest', 'Frenetic Sliver', 'Kjeldoran Outpost', 'Tidal Warrior', 'Arcus Acolyte', 'Vicious Conquistador', 'Basking Rootwalla', 'Goldmire Bridge', 'Primal Surge', 'Heir of Falkenrath', 'Obsessive Search', 'Waterfront District', 'Hero of Precinct One', 'Heliod''s Pilgrim', 'Disallow', 'Demon of Dark Schemes', 'Approach of the Second Sun', 'Ionize', 'Jokulhaups', 'Hateful Eidolon', 'Hinterland Harbor', 'Birds of Paradise', 'Distended Mindbender', 'Goblin Bombardment', 'Myr Reservoir', 'Grimdancer', 'Flayer of the Hatebound', 'Master Splicer', 'Jace, Memory Adept', 'Slagstorm', 'Champion of the Parish', 'Rakdos Cackler', 'Pyrrhic Revival', 'Elves of Deep Shadow', 'Cathar Commando', 'Kira, Great Glass-Spinner', 'Rustvale Bridge', 'Ancestral Anger', 'Elvish Archdruid', 'Duress', 'Llanowar Tribe', 'Myr Superion', 'Worldgorger Dragon', 'Jace Beleren', 'Mystic Speculation', 'Kuro, Pitlord', 'Hellspark Elemental', 'Acquisitions Expert', 'Wooded Bastion', 'Vivid Marsh', 'Mire Triton', 'Might Sliver', 'Frantic Inventory', 'Bloodbraid Elf', 'Gavony Township', 'Colossification', 'Opt', 'Faerie Miscreant', 'Mistveil Plains', 'Orcish Lumberjack', 'Catch // Release', 'Giant Killer', 'Battle Screech', 'Mirran Crusader', 'Thief of Sanity', 'Blade Splicer', 'Raise the Alarm', 'Hell Mongrel', 'Memnarch', 'Kumano Faces Kakkazan', 'Marwyn, the Nurturer', 'Blessed Defiance', 'Circular Logic', 'Crash Through', 'Doomed Traveler', 'Razortide Bridge', 'Asylum Visitor', 'Go for the Throat', 'Collective Effort', 'Windbrisk Heights', 'Garruk Wildspeaker', 'Coalition Relic', 'Fire Covenant', 'Dream Trawler', 'Stern Dismissal', 'The Scorpion God', 'Lifecrafter''s Bestiary', 'Chief Engineer', 'Wake Thrasher', 'Vryn Wingmare', 'Mythos of Brokkos', 'Village Messenger', 'Master of Death', 'Sojourner''s Companion', 'Trinket Mage', 'Remorseful Cleric', 'Ball Lightning', 'Masterful Replication', 'Urza''s Factory', 'Nemesis of Mortals', 'Bump in the Night', 'Clifftop Retreat', 'Tidespout Tyrant', 'Avatar of Discord', 'Demonic Dread', 'Judith, the Scourge Diva', 'Assert Authority', 'Homing Sliver', 'Scrapheap Scrounger', 'Multiple Choice', 'Witch''s Cottage', 'Arbor Elf', 'All Suns'' Dawn', 'Treacherous Blessing', 'Riveteers Overlook', 'Reinforced Ronin', 'Inevitable Betrayal', 'Faithless Salvaging', 'Veilborn Ghoul', 'Glacial Fortress', 'Snow-Covered Mountain', 'Woodfall Primus', 'Kitchen Imp', 'Glorybringer', 'Mana Flare', 'Reliquary Tower', 'Spell Pierce', 'Oust', 'Lone Rider', 'Sangrophage', 'Sarcomite Myr', 'Mask of the Mimic', 'Scrap Welder', 'Timely Reinforcements', 'Experimental Synthesizer', 'Myr Sire', 'Stromkirk Noble', 'Blackmail', 'Deep Analysis', 'Kird Ape', 'Burst Lightning', 'Shardless Agent', 'Nomad Outpost', 'Reckless Waif', 'Chancellor of the Dross', 'Lumbering Falls', 'Reckless Charge', 'Curious Pair', 'Obstinate Baloth', 'Disenchant', 'Grapeshot', 'Cemetery Reaper', 'Lashwrithe', 'Thornglint Bridge', 'Westvale Abbey', 'Crackling Drake', 'Zurgo Bellstriker', 'Mirrodin Besieged', 'Flame Slash', 'Plated Geopede', 'Abiding Grace', 'Buried Ruin', 'Agonizing Remorse', 'Ajani, the Greathearted', 'Nissa''s Chosen', 'Vampire Lacerator', 'Llanowar Mentor', 'Chain Lightning', 'Boon of Safety', 'Gaea''s Will', 'Nicol Bolas, Planeswalker', 'Promise of Bunrei', 'Lose Focus', 'Tireless Provisioner', 'Ornithopter', 'Ramunap Excavator', 'Myth Realized', 'Colossal Skyturtle', 'Faithful Mending', 'Sarkhan the Masterless', 'Bastion of Remembrance', 'Mindslicer', 'Arashin Foremost', 'Champion of Wits', 'Scrap Trawler', 'Coiling Oracle', 'Living Twister', 'Scab-Clan Berserker', 'Dusk Legion Zealot', 'Rashmi, Eternities Crafter', 'Circle of Confinement', 'Realm Razer', 'Sylvan Library', 'Pathrazer of Ulamog', 'Hive Mind', 'Reveillark', 'Den Protector', 'Diffusion Sliver', 'Path of Mettle', 'Spark Elemental', 'Heartless Act', 'Dimir Aqueduct', 'Memorial to Glory', 'Sunblade Samurai', 'Psychic Possession', 'Firebrand Archer', 'Lava Dart', 'Stirring Wildwood', 'Mire''s Grasp', 'Tooth of Chiss-Goria', 'Repeal', 'The Modern Age', 'Dovin Baan', 'Dread Presence', 'Forgotten Cave', 'Galerider Sliver', 'Dormant Sliver', 'Wonder', 'General Ferrous Rokiric', 'Harrow', 'Flame Rift', 'Thraben Inspector', 'Terramorphic Expanse', 'Llanowar Elves', 'Spectra Ward', 'Counterflux', 'Radha, Heart of Keld', 'Demigod of Revenge', 'Primal Command', 'Sylvan Primordial', 'Animal Magnetism', 'Sol Talisman', 'Sylvan Messenger', 'Knight of Infamy', 'Hive Stirrings', 'Day of Judgment', 'Renewed Faith', 'Port of Karfell', 'Wrath of God', 'Naban, Dean of Iteration', 'Sovereigns of Lost Alara', 'Sphinx of Foresight', 'Tempered in Solitude', 'Sire of Insanity', 'Bloodthrone Vampire', 'Anguished Unmaking', 'Chandra, Pyromaster', 'Plow Under', 'Gloomshrieker', 'Explore', 'Ultimate Price', 'Restore Balance', 'Temple of Silence', 'Bedlam Reveler', 'Skirk Ridge Exhumer', 'Smallpox', 'Goblin Dark-Dwellers', 'Touch the Spirit Realm', 'Ethersworn Canonist', 'Etherium Sculptor', 'Voldaren Pariah', 'Dread Return', 'Terrarion', 'Mesmeric Fiend', 'Mana Leak', 'Fallen Shinobi', 'Perilous Research', 'Niv-Mizzet, the Firemind', 'Stormtide Leviathan', 'Kefnet the Mindful', 'Invoke Calamity', 'Seismic Assault', 'Tectonic Giant', 'Seething Song', 'Snowfield Sinkhole', 'Mishra''s Factory', 'Viscera Seer', 'Glorious End', 'Shatterskull Charger', 'Fiend Hunter', 'Skull Prophet', 'Bloodline Keeper', 'Generous Visitor', 'Fyndhorn Elves', 'Electrostatic Field', 'Lavabelly Sliver', 'Nissa Revane', 'Kessig Flamebreather', 'Earthquake', 'Collateral Damage', 'Claim the Firstborn', 'Scuttletide', 'Rakdos Charm', 'Death Cloud', 'Scale of Chiss-Goria', 'Think Twice', 'Fury of the Horde', 'Barrin, Tolarian Archmage', 'Tendrils of Agony', 'Skyclave Pick-Axe', 'Kiln Fiend', 'Diregraf Ghoul', 'Lonely Sandbar', 'Lotleth Troll', 'Nevermore', 'Mission Briefing', 'Doom Blade', 'Dreg Mangler', 'Erebos''s Intervention', 'Oona, Queen of the Fae', 'Cabal Initiate', 'Halimar Excavator', 'Prodigy''s Prototype', 'Defiant Strike', 'Secluded Steppe', 'Stone Rain', 'Rabbit Battery', 'Nested Shambler', 'Adanto Vanguard', 'Tower of Calamities', 'Vampire''s Kiss', 'Sundial of the Infinite', 'Gideon Jura', 'Angel of Sanctions', 'Rootborn Defenses', 'Tendo Ice Bridge', 'Ethersworn Sphinx', 'Watcher for Tomorrow', 'Castigate', 'Bounty of the Luxa', 'Unesh, Criosphinx Sovereign', 'Brave the Elements', 'Temple of Malady', 'Kami of False Hope', 'Raze the Effigy', 'Vindicate', 'Satyr Wayfinder', 'Colossus of Akros', 'Vampire Nighthawk', 'Adorned Pouncer', 'Vedalken Engineer', 'The Bloodsky Massacre', 'Biting Rain', 'Silent Arbiter', 'Mind''s Desire', 'Obscura Charm', 'Gilded Lotus', 'Akoum Hellhound', 'Oblivion Ring', 'Spirited Companion', 'Flame Javelin', 'Tymaret Calls the Dead', 'Sleeper Agent', 'Discovery // Dispersal', 'Raven''s Crime', 'Retributive Wand', 'Leechridden Swamp', 'Knight of the White Orchid', 'Shard Volley', 'Game Trail', 'Staff of Domination', 'Sterling Grove', 'Oversoul of Dusk', 'Sigarda''s Splendor', 'Sinister Concoction', 'Gonti, Lord of Luxury', 'Korlash, Heir to Blackblade', 'See the Truth', 'Disciple of Bolas', 'Dregscape Sliver', 'Shrieking Affliction', 'Carnophage', 'Brushfire Elemental', 'Sphinx of the Steel Wind', 'Terminus', 'Snow-Covered Forest', 'Spawning Pool', 'Dawn of Hope', 'Cloudpost', 'Path to the World Tree', 'Gitaxian Probe', 'Hypergenesis', 'Curiosity', 'Drowned Secrets', 'Heartless Summoning', 'Springbloom Druid', 'Hall of the Bandit Lord', 'Keruga, the Macrosage', 'Farseek', 'Chromatic Lantern', 'Wayward Guide-Beast', 'Hotshot Mechanic', 'Teachings of the Kirin', 'Akroma''s Memorial', 'Kodama''s Reach', 'Llanowar Wastes', 'Firemane Avenger', 'Tomb of Urami', 'Aven Squire', 'Warleader''s Helix', 'Barbarian Ring', 'Honden of Infinite Rage', 'Porphyry Nodes', 'Lonis, Cryptozoologist', 'Putrid Imp', 'Slip Out the Back', 'Serrated Scorpion', 'Memory Lapse', 'Nezahal, Primal Tide', 'Zetalpa, Primal Dawn', 'Frantic Search', 'Fauna Shaman', 'Rakdos Headliner', 'Wandering Mind', 'Grisly Salvage', 'Voldaren Epicure', 'Kabira Takedown', 'Falkenrath Aristocrat', 'Born to Drive', 'Arrogant Wurm', 'Brokers Charm', 'Kalastria Highborn', 'Moon-Circuit Hacker', 'Snow-Covered Swamp', 'Silundi Vision', 'Seasoned Hallowblade', 'Psychatog', 'Midnight Clock', 'Hollowhead Sliver', 'Tangleroot', 'Avacyn''s Pilgrim', 'Fiery Temper', 'Old Stickfingers', 'Champion of Dusk', 'Bala Ged Recovery', 'Cursecatcher', 'Declaration in Stone', 'Hissing Quagmire', 'Orzhov Signet', 'Merchant of the Vale', 'Venom Sliver', 'Phantasmagorian', 'Elemental Masterpiece', 'Darkheart Sliver', 'Seaside Citadel', 'Ash Zealot', 'Arcanum Wings', 'Mikaeus, the Lunarch', 'Arrogant Bloodlord', 'Anafenza, Kin-Tree Spirit', 'Hanweir Garrison', 'Unburial Rites', 'Origin Spellbomb', 'Force of Nature', 'Bloodchief''s Thirst', 'Qasali Pridemage', 'Shriekmaw', 'Oni-Cult Anvil', 'Good-Fortune Unicorn', 'Sliver Queen', 'Drowned Catacomb', 'Captured Sunlight', 'Lavaclaw Reaches', 'March of Reckless Joy', 'Cloudcrest Lake', 'Orim''s Chant', 'Conclave Mentor', 'Fire-Lit Thicket', 'Tymaret, Chosen from Death', 'Greater Gargadon', 'Ghostly Pilferer', 'Ghost Quarter', 'Sigil of Valor', 'Demonic Embrace', 'Sharuum the Hegemon', 'Bone Shards', 'Howling Mine', 'Lochmere Serpent', 'Azorius Charm', 'Woodland Cemetery', 'Evolving Wilds', 'Ojutai''s Command', 'Bruna, Light of Alabaster', 'Buried Alive', 'Regrowth', 'Swiftwater Cliffs', 'Jwari Disruption', 'Kaya, Ghost Assassin', 'Lodestone Golem', 'Reckless Impulse', 'Mausoleum Secrets', 'Izzet Charm', 'Ranger of Eos', 'Flame Jab', 'Metalwork Colossus', 'Luminarch Ascension', 'Pyretic Ritual', 'Weaver of Harmony', 'Vault of the Archangel', 'Palace Siege', 'Claws of Gix', 'Painful Truths', 'Joraga Treespeaker', 'Mindslaver', 'Frontier Bivouac', 'Verdant Command', 'Temporal Fissure', 'Skophos Reaver', 'Hatching Plans', 'Wild Mongrel'))) 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, 66.0, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (77.5 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Path of Mettle', 'Verdant Command', 'Raging Ravine', 'Oblivion Ring', 'Bloodhall Priest', 'Agonizing Remorse', 'Temple of Malady', 'Endbringer', 'Jack-o''-Lantern', 'Castigate', 'Force of Despair', 'Claim the Firstborn', 'Staggering Insight', 'Crash Through', 'Force of Nature', 'Benevolent Bodyguard', 'Commune with the Gods', 'Blue Sun''s Zenith', 'Timely Reinforcements', 'Frontier Bivouac', 'Lantern of the Lost', 'Scrap Trawler', 'Laboratory Maniac', 'Ultimate Price', 'Spellweaver Helix', 'Multiple Choice', 'Snow-Covered Plains', 'Homing Sliver', 'Hero of Precinct One', 'Akroma''s Memorial', 'Barbarian Ring', 'Acquisitions Expert', 'Village Messenger', 'Ashen Ghoul', 'Memnarch', 'Harbinger of the Tides', 'Lead the Stampede', 'Cabaretti Courtyard', 'Tyrant of Discord', 'Declaration in Stone', 'Brokers Hideout', 'Fire Prophecy', 'Growth-Chamber Guardian', 'Witching Well', 'Vedalken Engineer', 'Karmic Guide', 'Colossification', 'Bloodline Keeper', 'Snow-Covered Forest', 'Oona, Queen of the Fae', 'Emmara, Soul of the Accord', 'Abrade', 'Pathrazer of Ulamog', 'Wall of Omens', 'Restoration Angel', 'Ball Lightning', 'Demigod of Revenge', 'Mythos of Brokkos', 'The Birth of Meletis', 'Rishkar, Peema Renegade', 'Tangled Florahedron', 'Infernal Grasp', 'Anafenza, Kin-Tree Spirit', 'Asylum Visitor', 'Biting Rain', 'Lyzolda, the Blood Witch', 'Tandem Lookout', 'Sphinx''s Tutelage', 'Sarcomite Myr', 'Deep Analysis', 'Sleeper Agent', 'Ingenious Infiltrator', 'Goblin Dark-Dwellers', 'Vessel of Nascency', 'Crumbling Necropolis', 'Champion of the Flame', 'Ponder', 'Pyroclasm', 'Vivid Creek', 'Thirst for Knowledge', 'Tanglepool Bridge', 'Palace Siege', 'Forked Bolt', 'Festival Crasher', 'Skemfar Avenger', 'Plow Under', 'Deep Forest Hermit', 'Grapeshot', 'Tower of Calamities', 'Piranha Marsh', 'Sinister Concoction', 'Drossforge Bridge', 'Throes of Chaos', 'Sanctum of Stone Fangs', 'Fyndhorn Elves', 'Goblin Bombardment', 'Dead Weight', 'Disciple of Bolas', 'Dread Presence', 'Gemhide Sliver', 'Silvergill Adept', 'Stone Rain', 'Hunted Witness', 'Mesa Enchantress', 'Myr Battlesphere', 'Arrogant Bloodlord', 'Banehound', 'Swarm Shambler', 'Glowspore Shaman', 'Avacyn''s Pilgrim', 'Barter in Blood', 'Ashenmoor Gouger', 'Ancient Stirrings', 'Mobilized District', 'Lashwrithe', 'Dizzy Spell', 'Terastodon', 'Avatar of Woe', 'Skirk Ridge Exhumer', 'Auramancer', 'Hagra Mauling', 'Crypt of Agadeem', 'Shrapnel Blast', 'Faithless Salvaging', 'Cosima, God of the Voyage', 'Revitalize', 'Young Necromancer', 'Satyr Wayfinder', 'Viscera Seer', 'Rustvale Bridge', 'Tomb of Urami', 'Soulherder', 'Kaya, Ghost Assassin', 'Mire''s Grasp', 'Virulent Sliver', 'Magmatic Insight', 'Shriekhorn', 'Metalwork Colossus', 'Dawn of Hope', 'Benalish Marshal', 'Knight of the White Orchid', 'Sign in Blood', 'Memory''s Journey', 'Temple of Silence', 'Orgg', 'Anax, Hardened in the Forge', 'Collective Effort', 'Silent Submersible', 'Bile Blight', 'Fiend Hunter', 'Mausoleum Secrets', 'Gitaxian Probe', 'Leonin Relic-Warder', 'Touch the Spirit Realm', 'Hive Mind', 'Lunarch Veteran', 'Tyrant''s Scorn', 'Ezuri, Renegade Leader', 'Brainstone', 'Broodstar', 'Urza''s Factory', 'Tranquil Thicket', 'Sharuum the Hegemon', 'Venom Sliver', 'Ethersworn Sphinx', 'Bala Ged Recovery', 'Magister of Worth', 'Bastion of Remembrance', 'Blazing Shoal', 'Akroan Crusader', 'Terrarion', 'Heartless Act', 'Experimental Synthesizer', 'Treacherous Blessing', 'Archetype of Endurance', 'Platinum Angel', 'Grave Scrabbler', 'Conclave Mentor', 'Wooded Bastion', 'Shriekmaw', 'Living Twister', 'Moorland Haunt', 'Dragonkin Berserker', 'Buried Ruin', 'Erebos''s Intervention', 'Circle of Confinement', 'Dark Withering', 'Scythe Leopard', 'Condemn', 'Death Cloud', 'Ghoultree', 'Stubborn Denial', 'Duskwielder', 'Azami, Lady of Scrolls', 'Fabricate', 'Mirrorweave', 'Cleansing Wildfire', 'Leonin Warleader', 'Forbid', 'Dreg Mangler', 'Springbloom Druid', 'Westvale Abbey', 'Kazandu Mammoth', 'Chain Lightning', 'Ornithopter', 'Seismic Assault', 'Spell Burst', 'Wild Nacatl', 'Containment Construct', 'Rune-Scarred Demon', 'Nested Shambler', 'Curiosity', 'Bump in the Night', 'Everflowing Chalice', 'Howling Mine', 'Unsubstantiate', 'Tooth of Chiss-Goria', 'Beast Whisperer', 'Garruk Wildspeaker', 'Fireblade Charger', 'Giant Ox', 'Dimir Infiltrator', 'Woodfall Primus', 'Read the Bones', 'Temporal Fissure', 'Abundant Harvest', 'Inga Rune-Eyes', 'Kodama''s Reach', 'Orcish Lumberjack', 'Falkenrath Pit Fighter', 'Tidespout Tyrant', 'Perilous Research', 'Farseek', 'Coralhelm Commander', 'Slagwoods Bridge', 'Reliquary Tower', 'Nezahal, Primal Tide', 'Tradewind Rider', 'Primal Surge', 'Dormant Sliver', 'Tymaret Calls the Dead', 'Scab-Clan Berserker', 'Alms of the Vein', 'Rakdos Headliner', 'Lochmere Serpent', 'Ghost Quarter', 'Solitary Confinement', 'Fireblade Artist', 'Disallow', 'Skyclave Cleric', 'Darkheart Sliver', 'Archfiend of Sorrows', 'Hypnotic Specter', 'Colossal Skyturtle', 'Naban, Dean of Iteration', 'Chief Engineer', 'Retributive Wand', 'Cerodon Yearling', 'Viashino Pyromancer', 'Flayer of the Hatebound', 'Resurgent Belief', 'Chance Encounter', 'Gavony Township', 'Soul Snare', 'Voldaren Pariah', 'Doomskar Titan', 'Reveillark', 'Bloodvial Purveyor', 'Dragonstorm', 'Malakir Rebirth', 'Fallen Shinobi', 'Zetalpa, Primal Dawn', 'Imperious Perfect', 'Chandra, Pyromaster', 'Behold the Multiverse', 'Origin Spellbomb', 'Rootbound Crag', 'Mistveil Plains', 'Plague Belcher', 'Veinfire Borderpost', 'Illuminator Virtuoso', 'Summary Dismissal', 'Disenchant', 'Reinforced Ronin', 'General Ferrous Rokiric', 'Mistvault Bridge', 'Kumano Faces Kakkazan', 'Flame Slash', 'Bone Shards', 'Defiant Strike', 'Shigeki, Jukai Visionary', 'Firemane Avenger', 'Fatal Grudge', 'Seht''s Tiger', 'Nest Invader', 'Forgotten Cave', 'The Modern Age', 'Dragon Mantle', 'Timeless Witness', 'Vesperlark', 'Judge''s Familiar', 'Arguel''s Blood Fast', 'Orim''s Chant', 'Inevitable Betrayal', 'Hollowhead Sliver', 'Dread Return', 'Tilling Treefolk', 'All Suns'' Dawn', 'Mirage Mirror', 'Crackling Drake', 'Ajani, the Greathearted', 'Hythonia the Cruel', 'Shatterskull Charger', 'Power Sink', 'Game Trail', 'Temple of Deceit', 'Aether Spellbomb', 'Runed Halo', 'Dauntless Bodyguard', 'Glorybringer', 'Rotting Rats', 'Cleric of Life''s Bond', 'Temple of Epiphany', 'Snow-Covered Mountain', 'Wandering Mind', 'Monstrous Carabid', 'Advent of the Wurm', 'Sky Hussar', 'Moon-Circuit Hacker', 'Rosethorn Acolyte', 'Izzet Charm', 'Doomed Traveler', 'Curious Pair', 'Myr Reservoir', 'Pyretic Ritual', 'Underworld Connections', 'Restore Balance', 'Drowned Catacomb', 'Intangible Virtue', 'Rashmi, Eternities Crafter', 'Sphinx of Foresight', 'Ancestral Anger', 'Smokestack', 'Teachings of the Kirin', 'Vivien''s Arkbow', 'Elemental Masterpiece', 'Unesh, Criosphinx Sovereign', 'Elvish Harbinger', 'Ramunap Excavator', 'Futurist Sentinel', 'Shatter the Sky', 'Sygg, River Cutthroat', 'Master of Death', 'Tombstalker', 'Terminus', 'Shard Volley', 'Oriss, Samite Guardian', 'Obsessive Search', 'Cemetery Reaper', 'Assert Authority', 'Smallpox', 'Dimir Aqueduct', 'Mask of the Mimic', 'Talisman of Curiosity', 'Mystic Monastery', 'Plated Geopede', 'Delver of Secrets', 'Sovereigns of Lost Alara', 'Geomancer''s Gambit', 'Sylvan Scrying', 'Clarion Spirit', 'Firebrand Archer', 'Dark Ritual', 'Crashing Drawbridge', 'Kitchen Imp', 'Earthquake', 'Mirror March', 'Remorseful Cleric', 'Nullpriest of Oblivion', 'Sigarda''s Splendor', 'Desperate Ritual', 'Joraga Treespeaker', 'Hatching Plans', 'Sylvan Library', 'Needle Spires', 'Myr Sire', 'Porphyry Nodes', 'Arcane Sanctum', 'Flash of Insight', 'Edgewall Innkeeper', 'Gigantomancer', 'Edric, Spymaster of Trest', 'Fire-Lit Thicket', 'Skull Prophet', 'Fieldmist Borderpost', 'Slip Out the Back', 'Bogardan Hellkite', 'Empty the Warrens', 'Edge of Autumn', 'Thief of Sanity', 'Evershrike', 'Deftblade Elite', 'Mage''s Attendant', 'Faerie Miscreant', 'Raven''s Crime', 'Spawning Pool', 'The Scorpion God', 'Brave the Elements', 'Thornglint Bridge', 'Profane Prayers', 'Angel of Invention', 'Mirrorshell Crab', 'Momentary Blink', 'Obsessive Stitcher', 'Incinerate', 'Mesmeric Fiend', 'Haunted Dead', 'Myr Superion', 'Hellspark Elemental', 'Mission Briefing', 'Catch // Release', 'Sacred Cat', 'Scoured Barrens', 'Zhalfirin Void', 'Vault of the Archangel', 'Duty-Bound Dead', 'Tempered in Solitude', 'Reckless Charge', 'Unlucky Witness', 'Shivan Dragon', 'Obscura Charm', 'White Sun''s Zenith', 'Riftwing Cloudskate', 'Rakdos Charm', 'Vivid Marsh', 'Merrow Reejerey', 'Reap the Past', 'Hotshot Mechanic', 'Porcelain Legionnaire', 'Sundial of the Infinite', 'Azorius Charm', 'Grand Architect', 'Avaricious Dragon', 'Battlefield Forge', 'Healer''s Hawk', 'Lifecrafter''s Bestiary', 'Mythos of Nethroi', 'Promise of Bunrei', 'Thirst for Discovery', 'Kari Zev''s Expertise', 'Fury of the Horde', 'Heliod''s Pilgrim', 'Drowned Secrets', 'Mishra''s Factory', 'Nomad Outpost', 'Tectonic Giant', 'Sliver Queen', 'Cloudshift', 'Acolyte of Affliction', 'Tyrant''s Choice', 'Dusk Legion Zealot', 'Stromkirk Noble', 'Bloodchief''s Thirst', 'First-Sphere Gargantua', 'Cloudpost', 'Diabolic Edict', 'Caves of Koilos', 'Relentless Pursuit', 'Kira, Great Glass-Spinner', 'Outland Liberator', 'Flame Rift', 'Tithe Taker', 'Vivid Crag', 'Distended Mindbender', 'Lotleth Giant', 'Aven Squire', 'Dream Trawler', 'Animate Dead', 'Arch of Orazca', 'Barrin, Tolarian Archmage', 'Barren Moor', 'Dark-Dweller Oracle', 'Form of the Dragon', 'Frenetic Sliver', 'Psychatog', 'Razortide Bridge', 'Seasoned Hallowblade', 'Heartless Summoning', 'Mystical Teachings', 'Archfiend''s Vessel', 'Adanto Vanguard', 'Tide Shaper', 'Kiln Fiend', 'Ravenous Chupacabra', 'Psychic Possession', 'Tidal Warrior', 'Cloudblazer', 'Blessed Defiance', 'Scale of Chiss-Goria', 'Lumbering Falls', 'Unburial Rites', 'Epochrasite', 'Sprite Dragon', 'Masterful Replication', 'Reflex Sliver', 'Parcel Myr', 'Invoke Calamity', 'Graf Reaver', 'Mobilizer Mech', 'Leechridden Swamp', 'Roar of the Wurm', 'Alchemist''s Gambit', 'Cartel Aristocrat', 'Rabbit Battery', 'Lavaclaw Reaches', 'Jace Beleren', 'Scryb Ranger', 'Sleight of Hand', 'Fiery Temper', 'Fact or Fiction', 'Radha, Heart of Keld', 'Bounty of the Luxa', 'Phantasmagorian', 'Phyrexian Dreadnought', 'Tendo Ice Bridge', 'Bruna, Light of Alabaster', 'Champion of the Parish', 'Purphoros''s Intervention', 'Spectral Steel', 'Nivmagus Elemental', 'Time Stretch', 'Brimstone Dragon', 'Sandwurm Convergence', 'Thraben Inspector', 'Staff of Domination', 'Rootborn Defenses', 'Stormblood Berserker', 'Chancellor of the Dross', 'Gilt-Leaf Archdruid', 'Brute Suit', 'Cosmos Elixir', 'Joraga Warcaller', 'Spirit Mantle', 'Mana Flare', 'Qasali Pridemage', 'Firewild Borderpost', 'Firebolt', 'Mirrodin Besieged', 'Heartfire Immolator', 'Falkenrath Aristocrat', 'Sandsteppe Citadel', 'Tallowisp', 'Lonis, Cryptozoologist', 'Weaver of Harmony', 'Stern Dismissal', 'March of Reckless Joy', 'Spirited Companion', 'Kabira Takedown', 'Haunted Plate Mail', 'Ensoul Artifact', 'Skyclave Shade', 'Feast of Blood', 'Marwyn, the Nurturer', 'Abbot of Keral Keep', 'Faerie Vandal', 'Astral Slide', 'Decree of Justice', 'Vampire Nighthawk', 'Colossus of Akros', 'Esper Charm', 'Akroma, Angel of Fury', 'Krark''s Thumb', 'Zulaport Cutthroat', 'Good-Fortune Unicorn', 'Might Sliver', 'Negate', 'Regal Caracal', 'Nemesis of Mortals', 'Field of Ruin', 'Mephidross Vampire', 'Dead // Gone', 'Aetherling', 'Swiftwater Cliffs', 'Regrowth', 'Assault Strobe', 'Moritte of the Frost', 'Memorial to Glory', 'Frantic Inventory', 'Rite of Belzenlok', 'Engulf the Shore', 'Sangrophage', 'Blackbloom Rogue', 'Sovereign''s Bite', 'Call of the Conclave', 'Faithful Mending', 'Burst Lightning', 'Judith, the Scourge Diva', 'Soul Spike', 'Bygone Bishop', 'Hall of the Bandit Lord', 'Mwonvuli Acid-Moss', 'Cabal Therapist', 'Raise the Alarm', 'Stonehorn Dignitary', 'Coiling Oracle', 'Llanowar Tribe', 'Llanowar Wastes', 'King of the Pride', 'Etherium Sculptor', 'Thermo-Alchemist', 'Spell Pierce', 'Mizzium Mortars', 'Vryn Wingmare', 'Grasp of Darkness', 'Mystic Speculation', 'Possibility Storm', 'Halimar Excavator', 'Sunscorched Desert', 'Nevermore', 'Taborax, Hope''s Demise', 'Doom Blade', 'Rise and Shine', 'Otherworldly Gaze', 'Commit // Memory', 'Glimmerpost', 'Voidslime', 'Legacy Weapon', 'Evolving Wilds', 'Liliana Vess', 'Foreboding Ruins', 'Familiar''s Ruse', 'Panharmonicon', 'Port of Karfell', 'Captured Sunlight', 'Spectra Ward', 'Battle Screech', 'Falkenrath Gorger', 'Honor of the Pure', 'Wretched Banquet', 'Champion of Dusk', 'Bloodthrone Vampire', 'Windbrisk Heights', 'Sphinx of the Steel Wind', 'Wild Cantor', 'Rakdos Cackler', 'Memorial to War', 'Nevermaker', 'Sidisi, Brood Tyrant', 'See the Truth', 'Pillage', 'Day of Judgment', 'Obstinate Baloth', 'Silverbluff Bridge', 'Secluded Glen', 'Giant Killer', 'Honden of Infinite Rage', 'Thirst for Meaning', 'Homicidal Seclusion', 'Spark Elemental', 'Maul of the Skyclaves', 'Cultivate', 'Glorious End', 'Canyon Slough', 'Weathered Wayfarer', 'Angel of Glory''s Rise', 'Abiding Grace', 'Extractor Demon', 'Barbed Sextant', 'Putrid Imp', 'Scorched Rusalka', 'Dovin Baan', 'Kefnet the Mindful', 'End-Raze Forerunners', 'Thought Scour', 'The Underworld Cookbook', 'Luminarch Ascension', 'Torrent Sculptor', 'Hour of Reckoning', 'Thaumatic Compass', 'Desecration Demon', 'Skyclave Pick-Axe', 'Shipwreck Sifters', 'Arrogant Wurm', 'Skyclave Relic', 'Greater Gargadon', 'Ground Rift', 'Oust', 'Ethereal Armor', 'Arcanum Wings', 'Mogg War Marshal', 'Astral Drift', 'Dregscape Sliver', 'Nylea''s Presence', 'Shrieking Affliction', 'Hypergenesis', 'Shardless Agent', 'Vampire Lacerator', 'Sterling Grove', 'Orzhov Signet', 'Veilborn Ghoul', 'Sejiri Refuge', 'Consume the Meek', 'Avatar of Discord', 'Born to Drive', 'Lose Focus', 'Bituminous Blast', 'Demonic Embrace', 'Snowfield Sinkhole', 'Anguished Unmaking', 'Tatsunari, Toad Rider', 'Woodland Cemetery', 'Arbor Elf', 'Watcher for Tomorrow', 'Vampire''s Kiss', 'Cursecatcher', 'Obliterate', 'Intruder Alarm', 'Secluded Steppe', 'Martyr of Sands', 'The Bloodsky Massacre', 'Riveteers Overlook', 'Animal Magnetism', 'Think Twice', 'Eternal Dragon', 'Wayward Guide-Beast', 'Myth Realized', 'Arcus Acolyte', 'Buried Alive', 'Earthshaker Khenra', 'Detention Sphere', 'Dragonskull Summit', 'Cabal Initiate', 'Blazing Rootwalla', 'Worldgorger Dragon', 'Search for Tomorrow', 'Wild Mongrel', 'Angel of Sanctions', 'Darksteel Colossus', 'Profane Procession', 'Culling Scales', 'Electrostatic Field', 'Prodigy''s Prototype', 'Celestial Gatekeeper', 'Heir of Falkenrath', 'Warleader''s Helix', 'Boon of Safety', 'Ranger of Eos', 'Dark Salvation', 'Enigma Sphinx', 'Tangleroot', 'Kher Keep', 'Master of the Pearl Trident', 'Primalcrux', 'Stormtide Leviathan', 'Counterflux', 'Ash Zealot', 'Sultai Charm', 'Inspiring Overseer', 'Glen Elendra Archmage', 'Rakdos Signet', 'Dread Fugue', 'Collateral Damage', 'Fanatical Firebrand', 'Coalition Relic', 'Nissa Revane', 'Disciple of the Vault', 'Hour of Promise', 'Goldmire Bridge', 'Feed the Swarm', 'Seething Song', 'Pyrrhic Revival', 'Grisly Salvage', 'Wildfield Borderpost', 'Kuro, Pitlord', 'Slitherhead', 'Generous Visitor', 'Ojutai''s Command', 'Akoum Hellhound', 'Nicol Bolas, Planeswalker', 'Undercity Informer', 'Diregraf Ghoul', 'Sensor Splicer', 'Carnophage', 'Duress', 'Mystic Snake', 'Steppe Lynx', 'Blade Splicer', 'Brokers Charm', 'Sword-Point Diplomacy', 'Birds of Paradise', 'Vivid Grove', 'Sire of Insanity', 'Radiant Scrollwielder', 'Lodestone Golem', 'Demonic Dread', 'Call the Bloodline', 'Kalastria Highborn', 'Merchant of the Vale', 'Soulflayer', 'Triskelion', 'Oni-Cult Anvil', 'Mistvein Borderpost', 'Silverblade Paladin', 'Balustrade Spy', 'Cloudcrest Lake', 'Flame Javelin', 'Tempered Sliver', 'Mindslaver', 'Folio of Fancies', 'Scuttletide', 'Bloodbraid Elf', 'Genesis', 'Realm Razer', 'Blackmail', 'Midnight Clock', 'Vital Splicer', 'Stitcher''s Graft', 'Sigil of Valor', 'Sylvan Primordial', 'Hornet Queen', 'Demonic Rising', 'Demon of Dark Schemes', 'Lone Rider', 'Pieces of the Puzzle', 'Path to the World Tree', 'Temple of Malice', 'Crackleburr', 'Nimble Mongoose', 'Serrated Scorpion', 'Hive Stirrings', 'Wake Thrasher', 'Netherborn Phalanx', 'Vindicate', 'Discovery // Dispersal', 'Adorned Pouncer', 'Keruga, the Macrosage', 'Lurching Rotbeast', 'Midnight Reaper', 'Tendrils of Agony', 'Vivid Meadow', 'Izzet Boilerworks', 'Mirran Crusader', 'Sarkhan the Masterless', 'Renewed Faith', 'Sylvan Advocate', 'Ashenmoor Liege', 'Kunoros, Hound of Athreos', 'Harrow', 'Elvish Mystic', 'Blood Fountain', 'Reality Ripple', 'Kjeldoran Outpost', 'Sunblade Samurai', 'Ethersworn Canonist', 'Llanowar Elves', 'Sungold Sentinel', 'Aphemia, the Cacophony', 'Mouth of Ronom', 'Acidic Slime', 'Grimoire Thief', 'Scrapheap Scrounger', 'Claws of Gix', 'Korlash, Heir to Blackblade', 'Dregscape Zombie', 'Voldaren Epicure', 'Secluded Courtyard', 'Treasure Hunt', 'Wight', 'Trostani''s Summoner', 'Hymn to Tourach', 'Twisted Abomination', 'Bonescythe Sliver', 'Improbable Alliance', 'Goblin Assault', 'Elvish Archdruid', 'Gaea''s Will', 'Jeskai Ascendancy', 'Reckless Impulse', 'Kessig Flamebreather', 'Sylvan Messenger', 'Knight of Infamy', 'Wonder', 'Hateful Eidolon', 'Tymaret, Chosen from Death', 'Waterfront District', 'Hell Mongrel', 'Mindslicer', 'Pelakka Predation', 'Den Protector', 'Llanowar Mentor', 'Hissing Quagmire', 'Strike It Rich', 'Brushfire Elemental', 'Selesnya Charm', 'Explore', 'Basking Rootwalla', 'Jace, Memory Adept', 'Akrasan Squire', 'Ammit Eternal', 'Go for the Throat', 'Sojourner''s Companion', 'Zurgo Bellstriker', 'Undead Butler', 'Mystifying Maze', 'Drogskol Captain', 'Thawing Glaciers', 'Conclave Tribunal', 'Reckless Waif', 'Brain Freeze', 'Mana Leak', 'Temple of Enlightenment', 'It That Betrays', 'Rishadan Dockhand', 'Sarkhan the Mad', 'Transmogrify', 'Cathar Commando', 'Jokulhaups', 'Escape Velocity', 'Thunderous Wrath', 'Samut, Voice of Dissent', 'Bedlam Reveler', 'Painful Truths', 'Chromatic Lantern', 'Lava Dart', 'Darigaaz Reincarnated', 'Elixir of Immortality', 'Jace, the Living Guildpact', 'Raze the Effigy', 'Knight of Glory', 'Grim Haruspex', 'Sea Gate Wreckage', 'Blacklance Paragon', 'Old Stickfingers', 'Niv-Mizzet, the Firemind', 'Cathartic Reunion', 'Zombie Infestation', 'Horror of the Broken Lands', 'Fauna Shaman', 'Hanweir Garrison', 'Elves of Deep Shadow', 'Lonely Sandbar', 'Ghitu Lavarunner', 'Graveyard Marshal', 'Tireless Provisioner', 'Master Splicer', 'Treasure Cruise', 'Just the Wind', 'Flame Jab', 'Swans of Bryn Argoll', 'Lavabelly Sliver', 'Mikaeus, the Lunarch', 'Tapping at the Window', 'Shining Shoal', 'Lord of the Undead', 'Frantic Search', 'Sticky Fingers', 'Ionize', 'Memory Lapse', 'Irencrag Feat', 'Jwari Disruption', 'Nature''s Lore', 'Prophetic Prism', 'Opt', 'Mind''s Desire', 'Gatekeeper of Malakir', 'Sol Talisman', 'Pia''s Revolution', 'Fire Covenant', 'Okiba Reckoner Raid', 'Galerider Sliver', 'Repeal', 'Kird Ape', 'Nissa''s Chosen', 'Oversoul of Dusk', 'Mire Triton', 'Lotleth Troll', 'Dreamstealer', 'Dryad Militant', 'Captivating Vampire', 'Skophos Reaver', 'Spikefield Hazard', 'Snow-Covered Swamp', 'Brine Comber', 'Fatestitcher', 'Gloomshrieker', 'Bazaar Trademage', 'Gideon Jura', 'Yahenni''s Expertise', 'Hinterland Harbor', 'Dismal Backwater', 'Scrap Welder', 'Stirring Wildwood', 'Fungus Sliver', 'Elvish Visionary', 'Mech Hangar', 'Arashin Foremost', 'Circular Logic', 'Justice Strike', 'Obscura Storefront', 'Champion of Wits', 'Primal Command', 'Trinket Mage', 'Ghostly Pilferer', 'Crack the Earth', 'Diffusion Sliver', 'Silent Arbiter', 'Death Baron', 'Tooth and Nail', 'Logic Knot', 'Gonti, Lord of Luxury', 'Kami of False Hope', 'Skyblade''s Boon', 'Gryff''s Boon', 'Conduit of Ruin', 'Approach of the Second Sun', 'Changeling Outcast', 'Seaside Citadel', 'Terramorphic Expanse', 'Maestros Charm', 'Slagstorm', 'Silundi Vision', 'Witch''s Cottage', 'Wrath of God', 'Glacial Fortress', 'Vicious Conquistador', 'Temple of Mystery', 'Talisman of Impulse', 'Fertile Ground', 'Angel of Despair', 'Blistercoil Weird', 'Gilded Lotus', 'Mulch', 'Kazuul''s Fury', 'Vapor Snag', 'Grimdancer', 'Clifftop Retreat'))) 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, 77.5, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (64.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Clifftop Retreat', 'Sylvan Primordial', 'Fertile Ground', 'Talisman of Impulse', 'Hissing Quagmire', 'Nissa''s Chosen', 'Gemhide Sliver', 'Halimar Excavator', 'Mana Flare', 'Negate', 'Tyrant''s Scorn', 'Temple of Enlightenment', 'Edric, Spymaster of Trest', 'Circle of Confinement', 'Giant Killer', 'Rashmi, Eternities Crafter', 'Genesis', 'Regrowth', 'Cartel Aristocrat', 'Kalastria Highborn', 'Memorial to War', 'Sanctum of Stone Fangs', 'Scorched Rusalka', 'Skyclave Pick-Axe', 'Blackmail', 'The Underworld Cookbook', 'Azorius Charm', 'Aether Spellbomb', 'Kazuul''s Fury', 'Tithe Taker', 'Broodstar', 'Heir of Falkenrath', 'Repeal', 'Incinerate', 'Jokulhaups', 'Firebolt', 'Illuminator Virtuoso', 'Nissa Revane', 'Fanatical Firebrand', 'Elvish Visionary', 'Mystical Teachings', 'Thief of Sanity', 'Assert Authority', 'Inevitable Betrayal', 'Diabolic Edict', 'Dark Ritual', 'Moon-Circuit Hacker', 'Crackleburr', 'Everflowing Chalice', 'Kira, Great Glass-Spinner', 'Blasphemous Act', 'Fabricate', 'Blood Fountain', 'Cloudpost', 'Lavaclaw Reaches', 'Shipwreck Sifters', 'Oona, Queen of the Fae', 'Harbinger of the Tides', 'Mystic Monastery', 'Mage''s Attendant', 'Dregscape Sliver', 'Arcbound Javelineer', 'Fauna Shaman', 'Growth-Chamber Guardian', 'Vault of the Archangel', 'Delver of Secrets', 'Sensor Splicer', 'Venom Sliver', 'Forbid', 'Master Splicer', 'Psychic Possession', 'Skyblade''s Boon', 'Ajani, the Greathearted', 'Gavony Township', 'Trostani''s Summoner', 'Otherworldly Gaze', 'Coiling Oracle', 'Bogardan Hellkite', 'Fury of the Horde', 'Game Trail', 'Vivid Meadow', 'Nether Spirit', 'Remorseful Cleric', 'Mindslicer', 'Sigarda''s Splendor', 'Restore Balance', 'Brute Suit', 'Treacherous Blessing', 'Grave Scrabbler', 'Mizzium Mortars', 'Unesh, Criosphinx Sovereign', 'Alms of the Vein', 'White Sun''s Zenith', 'Mizzium Skin', 'Grasp of Darkness', 'Stern Dismissal', 'Promise of Bunrei', 'Hagra Mauling', 'Grimoire Thief', 'Witching Well', 'Glorious End', 'Angel of Glory''s Rise', 'Pelakka Predation', 'Sticky Fingers', 'Thaumatic Compass', 'Phantasmagorian', 'Young Necromancer', 'Reckless Impulse', 'Edgewall Innkeeper', 'Barbarian Ring', 'Cabaretti Courtyard', 'Sol Talisman', 'Yahenni''s Expertise', 'Panharmonicon', 'Raze the Effigy', 'Acidic Slime', 'Okiba Reckoner Raid', 'See the Truth', 'Decree of Justice', 'Ponder', 'Retributive Wand', 'Mobilizer Mech', 'Fiery Temper', 'Crackling Drake', 'Phyrexian Dreadnought', 'Stone Rain', 'Smokestack', 'Ghostly Pilferer', 'Spirit Mantle', 'Timeless Witness', 'Kami of False Hope', 'Zurgo Bellstriker', 'Porphyry Nodes', 'Throes of Chaos', 'Midnight Reaper', 'Judge''s Familiar', 'Lantern of the Lost', 'Pieces of the Puzzle', 'Darkheart Sliver', 'Woodfall Primus', 'Commune with the Gods', 'Day of Judgment', 'Mire Triton', 'Healer''s Hawk', 'Caves of Koilos', 'Empty the Warrens', 'Nature''s Lore', 'Call the Bloodline', 'Wild Nacatl', 'Dream Trawler', 'Arcbound Mouser', 'Tapping at the Window', 'Solitary Confinement', 'Ball Lightning', 'Aetherling', 'Spawning Pool', 'Jace Beleren', 'Behold the Multiverse', 'Undead Butler', 'Forked Bolt', 'Zetalpa, Primal Dawn', 'Graveyard Marshal', 'Lumbering Falls', 'Tidal Warrior', 'Gaea''s Will', 'Rise and Shine', 'Sphinx''s Tutelage', 'Abrade', 'Secluded Glen', 'Balustrade Spy', 'Terastodon', 'Barbed Sextant', 'Jace, Memory Adept', 'Psychatog', 'Time Stretch', 'Vivid Grove', 'Dusk Legion Zealot', 'Claim the Firstborn', 'Pathrazer of Ulamog', 'Haunted Plate Mail', 'Hall of the Bandit Lord', 'Doomed Traveler', 'Tyrant''s Choice', 'Outland Liberator', 'Crack the Earth', 'Cabal Initiate', 'Falkenrath Gorger', 'Fallen Shinobi', 'Myr Superion', 'Vessel of Nascency', 'Kher Keep', 'Feast of Blood', 'Springbloom Druid', 'Rishadan Dockhand', 'Kaya, Ghost Assassin', 'Sinister Concoction', 'Staggering Insight', 'Opt', 'Multiple Choice', 'Colossus of Akros', 'Cleansing Wildfire', 'Auramancer', 'Possibility Storm', 'Temple of Silence', 'Sarcomite Myr', 'Wildfield Borderpost', 'Lochmere Serpent', 'Fiend Hunter', 'Duskwielder', 'Vivien''s Arkbow', 'Explore', 'Snow-Covered Forest', 'Blue Sun''s Zenith', 'Dread Presence', 'Akroma''s Memorial', 'Painful Truths', 'Demonic Rising', 'Joraga Treespeaker', 'Flame Javelin', 'Den Protector', 'Elemental Masterpiece', 'Joraga Warcaller', 'Brave the Elements', 'Riftwing Cloudskate', 'Swiftwater Cliffs', 'Arcane Sanctum', 'Mirrorshell Crab', 'Festival Crasher', 'Zombie Infestation', 'Adanto Vanguard', 'Containment Construct', 'Tectonic Giant', 'Village Messenger', 'Crumbling Necropolis', 'Master of Death', 'Arcus Acolyte', 'Reinforced Ronin', 'Firebrand Archer', 'Shrieking Affliction', 'Discovery // Dispersal', 'Lotleth Giant', 'Stonehorn Dignitary', 'Arcbound Worker', 'Sandwurm Convergence', 'Torrent Sculptor', 'Voldaren Epicure', 'Desecration Demon', 'Archfiend''s Vessel', 'Old Stickfingers', 'Battlefield Forge', 'Master of the Pearl Trident', 'Obstinate Baloth', 'Unsubstantiate', 'Obsessive Stitcher', 'Mirror March', 'Tangleroot', 'Karmic Guide', 'Improbable Alliance', 'Ramunap Excavator', 'Sterling Grove', 'Silverblade Paladin', 'Kird Ape', 'Hymn to Tourach', 'Silverbluff Bridge', 'Tendo Ice Bridge', 'Masterful Replication', 'Chancellor of the Dross', 'Orzhov Signet', 'Good-Fortune Unicorn', 'Earthquake', 'Niv-Mizzet, the Firemind', 'Faerie Vandal', 'Vedalken Engineer', 'Counterflux', 'Evolving Wilds', 'Stubborn Denial', 'Heartless Summoning', 'Boros Reckoner', 'Crashing Drawbridge', 'Hinterland Harbor', 'Truefire Captain', 'Kazandu Mammoth', 'Tendrils of Agony', 'Unlucky Witness', 'Dreg Mangler', 'Avacyn''s Pilgrim', 'Veinfire Borderpost', 'Terramorphic Expanse', 'Glimmerpost', 'Hythonia the Cruel', 'Lone Rider', 'Brokers Charm', 'Might Sliver', 'Cathar Commando', 'Scythe Leopard', 'Samut, Voice of Dissent', 'Seht''s Tiger', 'Fieldmist Borderpost', 'Elvish Harbinger', 'Thermo-Alchemist', 'Perilous Research', 'Doomskar Titan', 'Mausoleum Secrets', 'Raven''s Crime', 'Akrasan Squire', 'Akoum Hellhound', 'General Ferrous Rokiric', 'Staff of Domination', 'Flame Jab', 'Chromatic Lantern', 'Silvergill Adept', 'Marwyn, the Nurturer', 'Unburial Rites', 'Think Twice', 'Sunblade Samurai', 'Rotting Rats', 'Ash Zealot', 'Azami, Lady of Scrolls', 'Tandem Lookout', 'Heartless Act', 'Metalwork Colossus', 'Tymaret Calls the Dead', 'Bone Shards', 'Weaver of Harmony', 'Wight', 'Rakdos Cackler', 'Lavabelly Sliver', 'Ojutai''s Command', 'Spikefield Hazard', 'Tradewind Rider', 'Lord of the Undead', 'Fire-Lit Thicket', 'Undercity Informer', 'Skophos Reaver', 'Oversoul of Dusk', 'Mirrorweave', 'Myth Realized', 'Form of the Dragon', 'Esper Charm', 'Tombstalker', 'Mistvein Borderpost', 'Sleeper Agent', 'Snow-Covered Mountain', 'Mythos of Brokkos', 'Fatestitcher', 'First-Sphere Gargantua', 'Buried Ruin', 'Grapeshot', 'Memorial to Glory', 'Ground Rift', 'Claws of Gix', 'The Bloodsky Massacre', 'Inspiring Overseer', 'Bloodthrone Vampire', 'Crash Through', 'Watcher for Tomorrow', 'Disallow', 'Mesa Enchantress', 'Vampire''s Kiss', 'Obscura Charm', 'Liliana Vess', 'Wayward Guide-Beast', 'Dragonstorm', 'Rabbit Battery', 'Pyretic Ritual', 'Blade Splicer', 'Vapor Snag', 'Rootbound Crag', 'Skemfar Avenger', 'Triskelion', 'Intangible Virtue', 'Mystic Speculation', 'Honden of Infinite Rage', 'Disciple of Bolas', 'Kunoros, Hound of Athreos', 'Pia''s Revolution', 'Call of the Conclave', 'Search for Tomorrow', 'Graf Reaver', 'Thirst for Meaning', 'Vivid Marsh', 'Edge of Autumn', 'Conclave Tribunal', 'Rune-Scarred Demon', 'Netherborn Phalanx', 'Spell Burst', 'Temple of Epiphany', 'Sliver Queen', 'Rakdos Signet', 'Mouth of Ronom', 'Bazaar Trademage', 'Barren Moor', 'Living Twister', 'Celestial Gatekeeper', 'Heliod''s Pilgrim', 'Signal Pest', 'Tangled Florahedron', 'Nivmagus Elemental', 'Dawn of Hope', 'Ezuri, Renegade Leader', 'Angel of Sanctions', 'Vivid Creek', 'Needle Spires', 'Acolyte of Affliction', 'Sphinx of Foresight', 'Hanweir Garrison', 'Mikaeus, the Lunarch', 'Goblin Assault', 'Lifecrafter''s Bestiary', 'Coalition Relic', 'Foreboding Ruins', 'Detention Sphere', 'Grimdancer', 'Kari Zev''s Expertise', 'Scuttletide', 'Generous Visitor', 'All Suns'' Dawn', 'Arcbound Ravager', 'Kitchen Imp', 'Witch''s Cottage', 'Llanowar Elves', 'Soulflayer', 'Lonely Sandbar', 'Scrap Trawler', 'Scoured Barrens', 'Cathartic Reunion', 'Blazing Rootwalla', 'Gideon Jura', 'Burst Lightning', 'Silundi Vision', 'Justice Strike', 'Porcelain Legionnaire', 'Wall of Omens', 'Malakir Rebirth', 'Anax, Hardened in the Forge', 'Champion of the Flame', 'Seismic Assault', 'Sylvan Advocate', 'Skirk Ridge Exhumer', 'Blacklance Paragon', 'Anguished Unmaking', 'Deep Forest Hermit', 'Grand Architect', 'Farseek', 'Frenetic Sliver', 'Leonin Warleader', 'Viscera Seer', 'Voidslime', 'Nevermore', 'Doom Blade', 'Akroan Crusader', 'Zulaport Cutthroat', 'Lashwrithe', 'Dark Salvation', 'Fireblade Artist', 'Commit // Memory', 'Satyr Wayfinder', 'Darigaaz Reincarnated', 'Judith, the Scourge Diva', 'Stromkirk Noble', 'Thunderous Wrath', 'Deftblade Elite', 'Tidespout Tyrant', 'Sharuum the Hegemon', 'Mission Briefing', 'Mythos of Nethroi', 'Sword-Point Diplomacy', 'Thought Scour', 'Chance Encounter', 'Anafenza, Kin-Tree Spirit', 'Dead // Gone', 'Hellspark Elemental', 'Sungold Sentinel', 'Mirage Mirror', 'Crypt of Agadeem', 'Blazing Shoal', 'Bituminous Blast', 'Sigil of Valor', 'Cleric of Life''s Bond', 'Fact or Fiction', 'Skyclave Relic', 'Primal Command', 'Timely Reinforcements', 'Elixir of Immortality', 'Fire Prophecy', 'Bruna, Light of Alabaster', 'Ionize', 'Sangrophage', 'Bygone Bishop', 'Drogskol Captain', 'Reckless Charge', 'Changeling Outcast', 'Mindslaver', 'Reliquary Tower', 'Reckless Waif', 'Stirring Wildwood', 'Jwari Disruption', 'Bile Blight', 'Spirited Companion', 'Terrarion', 'Obsessive Search', 'Selesnya Charm', 'Chief Engineer', 'Captivating Vampire', 'Futurist Sentinel', 'Orcish Lumberjack', 'Maestros Charm', 'Thornglint Bridge', 'Dread Fugue', 'Conclave Mentor', 'Vesperlark', 'Temple of Mystery', 'Disciple of the Vault', 'Vryn Wingmare', 'Lava Dart', 'Thirst for Discovery', 'Falkenrath Pit Fighter', 'Myr Battlesphere', 'Cosima, God of the Voyage', 'Mystifying Maze', 'Abbot of Keral Keep', 'Tomb of Urami', 'Falkenrath Aristocrat', 'Stitcher''s Graft', 'Cursecatcher', 'Mech Hangar', 'Brion Stoutarm', 'Mishra''s Factory', 'Dark Withering', 'Beast Whisperer', 'Vicious Conquistador', 'Tatsunari, Toad Rider', 'Geomancer''s Gambit', 'Thawing Glaciers', 'Declaration in Stone', 'Invoke Calamity', 'Barter in Blood', 'Tanglepool Bridge', 'Mana Leak', 'Twisted Abomination', 'The Scorpion God', 'Laboratory Maniac', 'Korlash, Heir to Blackblade', 'Field of Ruin', 'Lodestone Golem', 'Kessig Flamebreather', 'Dryad Militant', 'Faithless Salvaging', 'Assault Strobe', 'Shatter the Sky', 'Ashenmoor Liege', 'Dismal Backwater', 'Sygg, River Cutthroat', 'Avatar of Woe', 'Sylvan Library', 'Myr Reservoir', 'Sidisi, Brood Tyrant', 'Lunarch Veteran', 'Horror of the Broken Lands', 'Fireblade Charger', 'Gitaxian Probe', 'Adorned Pouncer', 'Experimental Synthesizer', 'Captured Sunlight', 'Frantic Search', 'Arbor Elf', 'Merchant of the Vale', 'Arch of Orazca', 'Cosmos Elixir', 'Shriekmaw', 'Collective Effort', 'Ghitu Lavarunner', 'Frontier Bivouac', 'Relentless Pursuit', 'Sign in Blood', 'Bedlam Reveler', 'Primal Surge', 'Grim Haruspex', 'Mesmeric Fiend', 'Alchemist''s Gambit', 'Snowfield Sinkhole', 'Fire Covenant', 'Mobilized District', 'Endbringer', 'Howling Mine', 'Temporal Fissure', 'Sojourner''s Companion', 'Dragonskull Summit', 'Born to Drive', 'Ultimate Price', 'Leonin Relic-Warder', 'Swans of Bryn Argoll', 'Memory Lapse', 'Curiosity', 'Touch the Spirit Realm', 'Arrogant Wurm', 'Renewed Faith', 'Vivid Crag', 'Magmatic Insight', 'Chandra, Pyromaster', 'Feed the Swarm', 'Ranger of Eos', 'Knight of Glory', 'Hatching Plans', 'Chain Lightning', 'Nested Shambler', 'Flayer of the Hatebound', 'Verdant Command', 'Skyclave Shade', 'Drossforge Bridge', 'Ensoul Artifact', 'Evershrike', 'Shrapnel Blast', 'Birds of Paradise', 'Cabal Therapist', 'Catch // Release', 'Firewild Borderpost', 'Rite of Belzenlok', 'Hour of Promise', 'Bloodvial Purveyor', 'Acquisitions Expert', 'Banehound', 'Kiln Fiend', 'Reflex Sliver', 'Wake Thrasher', 'Angel of Invention', 'King of the Pride', 'Cloudblazer', 'Terminus', 'Emmara, Soul of the Accord', 'Scrap Welder', 'Tooth of Chiss-Goria', 'Figure of Destiny', 'Maul of the Skyclaves', 'Colossal Skyturtle', 'Monstrous Carabid', 'Tilling Treefolk', 'Ashenmoor Gouger', 'Moritte of the Frost', 'Wooded Bastion', 'Champion of the Parish', 'Condemn', 'Radha, Heart of Keld', 'Rishkar, Peema Renegade', 'Castigate', 'Cerodon Yearling', 'Tempered Sliver', 'Kuro, Pitlord', 'Ornithopter', 'Ancestral Anger', 'Transmogrify', 'Duty-Bound Dead', 'Parcel Myr', 'Urza''s Factory', 'Ravenous Chupacabra', 'Basking Rootwalla', 'Power Sink', 'Nevermaker', 'Go for the Throat', 'Ethersworn Sphinx', 'Orim''s Chant', 'Defiant Strike', 'Spellweaver Helix', 'Shining Shoal', 'Diffusion Sliver', 'Gigantomancer', 'Hive Mind', 'Wonder', 'Wild Cantor', 'Scryb Ranger', 'Voldaren Pariah', 'Serrated Scorpion', 'Hero of Precinct One', 'Arashin Foremost', 'Midnight Clock', 'Momentary Blink', 'Familiar''s Ruse', 'Ghoultree', 'Dizzy Spell', 'Riveteers Overlook', 'Izzet Boilerworks', 'Archetype of Endurance', 'Blistercoil Weird', 'Distended Mindbender', 'Ingenious Infiltrator', 'Viashino Pyromancer', 'Biting Rain', 'Krark''s Thumb', 'Fatal Grudge', 'Animation Module', 'Darksteel Colossus', 'Demonic Embrace', 'Sleight of Hand', 'Nullpriest of Oblivion', 'Flame Rift', 'Mind''s Desire', 'Goldmire Bridge', 'Tide Shaper', 'Treasure Cruise', 'Brain Freeze', 'Disenchant', 'Enigma Sphinx', 'Arrogant Bloodlord', 'Shatterskull Charger', 'Memnarch', 'Benevolent Bodyguard', 'Dreamstealer', 'Brainstone', 'Extractor Demon', 'Spark Elemental', 'Llanowar Mentor', 'Colossification', 'Consume the Meek', 'Bonescythe Sliver', 'Arguel''s Blood Fast', 'Talisman of Curiosity', 'Port of Karfell', 'Soul Spike', 'Sundial of the Infinite', 'Profane Procession', 'Wrath of God', 'Shigeki, Jukai Visionary', 'Engulf the Shore', 'Sovereign''s Bite', 'Blessed Defiance', 'Magister of Worth', 'Purphoros''s Intervention', 'Soul Snare', 'Stormtide Leviathan', 'Steppe Lynx', 'Diregraf Ghoul', 'Homing Sliver', 'Warleader''s Helix', 'Path of Mettle', 'Pillage', 'Canyon Slough', 'End-Raze Forerunners', 'Brushfire Elemental', 'Flame Slash', 'Seething Song', 'Qasali Pridemage', 'Nomad Outpost', 'Teachings of the Kirin', 'Jack-o''-Lantern', 'Scab-Clan Berserker', 'Dragon Mantle', 'Skyclave Cleric', 'Demonic Dread', 'Giant Ox', 'Intruder Alarm', 'Mask of the Mimic', 'Tempered in Solitude', 'Dimir Infiltrator', 'Kjeldoran Outpost', 'It That Betrays', 'Epochrasite', 'Animate Dead', 'Glowspore Shaman', 'Mirrodin Besieged', 'Electrostatic Field', 'Wretched Banquet', 'Llanowar Tribe', 'Avatar of Discord', 'Profane Prayers', 'Fungus Sliver', 'Slip Out the Back', 'Palace Siege', 'Underworld Connections', 'Bloodline Keeper', 'Dauntless Bodyguard', 'Glacial Fortress', 'Lotleth Troll', 'Culling Scales', 'Stormblood Berserker', 'Hypergenesis', 'Kefnet the Mindful', 'Coralhelm Commander', 'Sacred Cat', 'Animal Magnetism', 'Hotshot Mechanic', 'Aphemia, the Cacophony', 'Spectra Ward', 'Virulent Sliver', 'Brimstone Dragon', 'Waterfront District', 'Hour of Reckoning', 'Secluded Courtyard', 'Thraben Inspector', 'Summary Dismissal', 'Erebos''s Intervention', 'Myr Sire', 'Putrid Imp', 'Deep Analysis', 'Bump in the Night', 'Rosethorn Acolyte', 'Goblin Bombardment', 'Slitherhead', 'Earthshaker Khenra', 'Wandering Mind', 'Kodama''s Reach', 'Hunted Witness', 'Avaricious Dragon', 'Vital Splicer', 'Keruga, the Macrosage', 'Sultai Charm', 'Desperate Ritual', 'Hive Stirrings', 'Dimir Aqueduct', 'Tireless Provisioner', 'Aven Squire', 'Clarion Spirit', 'Sylvan Scrying', 'Slagwoods Bridge', 'Elvish Mystic', 'Mistveil Plains', 'Oriss, Samite Guardian', 'Thirst for Knowledge', 'Leechridden Swamp', 'Vindicate', 'Blood Pact', 'Quest for the Nihil Stone', 'Mwonvuli Acid-Moss', 'Lurching Rotbeast', 'Bloodchief''s Thirst', 'Read the Bones', 'Reap the Past', 'Abundant Harvest', 'Bounty of the Luxa', 'Tooth and Nail', 'Piranha Marsh', 'Roar of the Wurm', 'Nicol Bolas, Planeswalker', 'Agonizing Remorse', 'Lose Focus', 'Spell Pierce', 'Asylum Visitor', 'Ghost Quarter', 'Radiant Scrollwielder', 'Temple of Malice', 'Approach of the Second Sun', 'Etherium Sculptor', 'Drowned Catacomb', 'Llanowar Wastes', 'Brokers Hideout', 'Harrow', 'Brine Comber', 'Death Cloud', 'Ashen Ghoul', 'Jace, the Living Guildpact', 'Hell Mongrel', 'Gonti, Lord of Luxury', 'March of Reckless Joy', 'Lead the Stampede', 'Merrow Reejerey', 'Logic Knot', 'Force of Despair', 'Plow Under', 'Knight of the White Orchid', 'Dread Return', 'Heartfire Immolator', 'Sire of Insanity', 'Tower of Calamities', 'Cloudshift', 'Taborax, Hope''s Demise', 'Conduit of Ruin', 'Obliterate', 'Soulherder', 'Galerider Sliver', 'Tranquil Thicket', 'Knight of Infamy', 'Shard Volley', 'Wild Mongrel', 'Tymaret, Chosen from Death', 'Dark-Dweller Oracle', 'Faerie Miscreant', 'Akroma, Angel of Fury', 'Patchwork Automaton', 'Elves of Deep Shadow', 'Eater of Virtue', 'Kumano Faces Kakkazan', 'Sprite Dragon', 'Blackbloom Rogue', 'Champion of Dusk', 'Tyrant of Discord', 'Windbrisk Heights', 'Folio of Fancies', 'Grisly Salvage', 'Orgg', 'Oni-Cult Anvil', 'Revitalize', 'Mystic Snake', 'Hateful Eidolon', 'Hypnotic Specter', 'Frantic Inventory', 'Dormant Sliver', 'Michiko''s Reign of Truth', 'Slagstorm', 'Gatekeeper of Malakir', 'Cemetery Reaper', 'Dead Weight', 'Dragonkin Berserker', 'Sovereigns of Lost Alara', 'Glorybringer', 'Temple of Deceit', 'Nest Invader', 'Weathered Wayfarer', 'Garruk Wildspeaker', 'Sejiri Refuge', 'Collateral Damage', 'Haunted Dead', 'Gilded Lotus', 'Boon of Safety', 'Ethereal Armor', 'Shardless Agent', 'Zabaz, the Glimmerwasp', 'Shivan Dragon', 'Eternal Dragon', 'Sarkhan the Masterless', 'Strike It Rich', 'Astral Slide', 'Temple of Malady', 'Ethersworn Canonist', 'Restoration Angel', 'Sylvan Messenger', 'The Birth of Meletis', 'Swiftblade Vindicator', 'Nimble Mongoose', 'Abiding Grace', 'Rustvale Bridge', 'Sunscorched Desert', 'Bloodhall Priest', 'Treasure Hunt', 'Reality Ripple', 'Arcanum Wings', 'Worldgorger Dragon', 'Reveillark', 'Seasoned Hallowblade', 'Homicidal Seclusion', 'Gilt-Leaf Archdruid', 'Seaside Citadel', 'Mogg War Marshal', 'Tempest Djinn', 'Gryff''s Boon', 'Raging Ravine', 'Pyrrhic Revival', 'Benalish Marshal', 'Silent Submersible', 'Prophetic Prism', 'Nemesis of Mortals', 'Escape Velocity', 'Flash of Insight', 'Mirran Crusader', 'Nezahal, Primal Tide', 'Naban, Dean of Iteration', 'Volcano Hellion', 'Greater Gargadon', 'Scrapheap Scrounger', 'Sarkhan the Mad', 'Path to the World Tree', 'The Modern Age', 'Battle Screech', 'Bloodbraid Elf', 'Elvish Archdruid', 'Woodland Cemetery', 'Just the Wind', 'Duress', 'Martyr of Sands', 'Goblin Dark-Dwellers', 'Nylea''s Presence', 'Lonis, Cryptozoologist', 'Sea Gate Wreckage', 'Irencrag Feat', 'Cloudcrest Lake', 'Ancient Stirrings', 'Force of Nature', 'Lyzolda, the Blood Witch', 'Silent Arbiter', 'Platinum Angel', 'Drowned Secrets', 'Jeskai Ascendancy', 'Archfiend of Sorrows', 'Barrin, Tolarian Archmage', 'Realm Razer', 'Plague Belcher', 'Ammit Eternal', 'Infernal Grasp', 'Vampire Nighthawk', 'Razortide Bridge', 'Pyroclasm', 'Raise the Alarm', 'Oblivion Ring', 'Buried Alive', 'Faithful Mending', 'Zhalfirin Void', 'Izzet Charm', 'Hollowhead Sliver', 'Spectral Steel', 'Forgotten Cave', 'Imperious Perfect', 'Demigod of Revenge', 'Bala Ged Recovery', 'Plated Geopede', 'Snow-Covered Swamp', 'Sphinx of the Steel Wind', 'Kabira Takedown', 'Death Baron', 'Mire''s Grasp', 'Glen Elendra Archmage', 'Obscura Storefront', 'Memory''s Journey', 'Bastion of Remembrance', 'Honor of the Pure', 'Veilborn Ghoul', 'Fyndhorn Elves', 'Trinket Mage', 'Astral Drift', 'Scale of Chiss-Goria', 'Westvale Abbey', 'Secluded Steppe', 'Advent of the Wurm', 'Angel of Despair', 'Legacy Weapon', 'Regal Caracal', 'Firemane Avenger', 'Moorland Haunt', 'Shriekhorn', 'Primalcrux', 'Carnophage', 'Wrench Mind', 'Rakdos Charm', 'Mulch', 'Champion of Wits', 'Circular Logic', 'Runed Halo', 'Inga Rune-Eyes', 'Dregscape Zombie', 'Smallpox', 'Snow-Covered Plains', 'Swarm Shambler', 'Tallowisp', 'Resurgent Belief', 'Hornet Queen', 'Cultivate', 'Steel Overseer', 'Legion''s Initiative', 'Dovin Baan', 'Demon of Dark Schemes', 'Mephidross Vampire', 'Skull Prophet', 'Rakdos Headliner', 'Curious Pair', 'Luminarch Ascension', 'Vampire Lacerator', 'Sky Hussar', 'Sandsteppe Citadel', 'Mistvault Bridge', 'Origin Spellbomb', 'Prodigy''s Prototype', 'Battlegate Mimic', 'Oust', 'Rootborn Defenses', 'Gloomshrieker'))) 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, 64.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (65.7 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Tidal Warrior', 'Laboratory Maniac', 'Pathrazer of Ulamog', 'Avacyn''s Pilgrim', 'Defiant Strike', 'Conclave Mentor', 'Grand Architect', 'Arrogant Bloodlord', 'Glen Elendra Archmage', 'Infernal Grasp', 'Kher Keep', 'Catch // Release', 'Liliana Vess', 'Festival Crasher', 'Desecration Demon', 'Silundi Vision', 'Stirring Wildwood', 'Haunted Plate Mail', 'Mystic Snake', 'Swiftblade Vindicator', 'Rite of Belzenlok', 'Collateral Damage', 'Jace, Memory Adept', 'Purphoros''s Intervention', 'Arcane Sanctum', 'Cloudcrest Lake', 'Snow-Covered Forest', 'Etherium Sculptor', 'Fury of the Horde', 'Fiend Hunter', 'Vivid Crag', 'Resurgent Belief', 'Dimir Aqueduct', 'An Offer You Can''t Refuse', 'Cloudpost', 'Cosmos Elixir', 'Edge of Autumn', 'Knight of Glory', 'Wandering Mind', 'Doom Blade', 'Izzet Boilerworks', 'Dizzy Spell', 'Kitchen Imp', 'Lunarch Veteran', 'Go for the Throat', 'The Underworld Cookbook', 'Mech Hangar', 'Sword-Point Diplomacy', 'Voldaren Epicure', 'Feed the Swarm', 'Cartel Aristocrat', 'Irencrag Feat', 'Force of Nature', 'Prophetic Prism', 'Forked Bolt', 'Samut, Voice of Dissent', 'Ghostly Pilferer', 'Firewild Borderpost', 'Colossification', 'Fieldmist Borderpost', 'Sarcomite Myr', 'Witching Well', 'Myr Battlesphere', 'Skemfar Avenger', 'Honden of Infinite Rage', 'Unesh, Criosphinx Sovereign', 'Sandwurm Convergence', 'Midnight Reaper', 'Disciple of Bolas', 'Battlefield Forge', 'Michiko''s Reign of Truth', 'Tyrant''s Scorn', 'Dragon Mantle', 'Incinerate', 'Captivating Vampire', 'Soul Snare', 'Wretched Banquet', 'Obstinate Baloth', 'Slip Out the Back', 'Temple of Silence', 'Blistercoil Weird', 'Snow-Covered Swamp', 'Tempered in Solitude', 'Fatestitcher', 'Thirst for Knowledge', 'Bruna, Light of Alabaster', 'Mind''s Desire', 'Bala Ged Recovery', 'Unsubstantiate', 'Lavaclaw Reaches', 'Mishra''s Factory', 'Sacred Cat', 'Claws of Gix', 'Crackleburr', 'Naban, Dean of Iteration', 'Hymn to Tourach', 'Circular Logic', 'Mirrorweave', 'Pia''s Revolution', 'Tymaret Calls the Dead', 'Changeling Outcast', 'Ghost Quarter', 'Arbor Elf', 'Boon of Safety', 'Goblin Assault', 'Sunblade Samurai', 'Skyclave Cleric', 'Smokestack', 'Razortide Bridge', 'Sylvan Primordial', 'Doomed Traveler', 'Silent Arbiter', 'Repeal', 'Thief of Sanity', 'Hythonia the Cruel', 'Mirage Mirror', 'Dreamstealer', 'Boros Reckoner', 'Conduit of Ruin', 'Aether Spellbomb', 'Mesa Enchantress', 'Extractor Demon', 'Dark Withering', 'Vault of the Archangel', 'Disciple of the Vault', 'Nemesis of Mortals', 'Throes of Chaos', 'Grimdancer', 'Vital Splicer', 'Sygg, River Cutthroat', 'Vivid Grove', 'Orim''s Chant', 'Giant Ox', 'Curious Pair', 'Edgewall Innkeeper', 'Crumbling Necropolis', 'Flame Slash', 'Abundant Harvest', 'Secluded Glen', 'Search for Tomorrow', 'Inspiring Overseer', 'Tandem Lookout', 'Diffusion Sliver', 'Azorius Charm', 'Verdant Command', 'Crashing Drawbridge', 'Ezuri, Renegade Leader', 'Tower of Calamities', 'Thunderous Wrath', 'Ethersworn Canonist', 'Spell Pierce', 'Llanowar Wastes', 'Captured Sunlight', 'Pyretic Ritual', 'Skyblade''s Boon', 'Goblin Bombardment', 'Arcbound Worker', 'Teachings of the Kirin', 'Vryn Wingmare', 'Obscura Charm', 'Cathartic Reunion', 'Sensor Splicer', 'Weathered Wayfarer', 'Talisman of Curiosity', 'Lavabelly Sliver', 'Gigantomancer', 'Kumano Faces Kakkazan', 'Justice Strike', 'Angel of Sanctions', 'Buried Alive', 'Leechridden Swamp', 'Trinket Mage', 'Jack-o''-Lantern', 'Luminarch Ascension', 'Evershrike', 'Colossus of Akros', 'Runed Halo', 'Mirrorshell Crab', 'Truefire Captain', 'Tilling Treefolk', 'Tendo Ice Bridge', 'Hornet Queen', 'Brine Comber', 'Brute Suit', 'Mystifying Maze', 'Fauna Shaman', 'Sarkhan the Masterless', 'Midnight Clock', 'Kaya, Ghost Assassin', 'Ojutai''s Command', 'Mesmeric Fiend', 'Assault Strobe', 'Bloodline Keeper', 'Archetype of Endurance', 'Sleight of Hand', 'Nest Invader', 'Mindslicer', 'Fanatical Firebrand', 'Sky Hussar', 'Virulent Sliver', 'Heliod''s Pilgrim', 'Reckless Impulse', 'Temple of Epiphany', 'Temporal Fissure', 'Nissa Revane', 'Dauntless Bodyguard', 'Reliquary Tower', 'Skophos Reaver', 'Akoum Hellhound', 'Lonis, Cryptozoologist', 'Crackling Drake', 'Eater of Virtue', 'Rise and Shine', 'Tithe Taker', 'Mistvein Borderpost', 'Living Twister', 'Heartless Summoning', 'Tapping at the Window', 'Mausoleum Secrets', 'Silvergill Adept', 'Tatsunari, Toad Rider', 'Homicidal Seclusion', 'Stormtide Leviathan', 'Field of Ruin', 'Sire of Insanity', 'Bloodbraid Elf', 'Ammit Eternal', 'Vicious Conquistador', 'Healer''s Hawk', 'Edric, Spymaster of Trest', 'Nivmagus Elemental', 'Treasure Cruise', 'Hell Mongrel', 'Deep Analysis', 'Chandra, Pyromaster', 'Steppe Lynx', 'Snow-Covered Mountain', 'Hagra Mauling', 'Demonic Dread', 'Drowned Secrets', 'Ponder', 'Vessel of Nascency', 'Evolving Wilds', 'Inga Rune-Eyes', 'Porphyry Nodes', 'Phyrexian Dreadnought', 'Rashmi, Eternities Crafter', 'Dark Ritual', 'Good-Fortune Unicorn', 'Okiba Reckoner Raid', 'Kira, Great Glass-Spinner', 'Talisman of Impulse', 'Containment Construct', 'Zulaport Cutthroat', 'Arguel''s Blood Fast', 'Kami of False Hope', 'Anax, Hardened in the Forge', 'Plow Under', 'Myr Superion', 'Alms of the Vein', 'Wrench Mind', 'Champion of Wits', 'Vampire Lacerator', 'Thaumatic Compass', 'Arcbound Ravager', 'Elixir of Immortality', 'Zhalfirin Void', 'Merrow Reejerey', 'Westvale Abbey', 'Graveyard Marshal', 'Witch''s Cottage', 'Leonin Warleader', 'Epochrasite', 'Faerie Vandal', 'Brokers Hideout', 'Mirrodin Besieged', 'Hive Mind', 'Just the Wind', 'Sylvan Advocate', 'Primalcrux', 'Serrated Scorpion', 'Knight of Infamy', 'Blood Fountain', 'Stonehorn Dignitary', 'Duskwielder', 'Master of the Pearl Trident', 'Aetherling', 'Village Messenger', 'Platinum Angel', 'Darksteel Colossus', 'Thirst for Meaning', 'Champion of Dusk', 'Abbot of Keral Keep', 'Krark''s Thumb', 'Stormblood Berserker', 'Soulflayer', 'Lantern of the Lost', 'Demigod of Revenge', 'Brave the Elements', 'Snowfield Sinkhole', 'Celestial Gatekeeper', 'Consume the Meek', 'Ancestral Anger', 'Agonizing Remorse', 'Scale of Chiss-Goria', 'Grapeshot', 'Dread Return', 'Blood Pact', 'Spawning Pool', 'Nimble Mongoose', 'Vivid Meadow', 'Mogg War Marshal', 'Futurist Sentinel', 'Duty-Bound Dead', 'Cloudblazer', 'Forbid', 'Myth Realized', 'Viashino Pyromancer', 'Call of the Conclave', 'Mana Leak', 'Frontier Bivouac', 'Experimental Synthesizer', 'Quest for the Nihil Stone', 'Qasali Pridemage', 'Urza''s Factory', 'Esper Charm', 'Doomskar Titan', 'Hunted Witness', 'Dark Salvation', 'Tooth of Chiss-Goria', 'Lotleth Giant', 'Bygone Bishop', 'Hour of Reckoning', 'Scuttletide', 'Drogskol Captain', 'Orcish Lumberjack', 'Swiftwater Cliffs', 'Akroma, Angel of Fury', 'Silverbluff Bridge', 'Slagstorm', 'Nezahal, Primal Tide', 'Wild Mongrel', 'Arcus Acolyte', 'Imperious Perfect', 'Radha, Heart of Keld', 'Chief Engineer', 'Mage''s Attendant', 'Sharuum the Hegemon', 'Mire''s Grasp', 'Origin Spellbomb', 'Assert Authority', 'Blazing Shoal', 'Sunscorched Desert', 'Undead Butler', 'Auramancer', 'Pyrrhic Revival', 'Fallen Shinobi', 'Wild Nacatl', 'Ball Lightning', 'Mistveil Plains', 'Clarion Spirit', 'Staggering Insight', 'Ghitu Lavarunner', 'Gloomshrieker', 'Tanglepool Bridge', 'Path of Mettle', 'Anguished Unmaking', 'Crack the Earth', 'Rakdos Charm', 'Figure of Destiny', 'Animation Module', 'Feast of Blood', 'Restore Balance', 'Skyclave Relic', 'Old Stickfingers', 'Spirited Companion', 'Needle Spires', 'Memory Lapse', 'Earthquake', 'Profane Procession', 'Warleader''s Helix', 'Logic Knot', 'Blackbloom Rogue', 'Sovereign''s Bite', 'Fabricate', 'Sol Talisman', 'Acolyte of Affliction', 'Radiant Scrollwielder', 'Ornithopter', 'Windbrisk Heights', 'Bloodhall Priest', 'Flame Jab', 'Mission Briefing', 'Alchemist''s Gambit', 'Otherworldly Gaze', 'Grisly Salvage', 'Homing Sliver', 'Rootborn Defenses', 'Hypergenesis', 'Arashin Foremost', 'Kird Ape', 'Dregscape Sliver', 'Reckless Charge', 'Mindslaver', 'Kuro, Pitlord', 'Disallow', 'The Scorpion God', 'Karmic Guide', 'Dread Fugue', 'Watcher for Tomorrow', 'Multiple Choice', 'Leonin Relic-Warder', 'Drossforge Bridge', 'Mirror March', 'Howling Mine', 'Blade Splicer', 'Dream Trawler', 'Sylvan Messenger', 'Sigarda''s Splendor', 'Young Necromancer', 'Mythos of Nethroi', 'Swarm Shambler', 'Korlash, Heir to Blackblade', 'Detention Sphere', 'Halimar Excavator', 'Skull Prophet', 'Temple of Malice', 'Condemn', 'Woodfall Primus', 'Brain Freeze', 'All Suns'' Dawn', 'Arcbound Javelineer', 'Oust', 'Myr Reservoir', 'Lord of the Undead', 'Improbable Alliance', 'Ashen Ghoul', 'Disenchant', 'Shigeki, Jukai Visionary', 'Sleeper Agent', 'Lochmere Serpent', 'Eternal Dragon', 'Arcbound Mouser', 'Broodstar', 'Rakdos Cackler', 'Intangible Virtue', 'Memnarch', 'Coralhelm Commander', 'Nullpriest of Oblivion', 'Farseek', 'Keruga, the Macrosage', 'Path to the World Tree', 'Temple of Mystery', 'Familiar''s Ruse', 'Read the Bones', 'Rishkar, Peema Renegade', 'Vesperlark', 'Shard Volley', 'Temple of Deceit', 'Nylea''s Presence', 'Elvish Visionary', 'Asylum Visitor', 'Mask of the Mimic', 'Commit // Memory', 'Firebolt', 'Gitaxian Probe', 'Venom Sliver', 'Ravenous Chupacabra', 'Master of Death', 'Horror of the Broken Lands', 'Reflex Sliver', 'Oversoul of Dusk', 'Abrade', 'Vampire Nighthawk', 'Treasure Hunt', 'Falkenrath Aristocrat', 'Smallpox', 'Spikefield Hazard', 'Arrogant Wurm', 'Angel of Invention', 'Thirst for Discovery', 'Ultimate Price', 'Graf Reaver', 'Outland Liberator', 'Tempered Sliver', 'Astral Drift', 'Volcano Hellion', 'Fertile Ground', 'Ethersworn Sphinx', 'Akroma''s Memorial', 'Brainstone', 'Barter in Blood', 'Invoke Calamity', 'Sylvan Scrying', 'Dimir Infiltrator', 'Might Sliver', 'Dreg Mangler', 'Nissa''s Chosen', 'See the Truth', 'Shatterskull Charger', 'Shatter the Sky', 'Biting Rain', 'Sundial of the Infinite', 'Darigaaz Reincarnated', 'Bogardan Hellkite', 'Den Protector', 'Memorial to War', 'Delver of Secrets', 'Scythe Leopard', 'Sign in Blood', 'Signal Pest', 'Ghoultree', 'Perilous Research', 'Flame Javelin', 'Hanweir Garrison', 'Sea Gate Wreckage', 'Putrid Imp', 'Azami, Lady of Scrolls', 'Riveteers Overlook', 'Underworld Connections', 'Bloodthrone Vampire', 'Steel Overseer', 'Scryb Ranger', 'Lotleth Troll', 'Ramunap Excavator', 'Mobilized District', 'Nature''s Lore', 'Restoration Angel', 'Raven''s Crime', 'Dawn of Hope', 'The Mending of Dominaria', 'Plague Belcher', 'Shardless Agent', 'Moorland Haunt', 'Cultivate', 'Renewed Faith', 'Scrap Trawler', 'Tempest Djinn', 'Reckless Waif', 'Pyroclasm', 'Geomancer''s Gambit', 'Demonic Rising', 'Raze the Effigy', 'King of the Pride', 'Niv-Mizzet, the Firemind', 'Possibility Storm', 'Vindicate', 'Psychic Possession', 'Lifecrafter''s Bestiary', 'Astral Slide', 'Hive Stirrings', 'Veilborn Ghoul', 'Illuminator Virtuoso', 'Vivien''s Arkbow', 'Fireblade Artist', 'Sliver Queen', 'Oblivion Ring', 'Basking Rootwalla', 'Sprite Dragon', 'Diabolic Edict', 'Glorybringer', 'Gonti, Lord of Luxury', 'Gryff''s Boon', 'Obscura Storefront', 'Fiery Temper', 'Bedlam Reveler', 'Myr Sire', 'Wonder', 'Duress', 'Angel of Glory''s Rise', 'Spectral Steel', 'Brion Stoutarm', 'Ingenious Infiltrator', 'Mizzium Mortars', 'Game Trail', 'Glimmerpost', 'Fungus Sliver', 'Wild Cantor', 'Stern Dismissal', 'Kalastria Highborn', 'Lumbering Falls', 'Frantic Inventory', 'Blessed Defiance', 'Touch the Spirit Realm', 'Shriekhorn', 'Oriss, Samite Guardian', 'Coiling Oracle', 'Rabbit Battery', 'Orzhov Signet', 'Cemetery Reaper', 'Pillage', 'Judith, the Scourge Diva', 'Merchant of the Vale', 'Hatching Plans', 'Falkenrath Gorger', 'Drowned Catacomb', 'Power Sink', 'Sinister Concoction', 'Barbarian Ring', 'Llanowar Elves', 'Terastodon', 'Deftblade Elite', 'Elemental Masterpiece', 'Sphinx of the Steel Wind', 'Soul Spike', 'Honor of the Pure', 'Jwari Disruption', 'Bone Shards', 'March of Reckless Joy', 'Netherborn Phalanx', 'Dread Presence', 'Seismic Assault', 'Vapor Snag', 'Sultai Charm', 'Fact or Fiction', 'Rootbound Crag', 'Giant Killer', 'Sterling Grove', 'Stromkirk Noble', 'Zabaz, the Glimmerwasp', 'Worldgorger Dragon', 'Lead the Stampede', 'Glowspore Shaman', 'Silverblade Paladin', 'Caves of Koilos', 'Painful Truths', 'Jace, the Living Guildpact', 'Form of the Dragon', 'Dragonskull Summit', 'Bloodchief''s Thirst', 'Circle of Confinement', 'Barren Moor', 'Mystical Teachings', 'Hellspark Elemental', 'Hissing Quagmire', 'Engulf the Shore', 'Goblin Dark-Dwellers', 'Summary Dismissal', 'Secluded Steppe', 'Grave Scrabbler', 'Lava Dart', 'Wight', 'Temple of Enlightenment', 'Crypt of Agadeem', 'Flayer of the Hatebound', 'Raise the Alarm', 'Temur Charm', 'Haunted Dead', 'Port of Karfell', 'Shrieking Affliction', 'Inevitable Betrayal', 'Canyon Slough', 'Blue Sun''s Zenith', 'Malakir Rebirth', 'Blasphemous Act', 'Pieces of the Puzzle', 'Scrap Welder', 'Hour of Promise', 'Mouth of Ronom', 'Reality Ripple', 'Regal Caracal', 'Death Cloud', 'Porcelain Legionnaire', 'Unburial Rites', 'Stubborn Denial', 'Tyrant''s Choice', 'Tooth and Nail', 'Ajani, the Greathearted', 'Akroan Crusader', 'Glorious End', 'Frantic Search', 'Empty the Warrens', 'Sphinx of Foresight', 'Seaside Citadel', 'Patchwork Automaton', 'Spark Elemental', 'Tireless Provisioner', 'Discovery // Dispersal', 'Spirit Mantle', 'Sovereigns of Lost Alara', 'Adanto Vanguard', 'Joraga Treespeaker', 'Slagwoods Bridge', 'Call the Bloodline', 'Spell Burst', 'Tomb of Urami', 'Sigil of Valor', 'Tranquil Thicket', 'Electrostatic Field', 'Zetalpa, Primal Dawn', 'Rakdos Headliner', 'Veinfire Borderpost', 'Prodigy''s Prototype', 'Solitary Confinement', 'Pelakka Predation', 'Folio of Fancies', 'Hinterland Harbor', 'Battlegate Mimic', 'Moon-Circuit Hacker', 'Sidisi, Brood Tyrant', 'Lonely Sandbar', 'Nicol Bolas, Planeswalker', 'Ground Rift', 'Thawing Glaciers', 'Shining Shoal', 'Plated Geopede', 'Akrasan Squire', 'Moritte of the Frost', 'Dregscape Zombie', 'Terrarion', 'Abiding Grace', 'Zurgo Bellstriker', 'Rustvale Bridge', 'General Ferrous Rokiric', 'Zombie Infestation', 'Carnophage', 'Flame Rift', 'Elvish Mystic', 'Rishadan Dockhand', 'Tyrant of Discord', 'Deep Forest Hermit', 'Silent Submersible', 'Heartless Act', 'Ancient Stirrings', 'Clifftop Retreat', 'Colossal Skyturtle', 'Sejiri Refuge', 'Death Baron', 'Heartfire Immolator', 'Brushfire Elemental', 'Brimstone Dragon', 'Fire-Lit Thicket', 'Time Stretch', 'Barbed Sextant', 'Gilt-Leaf Archdruid', 'Ashenmoor Liege', 'Tallowisp', 'Cabaretti Courtyard', 'Mizzium Skin', 'Ashenmoor Gouger', 'Jeskai Ascendancy', 'Avatar of Discord', 'Sarkhan the Mad', 'Force of Despair', 'Magister of Worth', 'Coalition Relic', 'It That Betrays', 'Wayward Guide-Beast', 'Collective Effort', 'Tombstalker', 'Reinforced Ronin', 'Goldmire Bridge', 'Ionize', 'Skyclave Pick-Axe', 'Avaricious Dragon', 'Gilded Lotus', 'Jace Beleren', 'Mikaeus, the Lunarch', 'Counterflux', 'Fire Prophecy', 'Mystic Speculation', 'Rune-Scarred Demon', 'Acidic Slime', 'Trostani''s Summoner', 'Rotting Rats', 'Banehound', 'Dark-Dweller Oracle', 'Cathar Commando', 'Behold the Multiverse', 'Blacklance Paragon', 'Gemhide Sliver', 'Erebos''s Intervention', 'Master Splicer', 'Undercity Informer', 'Terramorphic Expanse', 'Skirk Ridge Exhumer', 'Tendrils of Agony', 'Castigate', 'Mephidross Vampire', 'Elves of Deep Shadow', 'Nether Spirit', 'Balustrade Spy', 'Hall of the Bandit Lord', 'Twisted Abomination', 'Conclave Tribunal', 'Thraben Inspector', 'End-Raze Forerunners', 'Dormant Sliver', 'Seasoned Hallowblade', 'Barrin, Tolarian Archmage', 'Slitherhead', 'Mirran Crusader', 'Spectra Ward', 'Joraga Warcaller', 'Ethereal Armor', 'Unlucky Witness', 'Opt', 'Grim Haruspex', 'Legion''s Initiative', 'Skyclave Shade', 'Secluded Courtyard', 'Nomad Outpost', 'Faithful Mending', 'Vedalken Engineer', 'Chain Lightning', 'Mwonvuli Acid-Moss', 'Beast Whisperer', 'Marwyn, the Nurturer', 'Sungold Sentinel', 'Endbringer', 'Hypnotic Specter', 'Grasp of Darkness', 'Benalish Marshal', 'Nevermore', 'Triskelion', 'Voldaren Pariah', 'White Sun''s Zenith', 'Jokulhaups', 'Dovin Baan', 'Kessig Flamebreather', 'Think Twice', 'Tangleroot', 'Cartographer''s Survey', 'Brokers Charm', 'Timely Reinforcements', 'Lashwrithe', 'Grimoire Thief', 'Izzet Charm', 'Springbloom Druid', 'Panharmonicon', 'Magmatic Insight', 'Generous Visitor', 'Shrapnel Blast', 'Parcel Myr', 'Waterfront District', 'Sojourner''s Companion', 'Aven Squire', 'Dead Weight', 'Stone Rain', 'Anafenza, Kin-Tree Spirit', 'Commune with the Gods', 'Treacherous Blessing', 'Promise of Bunrei', 'Tradewind Rider', 'Wildfield Borderpost', 'Garruk Wildspeaker', 'Bloodvial Purveyor', 'Blackmail', 'Cabal Initiate', 'Kodama''s Reach', 'Animate Dead', 'Temple of Malady', 'Obsessive Search', 'Mistvault Bridge', 'Mystic Monastery', 'Dryad Militant', 'Relentless Pursuit', 'Earthshaker Khenra', 'Cerodon Yearling', 'Angel of Despair', 'Decree of Justice', 'Shriekmaw', 'Rakdos Signet', 'Realm Razer', 'Seht''s Tiger', 'Faerie Miscreant', 'Kazuul''s Fury', 'Stitcher''s Graft', 'Selesnya Charm', 'First-Sphere Gargantua', 'Shivan Dragon', 'Viscera Seer', 'Riftwing Cloudskate', 'Thermo-Alchemist', 'Monstrous Carabid', 'Explore', 'Lose Focus', 'Bounty of the Luxa', 'Judge''s Familiar', 'Shipwreck Sifters', 'Desperate Ritual', 'Spellweaver Helix', 'Maestros Charm', 'Aphemia, the Cacophony', 'The Bloodsky Massacre', 'Revitalize', 'Snow-Covered Plains', 'Weaver of Harmony', 'Fireblade Charger', 'Cosima, God of the Voyage', 'Obliterate', 'Sylvan Library', 'Ranger of Eos', 'Sphinx''s Tutelage', 'Yahenni''s Expertise', 'Kiln Fiend', 'Emmara, Soul of the Accord', 'Cursecatcher', 'Momentary Blink', 'Wrath of God', 'Curiosity', 'Animal Magnetism', 'Gideon Jura', 'Martyr of Sands', 'Foreboding Ruins', 'Reveillark', 'Fyndhorn Elves', 'Escape Velocity', 'Acquisitions Expert', 'Wooded Bastion', 'Staff of Domination', 'Oni-Cult Anvil', 'Fatal Grudge', 'Gavony Township', 'Intruder Alarm', 'Galerider Sliver', 'Rosethorn Acolyte', 'Maul of the Skyclaves', 'Battle Screech', 'Mire Triton', 'Dragonkin Berserker', 'Transmogrify', 'Myojin of Infinite Rage', 'Vivid Marsh', 'Profane Prayers', 'Harrow', 'Tangled Florahedron', 'Arcanum Wings', 'Palace Siege', 'Harbinger of the Tides', 'Kjeldoran Outpost', 'Flash of Insight', 'Kunoros, Hound of Athreos', 'Dragonstorm', 'Wake Thrasher', 'Memory''s Journey', 'Growth-Chamber Guardian', 'Advent of the Wurm', 'Knight of the White Orchid', 'Birds of Paradise', 'Firebrand Archer', 'Retributive Wand', 'Mythos of Brokkos', 'Raging Ravine', 'Nevermaker', 'Torrent Sculptor', 'Lone Rider', 'Chancellor of the Dross', 'Blazing Rootwalla', 'Everflowing Chalice', 'Declaration in Stone', 'Darkheart Sliver', 'Elvish Harbinger', 'Lurching Rotbeast', 'Forgotten Cave', 'Fire Covenant', 'Vivid Creek', 'Tymaret, Chosen from Death', 'Kari Zev''s Expertise', 'Wall of Omens', 'Sticky Fingers', 'Cabal Therapist', 'Champion of the Flame', 'Cleric of Life''s Bond', 'Archfiend''s Vessel', 'Lodestone Golem', 'Gatekeeper of Malakir', 'Frenetic Sliver', 'Scab-Clan Berserker', 'Reap the Past', 'Scorched Rusalka', 'Diregraf Ghoul', 'Approach of the Second Sun', 'Bastion of Remembrance', 'Hero of Precinct One', 'Adorned Pouncer', 'Roar of the Wurm', 'Tide Shaper', 'Hateful Eidolon', 'Claim the Firstborn', 'Enigma Sphinx', 'Dead // Gone', 'Dusk Legion Zealot', 'Champion of the Parish', 'Ensoul Artifact', 'Primal Surge', 'Ash Zealot', 'Culling Scales', 'Demonic Embrace', 'Cloudshift', 'Llanowar Mentor', 'Primal Command', 'Woodland Cemetery', 'Psychatog', 'Born to Drive', 'Remorseful Cleric', 'Legacy Weapon', 'Soulherder', 'Mobilizer Mech', 'Hollowhead Sliver', 'Sangrophage', 'Scoured Barrens', 'Phantasmagorian', 'Bile Blight', 'Greater Gargadon', 'Piranha Marsh', 'Glacial Fortress', 'Archfiend of Sorrows', 'Metalwork Colossus', 'Vampire''s Kiss', 'Song of Creation', 'Memorial to Glory', 'Day of Judgment', 'Taborax, Hope''s Demise', 'Demon of Dark Schemes', 'Mana Flare', 'Llanowar Tribe', 'Falkenrath Pit Fighter', 'Benevolent Bodyguard', 'Bump in the Night', 'Obsessive Stitcher', 'Thought Scour', 'Lyzolda, the Blood Witch', 'Satyr Wayfinder', 'Swans of Bryn Argoll', 'Bonescythe Sliver', 'Sanctum of Stone Fangs', 'Genesis', 'Kazandu Mammoth', 'The Modern Age', 'Negate', 'Regrowth', 'Firemane Avenger', 'Elvish Archdruid', 'Chromatic Lantern', 'Heir of Falkenrath', 'Voidslime', 'Seething Song', 'Tectonic Giant', 'Mulch', 'Bazaar Trademage', 'Sandsteppe Citadel', 'Terminus', 'Buried Ruin', 'Bituminous Blast', 'The Birth of Meletis', 'Crash Through', 'Avatar of Woe', 'Faithless Salvaging', 'Chance Encounter', 'Orgg', 'Thornglint Bridge', 'Scrapheap Scrounger', 'Tidespout Tyrant', 'Dismal Backwater', 'Masterful Replication', 'Timeless Witness', 'Arch of Orazca', 'Strike It Rich', 'Kefnet the Mindful', 'Hotshot Mechanic', 'Kabira Takedown', 'Oona, Queen of the Fae', 'Nested Shambler', 'Cleansing Wildfire', 'Distended Mindbender', 'Burst Lightning', 'Gaea''s Will'))) 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, 65.7, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (99.9 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Agonizing Remorse', 'Grave Scrabbler', 'Sundial of the Infinite', 'Terrarion', 'Sleeper Agent', 'Invoke Calamity', 'Heartless Act', 'Kazandu Mammoth', 'Kari Zev''s Expertise', 'Qasali Pridemage', 'Lone Rider', 'Rakdos Cackler', 'Nissa''s Chosen', 'Memorial to Glory', 'Commune with the Gods', 'Elvish Visionary', 'Pathrazer of Ulamog', 'Lavabelly Sliver', 'Sky Hussar', 'General Ferrous Rokiric', 'Sojourner''s Companion', 'Orim''s Chant', 'Scorched Rusalka', 'Slagwoods Bridge', 'Windbrisk Heights', 'Leechridden Swamp', 'Hatching Plans', 'Acolyte of Affliction', 'Swans of Bryn Argoll', 'Dimir Aqueduct', 'Perilous Research', 'Intangible Virtue', 'Swiftwater Cliffs', 'Putrid Imp', 'Temple of Enlightenment', 'Tidal Warrior', 'Kumano Faces Kakkazan', 'Desperate Ritual', 'Arguel''s Blood Fast', 'Champion of Wits', 'Zetalpa, Primal Dawn', 'Tithe Taker', 'Cathar Commando', 'Avatar of Woe', 'Torrent Sculptor', 'Reckless Charge', 'Sangrophage', 'Panharmonicon', 'Zombie Infestation', 'Jace, the Living Guildpact', 'Izzet Charm', 'Benalish Marshal', 'Ojutai''s Command', 'Bump in the Night', 'Oust', 'Soul Spike', 'Sensor Splicer', 'Hinterland Harbor', 'Diffusion Sliver', 'Imperious Perfect', 'Platinum Angel', 'Edgewall Innkeeper', 'Tempered Sliver', 'Rabbit Battery', 'Master Splicer', 'Ashenmoor Liege', 'Zurgo Bellstriker', 'Abundant Harvest', 'Advent of the Wurm', 'Counterflux', 'Rootborn Defenses', 'Edric, Spymaster of Trest', 'Akrasan Squire', 'Forbid', 'Pyretic Ritual', 'Merchant of the Vale', 'Magmatic Insight', 'Kodama''s Reach', 'Extractor Demon', 'Selesnya Charm', 'Lava Dart', 'Ash Zealot', 'Sarkhan the Mad', 'Lonely Sandbar', 'Lumbering Falls', 'Watcher for Tomorrow', 'Fire Covenant', 'Shatterskull Charger', 'Joraga Treespeaker', 'Obscura Storefront', 'Underworld Connections', 'Circle of Confinement', 'Sigil of Valor', 'Fabricate', 'Crypt of Agadeem', 'Kjeldoran Outpost', 'Skull Prophet', 'Burst Lightning', 'Transmogrify', 'Fungus Sliver', 'Sygg, River Cutthroat', 'Old Stickfingers', 'Pyroclasm', 'Snow-Covered Mountain', 'Dismal Backwater', 'Galerider Sliver', 'Nested Shambler', 'Blacklance Paragon', 'Plague Belcher', 'Spawning Pool', 'Thought Scour', 'Lurching Rotbeast', 'Vivid Creek', 'Venom Sliver', 'Blood Fountain', 'Repeal', 'Fatal Grudge', 'Unsubstantiate', 'Spikefield Hazard', 'Rustvale Bridge', 'Shriekmaw', 'Spirited Companion', 'Firewild Borderpost', 'Cloudcrest Lake', 'Chancellor of the Dross', 'Arbor Elf', 'Sunscorched Desert', 'Explore', 'Death Baron', 'Skyclave Pick-Axe', 'Elixir of Immortality', 'Drowned Catacomb', 'Skophos Reaver', 'Temple of Epiphany', 'Temple of Silence', 'Llanowar Wastes', 'Lashwrithe', 'Arch of Orazca', 'Sandwurm Convergence', 'Knight of Infamy', 'Harrow', 'Crumbling Necropolis', 'Restore Balance', 'Sphinx of the Steel Wind', 'Sylvan Messenger', 'Detention Sphere', 'Sylvan Primordial', 'Skirk Ridge Exhumer', 'Rotting Rats', 'Dauntless Bodyguard', 'Spell Pierce', 'Dark Withering', 'Flame Javelin', 'Thirst for Meaning', 'Heartless Summoning', 'Assert Authority', 'Deep Analysis', 'Assault Strobe', 'Cabal Initiate', 'Mausoleum Secrets', 'Doomed Traveler', 'Ethersworn Sphinx', 'Faerie Vandal', 'Liliana Vess', 'Krark''s Thumb', 'Farseek', 'Orcish Lumberjack', 'Doomskar Titan', 'Biting Rain', 'Gatekeeper of Malakir', 'Sphinx of Foresight', 'Realm Razer', 'Brave the Elements', 'Izzet Boilerworks', 'Korlash, Heir to Blackblade', 'Dread Fugue', 'Psychatog', 'Dark-Dweller Oracle', 'Crackleburr', 'Monstrous Carabid', 'Stone Rain', 'Rakdos Charm', 'Think Twice', 'Electrostatic Field', 'Basking Rootwalla', 'Radiant Scrollwielder', 'Carnophage', 'Frontier Bivouac', 'Voldaren Epicure', 'Kunoros, Hound of Athreos', 'Memory Lapse', 'Dark Salvation', 'Fireblade Charger', 'Sire of Insanity', 'Garruk Wildspeaker', 'Scab-Clan Berserker', 'Tempered in Solitude', 'Hypergenesis', 'Wooded Bastion', 'Giant Killer', 'Angel of Sanctions', 'Fertile Ground', 'Hissing Quagmire', 'Changeling Outcast', 'Homing Sliver', 'Thraben Inspector', 'Curiosity', 'White Sun''s Zenith', 'Cosima, God of the Voyage', 'Flash of Insight', 'Tendrils of Agony', 'Scale of Chiss-Goria', 'Goldmire Bridge', 'Possibility Storm', 'Kiln Fiend', 'Hive Mind', 'Hunted Witness', 'Distended Mindbender', 'Fact or Fiction', 'Thawing Glaciers', 'Mirror March', 'Outland Liberator', 'Dregscape Sliver', 'Curious Pair', 'Go for the Throat', 'Seething Song', 'Stern Dismissal', 'Primal Command', 'Abiding Grace', 'Dryad Militant', 'Pia''s Revolution', 'Wight', 'Frenetic Sliver', 'Primalcrux', 'Porphyry Nodes', 'Heliod''s Pilgrim', 'Flame Rift', 'Hagra Mauling', 'Aven Squire', 'Mire Triton', 'Dark Ritual', 'Temple of Malady', 'Abbot of Keral Keep', 'Cabaretti Courtyard', 'Intruder Alarm', 'Benevolent Bodyguard', 'Festival Crasher', 'Judge''s Familiar', 'Nevermore', 'Reinforced Ronin', 'Anafenza, Kin-Tree Spirit', 'Raging Ravine', 'Howling Mine', 'Masterful Replication', 'Grimdancer', 'Glacial Fortress', 'Mirran Crusader', 'Scrap Trawler', 'Zulaport Cutthroat', 'Waterfront District', 'Arcus Acolyte', 'Netherborn Phalanx', 'Dreg Mangler', 'Duress', 'Vapor Snag', 'Silundi Vision', 'Feed the Swarm', 'Disciple of the Vault', 'Lyzolda, the Blood Witch', 'Barrin, Tolarian Archmage', 'Tooth of Chiss-Goria', 'Gideon Jura', 'Palace Siege', 'Bloodhall Priest', 'Graveyard Marshal', 'Oni-Cult Anvil', 'Desecration Demon', 'Chief Engineer', 'Soul Snare', 'Obstinate Baloth', 'Conclave Mentor', 'Geomancer''s Gambit', 'Vivid Meadow', 'Veinfire Borderpost', 'Raven''s Crime', 'Fire Prophecy', 'Darkheart Sliver', 'Origin Spellbomb', 'Sandsteppe Citadel', 'Avacyn''s Pilgrim', 'Brushfire Elemental', 'Kher Keep', 'Declaration in Stone', 'Jokulhaups', 'Brokers Hideout', 'Arcane Sanctum', 'Falkenrath Pit Fighter', 'Broodstar', 'Justice Strike', 'Snowfield Sinkhole', 'Vindicate', 'Hour of Reckoning', 'Sylvan Library', 'Dragonskull Summit', 'The Birth of Meletis', 'Lochmere Serpent', 'Solitary Confinement', 'Elemental Masterpiece', 'Seaside Citadel', 'Claws of Gix', 'Treacherous Blessing', 'Bituminous Blast', 'Stirring Wildwood', 'Llanowar Tribe', 'Reap the Past', 'Raze the Effigy', 'Kami of False Hope', 'Chromatic Lantern', 'Lonis, Cryptozoologist', 'Demigod of Revenge', 'Sign in Blood', 'Swiftblade Vindicator', 'Drossforge Bridge', 'Arrogant Wurm', 'Revitalize', 'Nemesis of Mortals', 'Lifecrafter''s Bestiary', 'Nature''s Lore', 'Pyrrhic Revival', 'Dormant Sliver', 'Kird Ape', 'Steppe Lynx', 'Grisly Salvage', 'Oblivion Ring', 'Figure of Destiny', 'Gitaxian Probe', 'Elves of Deep Shadow', 'Elvish Harbinger', 'Logic Knot', 'Vital Splicer', 'Erebos''s Intervention', 'Rashmi, Eternities Crafter', 'Grand Architect', 'Approach of the Second Sun', 'Birds of Paradise', 'Call the Bloodline', 'Retributive Wand', 'Temple of Mystery', 'Myr Superion', 'Glorybringer', 'Cosmos Elixir', 'Lodestone Golem', 'The Bloodsky Massacre', 'Living Twister', 'Temple of Deceit', 'Sliver Queen', 'Auramancer', 'Dread Presence', 'Thirst for Discovery', 'Day of Judgment', 'Sarkhan the Masterless', 'Mizzium Skin', 'Angel of Despair', 'Anguished Unmaking', 'Nissa Revane', 'Hive Stirrings', 'Riveteers Overlook', 'Acidic Slime', 'Ravenous Chupacabra', 'Reckless Impulse', 'Darksteel Colossus', 'March of Reckless Joy', 'Gonti, Lord of Luxury', 'Cloudshift', 'Mirrodin Besieged', 'Luminarch Ascension', 'Lotleth Troll', 'Azorius Charm', 'Ethersworn Canonist', 'Scrap Welder', 'Plated Geopede', 'Silverblade Paladin', 'Marwyn, the Nurturer', 'Fiery Temper', 'Hollowhead Sliver', 'Captured Sunlight', 'Scuttletide', 'Rosethorn Acolyte', 'Martyr of Sands', 'Metalwork Colossus', 'Westvale Abbey', 'Canyon Slough', 'Promise of Bunrei', 'Thirst for Knowledge', 'Okiba Reckoner Raid', 'Virulent Sliver', 'The Scorpion God', 'Stromkirk Noble', 'Duty-Bound Dead', 'Hero of Precinct One', 'Skemfar Avenger', 'Raise the Alarm', 'Mythos of Brokkos', 'Purphoros''s Intervention', 'Battle Screech', 'Stormtide Leviathan', 'Champion of the Parish', 'Nezahal, Primal Tide', 'Mirrorshell Crab', 'Bloodbraid Elf', 'Kazuul''s Fury', 'Avaricious Dragon', 'Bedlam Reveler', 'Eternal Dragon', 'Kitchen Imp', 'Kira, Great Glass-Spinner', 'Conduit of Ruin', 'Anax, Hardened in the Forge', 'Ponder', 'Tyrant of Discord', 'Cultivate', 'Tyrant''s Scorn', 'Flame Jab', 'Ashenmoor Gouger', 'Wildfield Borderpost', 'Ultimate Price', 'Tectonic Giant', 'Wild Nacatl', 'Fieldmist Borderpost', 'Vampire''s Kiss', 'Avatar of Discord', 'Nicol Bolas, Planeswalker', 'Orzhov Signet', 'Kaya, Ghost Assassin', 'Jace Beleren', 'Dragonkin Berserker', 'Search for Tomorrow', 'Blazing Shoal', 'Faithful Mending', 'Goblin Bombardment', 'Mana Leak', 'Slitherhead', 'Woodfall Primus', 'Crack the Earth', 'Esper Charm', 'Gaea''s Will', 'Mission Briefing', 'Touch the Spirit Realm', 'All Suns'' Dawn', 'Resurgent Belief', 'Aether Spellbomb', 'Blade Splicer', 'Temporal Fissure', 'Glowspore Shaman', 'Tymaret, Chosen from Death', 'Clifftop Retreat', 'Weapons Trainer', 'Tendo Ice Bridge', 'Wonder', 'Experimental Synthesizer', 'Shrapnel Blast', 'Maul of the Skyclaves', 'Hymn to Tourach', 'Gemhide Sliver', 'Beast Whisperer', 'Rootbound Crag', 'Sultai Charm', 'Witch''s Cottage', 'Ghoultree', 'Dead // Gone', 'Ancestral Anger', 'Llanowar Mentor', 'Elvish Archdruid', 'Frantic Search', 'Honor of the Pure', 'Cemetery Reaper', 'Reckless Waif', 'Decree of Justice', 'Renewed Faith', 'Greater Gargadon', 'Eater of Virtue', 'Mizzium Mortars', 'Bonescythe Sliver', 'Otherworldly Gaze', 'Runed Halo', 'Bastion of Remembrance', 'Emmara, Soul of the Accord', 'Hell Mongrel', 'Evolving Wilds', 'Fauna Shaman', 'Skyclave Cleric', 'Tyrant''s Choice', 'Wandering Mind', 'Shriekhorn', 'Fire-Lit Thicket', 'Mind''s Desire', 'Kessig Flamebreather', 'Stubborn Denial', 'Keruga, the Macrosage', 'Sylvan Scrying', 'Treasure Hunt', 'Satyr Wayfinder', 'Dread Return', 'Abrade', 'First-Sphere Gargantua', 'Akoum Hellhound', 'Midnight Reaper', 'Stitcher''s Graft', 'Mistvein Borderpost', 'Bone Shards', 'Rishadan Dockhand', 'Mistveil Plains', 'Temple of Malice', 'Sungold Sentinel', 'Sharuum the Hegemon', 'Caves of Koilos', 'Mystic Monastery', 'Llanowar Elves', 'Archetype of Endurance', 'Slip Out the Back', 'Elvish Mystic', 'Snow-Covered Swamp', 'Buried Alive', 'Skyclave Shade', 'Vault of the Archangel', 'Demonic Dread', 'Field of Ruin', 'Sylvan Advocate', 'Chandra, Pyromaster', 'Vampire Nighthawk', 'Path to the World Tree', 'Smallpox', 'Tomb of Urami', 'Worldgorger Dragon', 'Ground Rift', 'Treasure Cruise', 'Battlefield Forge', 'Secluded Steppe', 'Obsessive Search', 'See the Truth', 'Sovereign''s Bite', 'Joraga Warcaller', 'Lavaclaw Reaches', 'Graf Reaver', 'Heir of Falkenrath', 'Delver of Secrets', 'Bloodchief''s Thirst', 'Ranger of Eos', 'Maestros Charm', 'Circular Logic', 'Grimoire Thief', 'Glen Elendra Archmage', 'Castigate', 'Vivid Crag', 'Unlucky Witness', 'Diregraf Ghoul', 'Unesh, Criosphinx Sovereign', 'Duskwielder', 'Firebrand Archer', 'Thaumatic Compass', 'Discovery // Dispersal', 'Unburial Rites', 'Diabolic Edict', 'Cleansing Wildfire', 'Master of Death', 'Goblin Dark-Dwellers', 'Call of the Conclave', 'Alchemist''s Gambit', 'Magister of Worth', 'Tanglepool Bridge', 'Negate', 'Mistvault Bridge', 'Growth-Chamber Guardian', 'Healer''s Hawk', 'Undead Butler', 'Deep Forest Hermit', 'Mogg War Marshal', 'Flame Slash', 'Viashino Pyromancer', 'Heartfire Immolator', 'Tradewind Rider', 'Shardless Agent', 'Grasp of Darkness', 'Blazing Rootwalla', 'Nylea''s Presence', 'Throes of Chaos', 'Enigma Sphinx', 'Kabira Takedown', 'Oversoul of Dusk', 'Village Messenger', 'Ornithopter', 'Frantic Inventory', 'Slagstorm', 'Fyndhorn Elves', 'Brain Freeze', 'Vivid Grove', 'Snow-Covered Forest', 'Wrath of God', 'Disenchant', 'Incinerate', 'Tidespout Tyrant', 'Animate Dead', 'It That Betrays', 'Opt', 'Rakdos Headliner', 'Verdant Command', 'Obliterate', 'Boros Reckoner', 'Hypnotic Specter', 'Barbarian Ring', 'Kefnet the Mindful', 'Lose Focus', 'Tooth and Nail', 'Everflowing Chalice', 'Den Protector', 'Razortide Bridge', 'Sinister Concoction', 'Painful Truths', 'Sword-Point Diplomacy', 'Coalition Relic', 'Ghitu Lavarunner', 'Vivid Marsh', 'Gavony Township', 'Stormblood Berserker', 'Dawn of Hope', 'Sleight of Hand', 'Nimble Mongoose', 'Oona, Queen of the Fae', 'Moorland Haunt', 'Ghostly Pilferer', 'Crashing Drawbridge', 'Earthshaker Khenra', 'Lord of the Undead', 'Twisted Abomination', 'Akroma''s Memorial', 'Collective Effort', 'Barren Moor', 'Snow-Covered Plains', 'Blackmail', 'Tempest Djinn', 'Tangleroot', 'Falkenrath Aristocrat', 'Might Sliver', 'Dream Trawler', 'Woodland Cemetery', 'Terminus', 'Chain Lightning', 'Thermo-Alchemist', 'Falkenrath Gorger', 'Scythe Leopard', 'Chance Encounter', 'Condemn', 'Sprite Dragon', 'Serrated Scorpion', 'Coiling Oracle', 'Phantasmagorian', 'Swarm Shambler', 'Silverbluff Bridge', 'Plow Under', 'Blistercoil Weird', 'Jace, Memory Adept', 'Mask of the Mimic', 'Wall of Omens', 'Bile Blight', 'Tireless Provisioner', 'Ionize', 'Reflex Sliver', 'Thornglint Bridge', 'Mishra''s Factory', 'Seismic Assault', 'Needle Spires', 'Jwari Disruption', 'Hythonia the Cruel', 'Fury of the Horde', 'Timeless Witness', 'Shrieking Affliction', 'Myth Realized', 'Colossal Skyturtle', 'Restoration Angel', 'Crash Through', 'Fireblade Artist', 'Ajani, the Greathearted', 'Grapeshot', 'Mesa Enchantress', 'Mobilized District', 'Springbloom Druid', 'Mesmeric Fiend', 'Judith, the Scourge Diva', 'Glorious End', 'Voldaren Pariah', 'Wayward Guide-Beast', 'Familiar''s Ruse', 'Sunblade Samurai', 'Ghost Quarter', 'Primal Surge', 'Reality Ripple', 'Gilded Lotus', 'Terramorphic Expanse', 'Seasoned Hallowblade', 'Dovin Baan', 'Vessel of Nascency', 'Catch // Release', 'Firebolt', 'Game Trail', 'Foreboding Ruins', 'Wake Thrasher', 'Scrapheap Scrounger', 'The Underworld Cookbook', 'Nivmagus Elemental', 'Secluded Courtyard', 'Mythos of Nethroi', 'Rishkar, Peema Renegade', 'Piranha Marsh', 'Phyrexian Dreadnought', 'Rune-Scarred Demon', 'Flayer of the Hatebound', 'Claim the Firstborn', 'Forgotten Cave', 'Asylum Visitor', 'Knight of the White Orchid', 'Hornet Queen', 'Good-Fortune Unicorn', 'Horror of the Broken Lands', 'Reliquary Tower', 'Cathartic Reunion', 'Knight of Glory'))) 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, 99.9, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (133.4 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Sunscorched Desert', 'Quest for Ula''s Temple', 'Okina, Temple to the Grandfathers', 'Temple of Silence', 'Nevermaker', 'Sylvan Library', 'Terramorphic Expanse', 'Seismic Assault', 'Sovereign''s Bite', 'Nevermore', 'Sleeper Agent', 'Rishadan Dockhand', 'Timeless Witness', 'Cleansing Wildfire', 'Shigeki, Jukai Visionary', 'Joraga Warcaller', 'Merrow Reejerey', 'Ezuri, Renegade Leader', 'Stonybrook Banneret', 'Vadrik, Astral Archmage', 'Wall of Omens', 'Barren Moor', 'Anticipate', 'Reality Ripple', 'Fatestitcher', 'Dread Return', 'Sylvan Scrying', 'Dread Fugue', 'Dovin Baan', 'Fabricate', 'Talisman of Resilience', 'Tezzeret''s Gambit', 'Ornithopter', 'Watcher for Tomorrow', 'Grozoth', 'Repeal', 'Myth Realized', 'Skull Prophet', 'Sejiri Refuge', 'Glimmerpost', 'Apex of Power', 'Opt', 'Animation Module', 'Blade Splicer', 'Tangle', 'Old Stickfingers', 'Azorius Charm', 'Sprite Dragon', 'Smokestack', 'Banehound', 'Seafloor Oracle', 'Momentary Blink', 'Balustrade Spy', 'Changeling Outcast', 'Hall of Oracles', 'An Offer You Can''t Refuse', 'Steel Hellkite', 'Joraga Treespeaker', 'Shatter the Sky', 'Tranquil Thicket', 'Decree of Justice', 'Primal Command', 'Kira, Great Glass-Spinner', 'Luminarch Ascension', 'Inquisitive Puppet', 'Rustvale Bridge', 'Lose Focus', 'Faerie Vandal', 'Soulflayer', 'Phyrexian Dreadnought', 'Birds of Paradise', 'Temple of Plenty', 'Gitaxian Probe', 'Temple of Enlightenment', 'Hagra Mauling', 'Jeskai Ascendancy', 'Ancient Stirrings', 'Benevolent Bodyguard', 'Bastion of Remembrance', 'Razortide Bridge', 'Power Depot', 'Sage of Epityr', 'Doom Foretold', 'Big Score', 'Skyclave Shade', 'Okiba Reckoner Raid', 'Wirewood Herald', 'Arcbound Javelineer', 'Dream Trawler', 'Elvish Mystic', 'Sword-Point Diplomacy', 'Glorybringer', 'Overwhelmed Apprentice', 'Ghost Quarter', 'Sundial of the Infinite', 'Seasoned Hallowblade', 'Spell Pierce', 'Iron Apprentice', 'Duress', 'Mistveil Plains', 'Dwynen''s Elite', 'Vampire''s Kiss', 'Chain Lightning', 'Soul Spike', 'Kaya, Ghost Assassin', 'Pyromancer Ascension', 'Temple of Epiphany', 'Crackling Drake', 'Clifftop Retreat', 'Faerie Miscreant', 'Lotleth Troll', 'Temple of Malady', 'Silence', 'Treacherous Blessing', 'Soulherder', 'Arcbound Mouser', 'Ghalta, Primal Hunger', 'Reap and Sow', 'Frontier Bivouac', 'Dauntless Bodyguard', 'Malakir Rebirth', 'Vindicate', 'Delay', 'Ingenious Infiltrator', 'Dawn of Hope', 'Infernal Grasp', 'Oran-Rief, the Vastwood', 'Mystic Retrieval', 'Orim''s Chant', 'Wrath of God', 'Stubborn Denial', 'Dark Ritual', 'Cloudcrest Lake', 'Llanowar Wastes', 'Kiln Fiend', 'Temple Bell', 'Drowned Catacomb', 'Howling Mine', 'Brave the Elements', 'Bedeck // Bedazzle', 'Ghoultree', 'Elvish Visionary', 'Hieroglyphic Illumination', 'Samut, Voice of Dissent', 'Slip Out the Back', 'Piranha Marsh', 'Fact or Fiction', 'Pirate''s Prize', 'Jack-o''-Lantern', 'Fallen Shinobi', 'Arcbound Ravager', 'Lavaclaw Reaches', 'Terastodon', 'Blistercoil Weird', 'Invigorate', 'Kazandu Mammoth', 'Cursecatcher', 'Skyclave Cleric', 'Sanctum of Stone Fangs', 'Solitary Confinement', 'Goldmire Bridge', 'Elvish Archdruid', 'Mishra''s Factory', 'Day of Judgment', 'Inkwell Leviathan', 'Bone Saw', 'Wild Cantor', 'Runed Halo', 'Trickbind', 'Rites of Flourishing', 'Teferi, Mage of Zhalfir', 'Lightning Angel', 'Delver of Secrets', 'Grapeshot', 'Battlefield Forge', 'Folio of Fancies', 'Mission Briefing', 'Heartless Act', 'Memory Lapse', 'Honor of the Pure', 'Commune with the Gods', 'Llanowar Elves', 'Undercity Informer', 'Ethersworn Canonist', 'Ancestral Anger', 'Timely Reinforcements', 'Erebos''s Intervention', 'Lava Dart', 'Patchwork Automaton', 'Sterling Grove', 'Elixir of Immortality', 'Undead Butler', 'Blackbloom Rogue', 'Improbable Alliance', 'Forbid', 'Akroma, Angel of Fury', 'Jokulhaups', 'Woodland Cemetery', 'Fire-Lit Thicket', 'Marwyn, the Nurturer', 'Secluded Glen', 'Song of Creation', 'Ethereal Haze', 'Vapor Snag', 'Izzet Boilerworks', 'Eerie Interlude', 'Spikefield Hazard', 'Angel of Invention', 'Lodestone Golem', 'Smallpox', 'Ghitu Lavarunner', 'Bloodvial Purveyor', 'Zetalpa, Primal Dawn', 'Tithe Taker', 'Endbringer', 'Azami, Lady of Scrolls', 'Pirate''s Pillage', 'Dispel', 'Imperious Perfect', 'Burst Lightning', 'Moon-Circuit Hacker', 'Champion of the Parish', 'Tangled Florahedron', 'Vedalken Shackles', 'Glacial Fortress', 'Surgespanner', 'Evolving Wilds', 'Thirst for Discovery', 'Blessed Respite', 'Treasure Cruise', 'Faithful Mending', 'Forgotten Cave', 'Wind Zendikon', 'Obscura Storefront', 'Rise and Shine', 'Prismatic Lens', 'Cloudpost', 'Crash Through', 'Ensoul Artifact', 'Lizard Blades', 'Midnight Clock', 'Strike It Rich', 'Sylvan Anthem', 'Bala Ged Recovery', 'Mire Triton', 'Sandsteppe Citadel', 'Tyrant''s Choice', 'Relentless Pursuit', 'Fiend Hunter', 'Azorius Signet', 'Riftwing Cloudskate', 'Clockspinning', 'Thought Scour', 'Prophetic Prism', 'Zabaz, the Glimmerwasp', 'Wooded Bastion', 'Porphyry Nodes', 'Exclude', 'Condemn', 'Drowner of Secrets', 'Harbinger of the Tides', 'Memory''s Journey', 'Pelakka Predation', 'Avatar of Woe', 'Gideon Jura', 'Mycosynth Wellspring', 'Giant Killer', 'Hit // Run', 'Assault Strobe', 'Silverbluff Bridge', 'Everflowing Chalice', 'Restoration Angel', 'Myr Battlesphere', 'Signal Pest', 'Disruption Protocol', 'Lullmage Mentor', 'Arbor Elf', 'Dragonskull Summit', 'Secluded Steppe', 'Sleight of Hand', 'Psychic Possession', 'Chandra''s Ignition', 'Warleader''s Helix', 'Mikokoro, Center of the Sea', 'Dreadhorde Invasion', 'Goreclaw, Terror of Qal Sisma', 'Barbarian Ring', 'Chancellor of the Dross', 'Caves of Koilos', 'Curiosity', 'Stern Dismissal', 'Grimoire Thief', 'Oust', 'Sylvan Messenger', 'Laboratory Maniac', 'Frantic Search', 'Bedlam Reveler', 'Fury of the Horde', 'Satyr Wayfinder', 'Mystic Monastery', 'Resurgent Belief', 'Master of Death', 'Silverblade Paladin', 'Benalish Marshal', 'Esper Charm', 'Hypnotic Specter', 'Sphinx of Foresight', 'Dragonsguard Elite', 'Grisly Salvage', 'Detention Sphere', 'Zuran Orb', 'Mantis Rider', 'Intruder Alarm', 'Touch the Spirit Realm', 'Steel Overseer', 'Urza''s Factory', 'Ravenous Chupacabra', 'Shriekmaw', 'Scourge of Fleets', 'Lotleth Giant', 'Arcbound Worker', 'Swiftwater Cliffs', 'Nether Spirit', 'Phantasmagorian', 'Cloudblazer', 'Thief of Sanity', 'Angel of Glory''s Rise', 'Tempest Djinn', 'Bump in the Night', 'Hall of the Bandit Lord', 'Kabira Takedown', 'Ponder', 'Mwonvuli Acid-Moss', 'Stonybrook Schoolmaster', 'Thornglint Bridge', 'Control Magic', 'Tapping at the Window', 'Throne of Geth', 'Cathar Commando', 'Bloodchief''s Thirst', 'Blazing Shoal', 'Dryad Militant', 'Lonely Sandbar', 'Platinum Angel', 'Mana Leak'))) 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, 133.4, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (104.6 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Decree of Justice', 'Hanweir Garrison', 'Soul Spike', 'Apex of Power', 'Kiln Fiend', 'Ghoultree', 'Prophetic Prism', 'Arcane Sanctum', 'Disallow', 'Cloudpost', 'Ravenous Chupacabra', 'Abundant Harvest', 'Glacial Fortress', 'Forgotten Cave', 'Infernal Grasp', 'Luminarch Ascension', 'Azorius Charm', 'Indulgent Aristocrat', 'Battlefield Forge', 'Blistercoil Weird', 'Piranha Marsh', 'Brave the Elements', 'Unburial Rites', 'Sprite Dragon', 'Ash Zealot', 'Judge''s Familiar', 'Old Stickfingers', 'Thraben Inspector', 'Tymaret, Chosen from Death', 'Phantasmagorian', 'Lose Focus', 'Mystic Monastery', 'Ancient Stirrings', 'Tectonic Reformation', 'Sterling Grove', 'Blade Splicer', 'Drannith Healer', 'Experimental Synthesizer', 'Rite of Oblivion', 'Rishadan Dockhand', 'Warleader''s Helix', 'Memorial to War', 'Silverbluff Bridge', 'Benevolent Bodyguard', 'Squadron Hawk', 'Changeling Outcast', 'Hymn to Tourach', 'Clifftop Retreat', 'Pyretic Ritual', 'Sylvan Anthem', 'Weathered Wayfarer', 'Okiba Reckoner Raid', 'Skull Prophet', 'Iron Apprentice', 'Shigeki, Jukai Visionary', 'Ensoul Artifact', 'Arcbound Mouser', 'Satyr Wayfinder', 'Elixir of Immortality', 'Tangle', 'Voyaging Satyr', 'Malakir Rebirth', 'Solitary Confinement', 'Orim''s Chant', 'Frontier Bivouac', 'Cleansing Wildfire', 'Tempest Djinn', 'Elvish Mystic', 'Zenith Flare', 'Condemn', 'Thirst for Discovery', 'Shatter the Sky', 'Cosmos Elixir', 'Dark Ritual', 'Blackbloom Rogue', 'Nether Spirit', 'Overgrowth', 'Delver of Secrets', 'Eye of Vecna', 'Undercity Informer', 'Urza''s Factory', 'Prismatic Lens', 'Fiend Hunter', 'Zabaz, the Glimmerwasp', 'Wirewood Herald', 'Flourishing Fox', 'Resurgent Belief', 'Gitaxian Probe', 'Viscera Seer', 'Honor of the Pure', 'Azami, Lady of Scrolls', 'Tithe Taker', 'Azorius Signet', 'Sejiri Refuge', 'Sleight of Hand', 'Banehound', 'Faerie Miscreant', 'Dovin Baan', 'Vadrik, Astral Archmage', 'Assault Strobe', 'Detention Sphere', 'Seafloor Oracle', 'Marwyn, the Nurturer', 'Mishra''s Factory', 'Glimmerpost', 'Overwhelmed Apprentice', 'Smallpox', 'Ad Nauseam', 'Crackling Drake', 'Merrow Reejerey', 'Chandra, Pyromaster', 'Zetalpa, Primal Dawn', 'Bloodline Keeper', 'Izzet Boilerworks', 'Mystical Teachings', 'Sphinx of Foresight', 'Lightning Strike', 'Hall of Oracles', 'Sword-Point Diplomacy', 'Steel Hellkite', 'Day of Judgment', 'Slip Out the Back', 'Angel''s Grace', 'Primal Command', 'Imperious Perfect', 'Bloodbraid Elf', 'Zuran Orb', 'Fertile Ground', 'Llanowar Elves', 'Lullmage Mentor', 'Mind''s Desire', 'Dragonsguard Elite', 'Blessed Respite', 'Shard Volley', 'Benalish Marshal', 'Big Score', 'Pyromancer Ascension', 'Soulherder', 'Kira, Great Glass-Spinner', 'Lava Dart', 'Martyr of Sands', 'Stonybrook Schoolmaster', 'Touch the Spirit Realm', 'Lizard Blades', 'Pirate''s Pillage', 'Vapor Snag', 'Riftwing Cloudskate', 'Thornglint Bridge', 'Caves of Koilos', 'Midnight Clock', 'Tezzeret''s Gambit', 'Demigod of Revenge', 'Animation Module', 'Clockspinning', 'Quest for Ula''s Temple', 'Strike It Rich', 'Stone Rain', 'Ezuri, Renegade Leader', 'Repeal', 'Sylvan Messenger', 'Bastion of Remembrance', 'Fact or Fiction', 'Chain Lightning', 'Restoration Angel', 'Seasoned Hallowblade', 'Thought Scour', 'Dragonskull Summit', 'Inkwell Leviathan', 'Kami of False Hope', 'Moon-Circuit Hacker', 'Invoke Calamity', 'Borborygmos Enraged', 'Kaya, Ghost Assassin', 'Grapeshot', 'Cordial Vampire', 'Llanowar Wastes', 'Fire-Lit Thicket', 'Rustvale Bridge', 'Grisly Salvage', 'Shriekmaw', 'Timeless Witness', 'Intruder Alarm', 'Skyclave Cleric', 'Tyrant''s Choice', 'Rootbound Crag', 'Joraga Warcaller', 'Kazandu Mammoth', 'Pillage', 'Wild Cantor', 'Eerie Interlude', 'Sylvan Scrying', 'Jokulhaups', 'Hall of the Bandit Lord', 'Arcbound Javelineer', 'Fatestitcher', 'Balustrade Spy', 'Frantic Inventory', 'Barbarian Ring', 'Myr Battlesphere', 'Incinerate', 'Psychic Possession', 'Swiftwater Cliffs', 'Lightning Rift', 'Market Festival', 'Desperate Ritual', 'Grozoth', 'Pieces of the Puzzle', 'Signal Pest', 'Mire Triton', 'Fallen Shinobi', 'Ghalta, Primal Hunger', 'Vindicate', 'Ancestral Anger', 'Dauntless Bodyguard', 'Jack-o''-Lantern', 'Lavaclaw Reaches', 'Cloudblazer', 'Temple of Malady', 'Pelakka Predation', 'Kumano Faces Kakkazan', 'Avatar of Woe', 'Drowner of Secrets', 'Folio of Fancies', 'Endbringer', 'Sylvan Advocate', 'Commune with the Gods', 'Ghost Quarter', 'Erebos''s Intervention', 'Lashwrithe', 'Surgespanner', 'Glorybringer', 'Lotleth Giant', 'Treacherous Blessing', 'Swans of Bryn Argoll', 'Gatekeeper of Malakir', 'Dwynen''s Elite', 'Tangled Florahedron', 'Game Trail', 'Mistveil Plains', 'Talisman of Resilience', 'Drannith Stinger', 'Everflowing Chalice', 'Dawn of Hope', 'Disruption Protocol', 'Pirate''s Prize', 'Heartless Act', 'Unsubstantiate', 'Evolving Wilds', 'Wooded Bastion', 'Hypnotic Specter', 'Hagra Mauling', 'Relentless Pursuit', 'Tendrils of Agony', 'Birds of Paradise', 'Thief of Sanity', 'Dread Fugue', 'Champion of the Parish', 'Flame Rift', 'Bloodvial Purveyor', 'Jeskai Ascendancy', 'Elvish Visionary', 'Skyclave Shade', 'Lightning Angel', 'Fabricate', 'Grimoire Thief', 'Trickbind', 'Bump in the Night', 'Silence', 'Terramorphic Expanse', 'Terastodon', 'Faithful Mending', 'Gideon Jura', 'Captivating Vampire', 'Sylvan Library', 'Fury of the Horde', 'Nevermaker', 'Angel of Invention', 'Laboratory Maniac', 'Temple of Epiphany', 'Wall of Omens', 'Hit // Run', 'Bala Ged Recovery', 'Curiosity', 'Undead Butler', 'Ethereal Haze', 'Momentary Blink', 'Outland Liberator', 'Mission Briefing', 'Cloudcrest Lake', 'Arcbound Ravager', 'Invigorate', 'Brain Freeze', 'Spikefield Hazard', 'Mikokoro, Center of the Sea', 'Bloodchief''s Thirst', 'Dryad Militant', 'Michiko''s Reign of Truth', 'Arch of Orazca', 'Oust', 'Ranger of Eos', 'Garruk Wildspeaker', 'Vedalken Shackles', 'Oran-Rief, the Vastwood', 'Cathar Commando', 'Cursecatcher', 'Shrapnel Blast', 'Joraga Treespeaker', 'Anticipate', 'Myth Realized', 'Arbor Elf', 'Runed Halo', 'Dimir Aqueduct', 'Dreadhorde Invasion', 'Drowned Catacomb', 'Reality Ripple', 'Radha, Heart of Keld', 'Rites of Flourishing', 'Scourge of Fleets', 'Improbable Alliance', 'Master of Death', 'Steel Overseer', 'Arcbound Worker', 'Woodland Cemetery', 'Hieroglyphic Illumination', 'Doom Foretold', 'Wind Zendikon', 'Delay', 'Vampire''s Kiss', 'Crash Through', 'Temple of Silence', 'Phyrexian Dreadnought', 'Control Magic', 'Ornithopter', 'Timely Reinforcements', 'Sunscorched Desert', 'Reap and Sow', 'Soulflayer', 'Burst Lightning', 'Sandsteppe Citadel', 'Sanctum of Stone Fangs', 'Wrath of God', 'Seething Song', 'Rise and Shine', 'Shredded Sails', 'Valiant Rescuer', 'Chancellor of the Dross', 'Dream Trawler', 'Westvale Abbey', 'Dispel', 'Bedlam Reveler', 'Opt', 'Esper Charm', 'Proclamation of Rebirth', 'Sign in Blood', 'Treasure Cruise', 'Throne of Geth', 'Temple of Plenty', 'Ghitu Lavarunner', 'Stubborn Denial', 'Lodestone Golem', 'Stonybrook Banneret', 'Bedeck // Bedazzle', 'Mana Leak', 'Mycosynth Wellspring', 'Song of Creation', 'Mwonvuli Acid-Moss', 'Vampire Nighthawk', 'An Offer You Can''t Refuse', 'Sovereign''s Bite', 'Blazing Shoal', 'Kabira Takedown', 'Patchwork Automaton', 'Exclude', 'Sage of Epityr', 'Lonely Sandbar', 'Spark Spray', 'Secluded Glen', 'Forbid', 'Slagstorm', 'Angel of Glory''s Rise', 'Razortide Bridge', 'Tapping at the Window', 'Goreclaw, Terror of Qal Sisma', 'Goldmire Bridge', 'Faerie Vandal', 'Harbinger of the Tides', 'Cabal Therapist', 'Jace, Memory Adept', 'Platinum Angel', 'Stern Dismissal', 'Obscura Storefront', 'Smokestack', 'Frantic Search', 'Memory Lapse', 'Elvish Archdruid', 'Silverblade Paladin', 'Irencrag Pyromancer', 'Ponder', 'Tooth and Nail', 'Thoughtpicker Witch', 'Ingenious Infiltrator', 'Vampire of the Dire Moon', 'Bone Saw', 'Power Depot', 'Watcher for Tomorrow', 'Goblin Electromancer', 'Dread Return', 'Abiding Grace', 'Spell Pierce', 'Howling Mine', 'Memory''s Journey', 'Duress', 'Akroma, Angel of Fury', 'Samut, Voice of Dissent', 'Spelltwine', 'Temple Bell', 'Barren Moor', 'Tranquil Thicket', 'Okina, Temple to the Grandfathers', 'Nevermore', 'Secluded Steppe', 'Raging Ravine', 'Giant Killer', 'Falkenrath Pit Fighter', 'Sundial of the Infinite', 'Teferi, Mage of Zhalfir', 'Ethersworn Canonist', 'Mantis Rider', 'Feed the Swarm', 'Seismic Assault', 'Mystic Retrieval', 'Chandra''s Ignition', 'Porphyry Nodes', 'Lotleth Troll', 'Temple of Enlightenment', 'Sleeper Agent', 'Stromkirk Noble', 'Inquisitive Puppet'))) 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, 104.6, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
Exceeded slow_query limit (93.2 > 60.0) in mysql: ```
SELECT
d.id,
d.finish,
d.decklist_hash,
cache.active_date,
cache.wins,
cache.losses,
cache.draws,
cache.color_sort,
ct.name AS competition_type_name
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 ('Stromkirk Noble', 'Ingenious Infiltrator', 'Thornglint Bridge', 'Seismic Assault', 'Experimental Synthesizer', 'Unsubstantiate', 'Stonybrook Banneret', 'Pyromancer Ascension', 'Hymn to Tourach', 'Soul Spike', 'Lava Dart', 'Fatestitcher', 'Touch the Spirit Realm', 'Tempest Djinn', 'Samut, Voice of Dissent', 'Faerie Miscreant', 'Moon-Circuit Hacker', 'Giant Killer', 'Wild Cantor', 'Folio of Fancies', 'Fire-Lit Thicket', 'Dragonsguard Elite', 'Crackling Drake', 'Deeproot Elite', 'Arcane Sanctum', 'Grimoire Thief', 'Temple of Silence', 'Thought Scour', 'Burst Lightning', 'Arcbound Javelineer', 'Angel of Glory''s Rise', 'Thoughtpicker Witch', 'Kitchen Imp', 'Grozoth', 'Shriekmaw', 'Urza''s Factory', 'Tectonic Reformation', 'Mystical Teachings', 'Satyr Wayfinder', 'Old Stickfingers', 'Inkwell Leviathan', 'Balustrade Spy', 'Riftwing Cloudskate', 'Curiosity', 'Hall of the Bandit Lord', 'Radha, Heart of Keld', 'Surgespanner', 'Disallow', 'Prismatic Lens', 'Obscura Storefront', 'Oran-Rief, the Vastwood', 'Bedlam Reveler', 'Erebos''s Intervention', 'Silence', 'Pyretic Ritual', 'Crash Through', 'Ethersworn Canonist', 'Barbarian Ring', 'Deep Analysis', 'Azorius Signet', 'Mystic Retrieval', 'Soulflayer', 'Invigorate', 'Dauntless Bodyguard', 'Blackbloom Rogue', 'Day of Judgment', 'Ad Nauseam', 'Lightning Strike', 'Vedalken Shackles', 'Jokulhaups', 'Cathar Commando', 'Shard Volley', 'Oust', 'Platinum Angel', 'Scourge of Fleets', 'Eerie Interlude', 'Azami, Lady of Scrolls', 'Delay', 'Dwynen''s Elite', 'Mire Triton', 'Sphinx of Foresight', 'Bastion of Remembrance', 'Sylvan Library', 'Kami of False Hope', 'Lullmage Mentor', 'Firespout', 'Bloodline Keeper', 'Improbable Alliance', 'Ancient Stirrings', 'Prophetic Prism', 'Vampire Nighthawk', 'Memory Lapse', 'Arcbound Worker', 'Zuran Orb', 'Sleeper Agent', 'Fabled Hero', 'Lotleth Troll', 'Memorial to War', 'Circular Logic', 'Swans of Bryn Argoll', 'Viscera Seer', 'Chandra, Pyromaster', 'Changeling Outcast', 'Secluded Courtyard', 'Resurgent Belief', 'Frantic Search', 'Drowned Catacomb', 'Heartless Act', 'Mantis Rider', 'Clifftop Retreat', 'Cordial Vampire', 'Abiding Grace', 'Endbringer', 'Brain Freeze', 'Mistveil Plains', 'Garruk Wildspeaker', 'Tendrils of Agony', 'Kira, Great Glass-Spinner', 'Wonder', 'Tangle', 'Condemn', 'Seething Song', 'Brave the Elements', 'Infernal Grasp', 'Slagstorm', 'Bloodchief''s Thirst', 'Inquisitive Puppet', 'Everflowing Chalice', 'Dawn of Hope', 'Dark Ritual', 'Fabricate', 'Duress', 'Harbinger of the Tides', 'Treasure Cruise', 'Tooth and Nail', 'Faithful Mending', 'Pirate''s Pillage', 'Soulherder', 'Hall of Oracles', 'Hanweir Garrison', 'Lonely Sandbar', 'Joraga Warcaller', 'Lodestone Golem', 'Sprite Dragon', 'Throne of Geth', 'Phalanx Leader', 'Drowner of Secrets', 'Drannith Healer', 'Llanowar Elves', 'Forgotten Cave', 'Ponder', 'Weathered Wayfarer', 'Zenith Flare', 'Vadrik, Astral Archmage', 'Delver of Secrets', 'Fertile Ground', 'Dovin Baan', 'Psychic Possession', 'Dread Return', 'Hieroglyphic Illumination', 'Wooded Bastion', 'Bone Shards', 'Anticipate', 'Cabal Therapist', 'Sundial of the Infinite', 'Vanguard of Brimaz', 'Okiba Reckoner Raid', 'Rites of Flourishing', 'Eye of Vecna', 'Frantic Inventory', 'Invoke Calamity', 'Thirst for Discovery', 'Gods Willing', 'Wind Zendikon', 'Game Trail', 'Pelakka Predation', 'Desperate Ravings', 'Dread Fugue', 'Seafloor Oracle', 'Jack-o''-Lantern', 'Silverbluff Bridge', 'Jace, Memory Adept', 'Spikefield Hazard', 'Joraga Treespeaker', 'Rootbound Crag', 'Restoration Angel', 'Hagra Mauling', 'Skyclave Shade', 'Kazandu Mammoth', 'Tranquil Thicket', 'Tymaret, Chosen from Death', 'Watcher for Tomorrow', 'Undercity Informer', 'Kiora''s Follower', 'Tezzeret''s Gambit', 'Lavaclaw Reaches', 'Glacial Fortress', 'Falkenrath Pit Fighter', 'Tide Shaper', 'Pillage', 'Ornithopter', 'Disruption Protocol', 'Hit // Run', 'Ghalta, Primal Hunger', 'Flame Rift', 'Desperate Ritual', 'Izzet Boilerworks', 'Frontier Bivouac', 'Glorybringer', 'Skull Prophet', 'Phyrexian Dreadnought', 'Incinerate', 'Temple of Plenty', 'Barren Moor', 'Treacherous Blessing', 'Skyclave Cleric', 'Quest for Ula''s Temple', 'Ghost Quarter', 'Temple of Epiphany', 'Myth Realized', 'Laboratory Maniac', 'Tangled Florahedron', 'Phantasmagorian', 'Sage of Epityr', 'Sleight of Hand', 'Luminarch Ascension', 'Goreclaw, Terror of Qal Sisma', 'Vindicate', 'Mycosynth Wellspring', 'Rishadan Dockhand', 'Llanowar Wastes', 'Sage of Fables', 'Assault Strobe', 'Terramorphic Expanse', 'Decree of Justice', 'Ranger of Eos', 'Bump in the Night', 'Abrade', 'Bathe in Light', 'Seasoned Hallowblade', 'Spark Spray', 'Martyr of Sands', 'Voyaging Satyr', 'Cloudpost', 'Sterling Grove', 'Grisly Salvage', 'Zombie Infestation', 'Primal Command', 'Sylvan Anthem', 'Ensoul Artifact', 'Fallen Shinobi', 'Flame Slash', 'Undead Butler', 'Merrow Reejerey', 'Grapeshot', 'Wirewood Herald', 'Momentary Blink', 'Arbor Elf', 'Drannith Stinger', 'Valiant Rescuer', 'Relentless Pursuit', 'Bedeck // Bedazzle', 'Cloudblazer', 'Exclude', 'Solitary Confinement', 'Fury of the Horde', 'Angel of Invention', 'Piranha Marsh', 'Temple of Malady', 'Temple of Mystery', 'Chancellor of the Dross', 'Ghoultree', 'Sword-Point Diplomacy', 'Defiant Strike', 'Opt', 'Sylvan Scrying', 'Timeless Witness', 'Kaya, Ghost Assassin', 'Power Depot', 'Overgrowth', 'Nevermore', 'Arcbound Mouser', 'Indulgent Aristocrat', 'Detention Sphere', 'Master of Death', 'Bloodbraid Elf', 'Chandra''s Ignition', 'Shredded Sails', 'Okina, Temple to the Grandfathers', 'Overwhelmed Apprentice', 'Mana Leak', 'Stern Dismissal', 'Porphyry Nodes', 'Vampire''s Kiss', 'Timely Reinforcements', 'Imperious Perfect', 'Banisher Priest', 'Judge''s Familiar', 'Stone Rain', 'Kabira Takedown', 'Glimmerpost', 'Big Score', 'Sunscorched Desert', 'Vampire of the Dire Moon', 'Sanctum of Stone Fangs', 'Temple of Enlightenment', 'Vapor Snag', 'Azorius Charm', 'Tithe Taker', 'Scrapheap Scrounger', 'Lightning Angel', 'Bala Ged Recovery', 'Mikokoro, Center of the Sea', 'Control Magic', 'Arch of Orazca', 'Sylvan Advocate', 'Marwyn, the Nurturer', 'Apex of Power', 'Lizard Blades', 'Reap and Sow', 'Steel Hellkite', 'Memory''s Journey', 'Stonybrook Schoolmaster', 'Ash Zealot', 'Smallpox', 'Chain Lightning', 'Lightning Rift', 'Steel Overseer', 'Feed the Swarm', 'Rite of Oblivion', 'Wall of Omens', 'Putrid Imp', 'Dragonskull Summit', 'Warleader''s Helix', 'Tapping at the Window', 'First-Sphere Gargantua', 'River''s Rebuke', 'Thraben Inspector', 'Flourishing Fox', 'Animation Module', 'Talisman of Resilience', 'Orim''s Chant', 'Shigeki, Jukai Visionary', 'Cosmos Elixir', 'Blade Splicer', 'Akroma, Angel of Fury', 'Intruder Alarm', 'Abundant Harvest', 'An Offer You Can''t Refuse', 'Shrapnel Blast', 'Repeal', 'Shatter the Sky', 'Elixir of Immortality', 'Market Festival', 'Caves of Koilos', 'Captivating Vampire', 'Mission Briefing', 'Forbid', 'Irencrag Pyromancer', 'Hypnotic Specter', 'Sandsteppe Citadel', 'Arcbound Ravager', 'Honor of the Pure', 'Song of Creation', 'Esper Charm', 'Sovereign''s Bite', 'Terastodon', 'Wanderwine Prophets', 'Elvish Archdruid', 'Spell Pierce', 'Teferi, Mage of Zhalfir', 'Elvish Mystic', 'Woodland Cemetery', 'Nevermaker', 'Favored Hoplite', 'Swiftwater Cliffs', 'Signal Pest', 'Kiln Fiend', 'Banehound', 'Goblin Electromancer', 'Bloodvial Purveyor', 'Mishra''s Factory', 'Jeskai Ascendancy', 'Malakir Rebirth', 'Commune with the Gods', 'Cold-Eyed Selkie', 'Faerie Vandal', 'Blistercoil Weird', 'Cursecatcher', 'Seal of Removal', 'Tyrant''s Choice', 'Reality Ripple', 'Frontline Medic', 'Howling Mine', 'Doom Foretold', 'Benalish Marshal', 'Pirate''s Prize', 'Nether Spirit', 'Hinterland Harbor', 'Stubborn Denial', 'Iron Apprentice', 'Ethereal Haze', 'Sylvan Messenger', 'Dimir Aqueduct', 'Goldmire Bridge', 'Rustvale Bridge', 'Gitaxian Probe', 'Lose Focus', 'Silverblade Paladin', 'Dreadhorde Invasion', 'Rise and Shine', 'Cleansing Wildfire', 'Myr Battlesphere', 'Westvale Abbey', 'Evolving Wilds', 'Otherworldly Gaze', 'Thief of Sanity', 'Clockspinning', 'Zabaz, the Glimmerwasp', 'Birds of Paradise', 'Smokestack', 'Sejiri Refuge', 'Proclamation of Rebirth', 'Spelltwine', 'Wrath of God', 'Secluded Glen', 'Trickbind', 'Slip Out the Back', 'Lotleth Giant', 'Sign in Blood', 'Zetalpa, Primal Dawn', 'Dream Trawler', 'Lashwrithe', 'Ghitu Lavarunner', 'Blazing Shoal', 'Boros Elite', 'Razortide Bridge', 'Dispel', 'Temple Bell', 'Ancestral Anger', 'Pieces of the Puzzle', 'Mwonvuli Acid-Moss', 'Strike It Rich', 'Fiend Hunter', 'Master of the Pearl Trident', 'Mind''s Desire', 'Gideon Jura', 'Angel''s Grace', 'Dryad Militant', 'Mystic Monastery', 'Daring Skyjek', 'Borborygmos Enraged', 'Battlefield Forge', 'Runed Halo', 'Benevolent Bodyguard', 'Kumano Faces Kakkazan', 'Ezuri, Renegade Leader', 'Blessed Respite', 'Ravenous Chupacabra', 'Unburial Rites', 'Squadron Hawk', 'Secluded Steppe', 'Michiko''s Reign of Truth', 'Bone Saw', 'Psychatog', 'Demigod of Revenge', 'Outland Liberator', 'Patchwork Automaton', 'Fact or Fiction', 'Midnight Clock', 'Avatar of Woe', 'Merfolk Sovereign', 'Champion of the Parish', 'Cloudcrest Lake', 'Gatekeeper of Malakir', 'Raging Ravine', 'Elvish Visionary'))) 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, 93.2, mysql)
Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb
Labels: decksite
[]
(slow_query, 70.5, mysql)Reported on decksite by mysql-perf
Location Hash: 76c88d7a4cc0d0c059766975309d20a84a82fecb