PennyDreadfulMTG / perf-reports

2 stars 2 forks source link

Exceeded slow_query limit (2.6 > 1.0) in mysql: ``` #60936

Open vorpal-buildbot opened 1 year ago

vorpal-buildbot commented 1 year ago
    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    FROM
        deck AS d

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN deck_cache AS season ON d.id = season.deck_id
    WHERE
        (d.id IN (SELECT deck_id FROM deck_card WHERE card IN ('Wilt', 'Silumgar, the Drifting Death', 'Stir the Grave', 'Touch the Spirit Realm', 'Sphere of Safety', 'Mothdust Changeling', 'Gryff''s Boon', 'Temple of Deceit', 'Malicious Malfunction', 'Doomskar', 'Combat Thresher', 'Master of Death', 'Master of Etherium', 'Tezzeret, Artifice Master', 'Invasion of Regatha', 'Gideon Jura', 'Shred Memory', 'The Celestus', 'Mina and Denn, Wildborn', 'Arbalest Engineers', 'Day of Judgment', 'Destiny Spinner', 'Servo Exhibition', 'Consume the Meek', 'Argentum Masticore', 'Westvale Abbey', 'The Flame of Keld', 'Luminarch Ascension', 'Sacred Peaks', 'Stromkirk Noble', 'Elite Inquisitor', 'Stoic Rebuttal', 'Hornet Queen', 'Sheoldred''s Edict', 'Shimmerdrift Vale', 'Demolition Field', 'Nimbus Maze', 'Grolnok, the Omnivore', 'Timeless Witness', 'Satyr Wayfinder', 'Haunted Mire', 'Archangel Avacyn', 'Invasion of New Capenna', 'Temple of Plenty', 'Enchantress''s Presence', 'Phyrexian Revoker', 'Goblin Bombardment', 'Kor Skyfisher', 'Pyrite Spellbomb', 'Crawling Chorus', 'Briarbridge Tracker', 'Slagwoods Bridge', 'Gitaxian Probe', 'Dread Wanderer', 'Combat Research', 'Sea-Dasher Octopus', 'Vines of Vastwood', 'Orzhov Charm', 'Mulldrifter', 'Selesnya Guildgate', 'Sleight of Hand', 'Maestros Charm', 'Venser, Shaper Savant', 'Thopter Spy Network', 'Tribute to Hunger', 'Annex Sentry', 'Scarab Feast', 'Tear Asunder', 'Argentum Armor', 'Merfolk Sovereign', 'Shardless Agent', 'Goldmire Bridge', 'Pharika''s Libation', 'Archaeomancer', 'Alms of the Vein', 'Snow-Covered Swamp', 'Nissa, Worldwaker', 'Mirran Crusader', 'Aegis of the Gods', 'Sprite Dragon', 'Unlucky Witness', 'Kiora, the Crashing Wave', 'Leonin Warleader', 'Silver-Fur Master', 'Dreadhorde Butcher', 'Graven Lore', 'Yahenni''s Expertise', 'Aetherling', 'Grenzo, Dungeon Warden', 'Eldrazi Displacer', 'Farseek', 'The Scorpion God', 'Ardent Recruit', 'Ancient Stirrings', 'Hard Evidence', 'Silundi Vision', 'Rotting Rats', 'Elves of Deep Shadow', 'Smother', 'Mindslaver', 'Silumgar''s Scorn', 'Spectral Shift', 'Wonder', 'Seething Song', 'Gruul Spellbreaker', 'Armored Scrapgorger', 'Yavimaya Iconoclast', 'Spell Burst', 'Blightbelly Rat', 'Into the Story', 'Leonin Relic-Warder', 'Greater Tanuki', 'Woodland Cemetery', 'Venerable Knight', 'Jungle Shrine', 'Porphyry Nodes', 'Rampant Growth', 'Squadron Hawk', 'Vampiric Rites', 'Akoum Hellhound', 'Blazing Rootwalla', 'Mnemonic Sphere', 'Drainpipe Vermin', 'Strike It Rich', 'Dauntless Bodyguard', 'Silverbluff Bridge', 'Ruric Thar, the Unbowed', 'Hideous End', 'Forbidden Alchemy', 'Oracle of Tragedy', 'Settle the Wreckage', 'Halana and Alena, Partners', 'Boros Guildgate', 'Sarkhan the Masterless', 'Elixir of Immortality', 'Draugr Necromancer', 'Green Sun''s Twilight', 'Racers'' Ring', 'Mana Leak', 'Arcane Sanctum', 'Thornglint Bridge', 'Vampire Neonate', 'All That Glitters', 'Fight as One', 'Drowned Catacomb', 'Rakdos''s Return', 'Mistblade Shinobi', 'Drown in Ichor', 'Cataclysmic Gearhulk', 'Dispatch', 'Game Trail', 'Search for Tomorrow', 'Dimir Guildgate', 'Guile', 'Riveteers Overlook', 'Dragonskull Summit', 'Glint-Sleeve Siphoner', 'Gnawing Vermin', 'Contaminated Aquifer', 'Knight of New Alara', 'Heliod''s Pilgrim', 'Gallia of the Endless Dance', 'Dismal Backwater', 'Voyaging Satyr', 'Utter End', 'Izzet Charm', 'Volt Charge', 'Predatory Sliver', 'Aether Spellbomb', 'Ramunap Excavator', 'Tangled Islet', 'Reinforced Ronin', 'Moderation', 'Mirror Entity', 'Embodiment of Fury', 'Dream Trawler', 'Gods Willing', 'Kjeldoran Outpost', 'Earthquake', 'Ancient Ziggurat', 'Thrill of Possibility', 'Remorseful Cleric', 'Kitchen Imp', 'Vivid Marsh', 'Simic Guildgate', 'Grave Scrabbler', 'Delver of Secrets', 'Empyrial Plate', 'Genesis Hydra', 'Fruit of Tizerus', 'Maze''s End', 'Lantern-Lit Graveyard', 'Ranger of Eos', 'Frenetic Sliver', 'Rift Bolt', 'Godo, Bandit Warlord', 'Steel Overseer', 'Cabaretti Courtyard', 'Merrow Reejerey', 'Throne of the God-Pharaoh', 'Flaying Tendrils', 'Pyretic Ritual', 'Obscura Storefront', 'Disenchant', 'Tendo Ice Bridge', 'Lavaclaw Reaches', 'Gigadrowse', 'Tocasia''s Dig Site', 'Rule of Law', 'Arch of Orazca', 'Crack the Earth', 'Slaughter Pact', 'Vexing Shusher', 'Chamber Sentry', 'Rocco, Cabaretti Caterer', 'Heliod''s Intervention', 'Waking the Trolls', 'Diabolic Tutor', 'Razortide Bridge', 'Magister of Worth', 'Llanowar Augur', 'Sorin, Vengeful Bloodlord', 'Fumigate', 'Calciform Pools', 'Leonin Arbiter', 'Chittering Rats', 'Arcum''s Astrolabe', 'Jace, Architect of Thought', 'Idyllic Tutor', 'Memory Lapse', 'Rakdos Cackler', 'Dying to Serve', 'Pulse of the Fields', 'Mouth of Ronom', 'Primal Command', 'Grand Architect', 'Chief Engineer', 'Phyrexian Censor', 'Stinkweed Imp', 'Rakdos Guildgate', 'Battle of Wits', 'Scuttling Doom Engine', 'Empyrial Armor', 'Izzet Guildgate', 'Diffusion Sliver', 'Battle of Frost and Fire', 'Tilling Treefolk', 'Hostage Taker', 'Throat Slitter', 'Collected Conjuring', 'Second Sunrise', 'Winds of Abandon', 'Brokers Hideout', 'Invisible Stalker', 'Prosperous Thief', 'Unctus, Grand Metatect', 'Geyadrone Dihada', 'Summary Dismissal', 'Ivy Lane Denizen', 'Cut Down', 'Choked Estuary', 'Altar of the Goyf', 'Abiding Grace', 'Kaito, Dancing Shadow', 'Disallow', 'Elemental Masterpiece', 'Destroy Evil', 'Helm of the Host', 'Ossification', 'Blight Mamba', 'Discovery // Dispersal', 'Archangel of Wrath', 'Sudden Edict', 'Unholy Heat', 'Kaya, Ghost Assassin', 'Runed Halo', 'Sigrid, God-Favored', 'Frostwalk Bastion', 'Devil''s Play', 'Farhaven Elf', 'Steppe Lynx', 'Malakir Rebirth', 'Blighted Agent', 'Mausoleum Secrets', 'Wall of Omens', 'Dead // Gone', 'Angel of Despair', 'Mesmeric Fiend', 'Raging Ravine', 'Forked Bolt', 'Detention Sphere', 'Kitesail Freebooter', 'Hypergenesis', 'Xerex Strobe-Knight', 'Quest for the Holy Relic', 'Haunted Fengraf', 'Wrath of God', 'Distorted Curiosity', 'Duress', 'Kambal, Consul of Allocation', 'Bubbling Cauldron', 'Commune with Nature', 'Pariah', 'Assault // Battery', 'Blessed Alliance', 'Become Immense', 'Voltage Surge', 'Squee, Goblin Nabob', 'Molten Tributary', 'Shimmer Dragon', 'Territorial Kavu', 'Watcher for Tomorrow', 'Voldaren Pariah', 'Felidar Cub', 'Moorland Haunt', 'Tolarian Terror', 'Herd Baloth', 'Tocatli Honor Guard', 'Forsake the Worldly', 'Artistic Refusal', 'Pardic Miner', 'Pharika''s Cure', 'Arlinn Kord', 'Bloodchief Ascension', 'Eiganjo Castle', 'Karn''s Bastion', 'Ornithopter', 'Careful Cultivation', 'Bloodbraid Elf', 'Slogurk, the Overslime', 'Shambling Vent', 'Wasteland Strangler', 'Jokulhaups', 'Upheaval', 'Angel of Condemnation', 'Favored Hoplite', 'Wanderwine Hub', 'Karumonix, the Rat King', 'Shizo, Death''s Storehouse', 'Viashino Pyromancer', 'Castigate', 'Sylvan Advocate', 'Council''s Judgment', 'Open the Gates', 'Pore Over the Pages', 'Grave Titan', 'Astral Drift', 'Hypnotic Specter', 'Teferi, Mage of Zhalfir', 'Check for Traps', 'Nullpriest of Oblivion', 'Invigorate', 'Forging the Anchor', 'Sire of Insanity', 'Raffine''s Informant', 'Duneblast', 'Might of Old Krosa', 'Dakkon, Shadow Slayer', 'White Sun''s Zenith', 'Aquitect''s Will', 'Cloudshift', 'Krosan Grip', 'Invasion of Ergamon', 'Smoldering Marsh', 'Temple of Malady', 'Third Path Iconoclast', 'Terminate', 'Conflagrate', 'Silent Gravestone', 'Mystical Teachings', 'Loxodon Smiter', 'Sinister Concoction', 'Forbid', 'Fracturing Gust', 'Verduran Enchantress', 'Faith''s Reward', 'Electrolyze', 'Midnight Guard', 'Victim of Night', 'Marble Diamond', 'Folio of Fancies', 'Fade from Memory', 'Notorious Throng', 'Kogla, the Titan Ape', 'Control Magic', 'Knight of Glory', 'Kor Firewalker', 'Vryn Wingmare', 'Gift of Estates', 'Faerie Conclave', 'Cold-Eyed Selkie', 'Doom Blade', 'Mesa Enchantress', 'Gift of Immortality', 'Call to the Grave', 'Lightning Strike', 'Demigod of Revenge', 'Temple of Mystery', 'Gnat Miser', 'Nephalia Drownyard', 'Bolas''s Citadel', 'Bogardan Hellkite', 'Wrenn''s Resolve', 'Raise the Alarm', 'Orzhov Guildgate', 'Kunoros, Hound of Athreos', 'Temple of Enlightenment', 'Orim''s Chant', 'Chandra, Fire Artisan', 'Myr Superion', 'Hope of Ghirapur', 'Zephyr Singer', 'Endbringer', 'Ichorclaw Myr', 'Floriferous Vinewall', 'Venser, the Sojourner', 'Phantasmal Image', 'Benalish Marshal', 'Precursor Golem', 'Geomancer''s Gambit', 'Fleecemane Lion', 'Faerie Vandal', 'Curiosity', 'Timeless Dragon', 'Fertile Ground', 'Arbor Elf', 'Progenitor Exarch', 'Bring the Ending', 'Drake Haven', 'Brineborn Cutthroat', 'Inspiring Veteran', 'Sulfur Falls', 'Lingering Souls', 'Azorius Guildgate', 'Bogbrew Witch', 'Hero of Oxid Ridge', 'Repudiate // Replicate', 'Jwari Disruption', 'Stasis Snare', 'Carven Caryatid', 'Merciless Eviction', 'Vampire Lacerator', 'Spatial Contortion', 'Snow-Covered Mountain', 'Putrefy', 'Rix Maadi Reveler', 'Figure of Destiny', 'Explore', 'Anguished Unmaking', 'Invasion of Azgol', 'Oona''s Grace', 'Seal of Cleansing', 'Price of Progress', 'Kefnet the Mindful', 'Phoenix Chick', 'Burning of Xinye', 'Lost Legacy', 'Surrak, the Hunt Caller', 'Felidar Retreat', 'Ivory Tower', 'General''s Enforcer', 'Neutralize', 'Myth Realized', 'Devious Cover-Up', 'Teneb, the Harvester', 'Gadrak, the Crown-Scourge', 'Sea Gate Oracle', 'Saffi Eriksdotter', 'Ignite Memories', 'Polukranos, World Eater', 'Acclaimed Contender', 'Azorius Charm', 'Network Disruptor', 'Astral Slide', 'Epic Experiment', 'Ghostfire Blade', 'Sin Collector', 'Opulent Palace', 'Dissolve', 'Lotus Cobra', 'Fiery Justice', 'Inkwell Leviathan', 'Mishra''s Factory', 'Commune with Spirits', 'Thundermaw Hellkite', 'Vedalken Heretic', 'Ovika, Enigma Goliath', 'Honor of the Pure', 'Lurrus of the Dream-Den', 'Tainted Indulgence', 'Rites of Initiation', 'Kappa Tech-Wrecker', 'Froghemoth', 'Corrupted Conviction', 'King Darien XLVIII', 'Elvish Visionary', 'Golgari Guildgate', 'Scour All Possibilities', 'Grimoire Thief', 'Chandra, Flamecaller', 'Angel of Grace', 'Gleeful Demolition', 'Condemn', 'Evacuation', 'Shard Volley', 'Darksteel Citadel', 'Jace Beleren', 'Dissipate', 'Genesis Ultimatum', 'World Shaper', 'Psychic Possession', 'Malcator, Purity Overseer', 'Executioner''s Capsule', 'Seeker of the Way', 'Nimble Larcenist', 'Dark-Dweller Oracle', 'Graven Cairns', 'Demonic Bargain', 'Oath of Kaya', 'Commune with the Gods', 'Fierce Empath', 'Spirited Companion', 'Ammit Eternal', 'Tomebound Lich', 'Weathered Wayfarer', 'Tendrils of Agony', 'Wood Elves', 'Desperate Ritual', 'Mistvault Bridge', 'Colossal Skyturtle', 'Rites of Spring', 'Hanweir Garrison', 'Circuit Mender', 'Altar of the Brood', 'Phyrexian Dreadnought', 'Mindsplice Apparatus', 'Glaring Aegis', 'Cabal Initiate', 'Pyroclasm', 'Divinity of Pride', 'Serra Ascendant', 'Thrash // Threat', 'Kiora Bests the Sea God', 'Herd Migration', 'Twinshot Sniper', 'Orcish Lumberjack', 'Dryad Militant', 'General Ferrous Rokiric', 'Minor Misstep', 'Illuminator Virtuoso', 'Dire-Strain Rampage', 'Giant Killer', 'Blade Splicer', 'Anafenza, the Foremost', 'Mortuary Mire', 'Ulvenwald Hydra', 'Fallaji Archaeologist', 'Blightning', 'Torens, Fist of the Angels', 'Dross Skullbomb', 'Duplicant', 'Surge of Salvation', 'Sunpetal Grove', 'Valiant Changeling', 'Titania, Protector of Argoth', 'Stupor', 'Heartless Act', 'Hesitation', 'Sunken Hollow', 'Shrapnel Blast', 'Memoricide', 'Canopy Vista', 'Banishing Slash', 'Bubbling Muck', 'Brain Freeze', 'Approach of the Second Sun', 'Ulcerate', 'Woodfall Primus', 'Ayli, Eternal Pilgrim', 'Faerie Miscreant', 'Ephara, God of the Polis', 'Mazemind Tome', 'Nekrataal', 'Flame Rift', 'Dimir Aqueduct', 'Tribal Flames', 'Dregscape Zombie', 'Barbarian Ring', 'Bloodline Keeper', 'Martyr of Sands', 'Koth, Fire of Resistance', 'Invasion of Zendikar', 'Tranquil Thicket', 'Myr Battlesphere', 'Tresserhorn Sinks', 'Angel of Serenity', 'Chief of the Foundry', 'Abundant Harvest', 'Meeting of Minds', 'Rise and Shine', 'Benevolent Bodyguard', 'Tangle', 'Vraska''s Fall', 'Birds of Paradise', 'Galerider Sliver', 'Tyrant''s Choice', 'Glimpse of Tomorrow', 'Moon-Circuit Hacker', 'Thornwood Falls', 'Frontier Bivouac', 'Lose Focus', 'Stoke the Flames', 'Universal Automaton', 'Huatli, Radiant Champion', 'Seal of Removal', 'Blood on the Snow', 'Anger of the Gods', 'Zombie Infestation', 'Gutterbones', 'Rakdos Charm', 'Scab-Clan Berserker', 'Protect the Negotiators', 'Avacyn''s Pilgrim', 'Yorion, Sky Nomad', 'Rustvale Bridge', 'Llanowar Mentor', 'Angel''s Grace', 'Glimmerpost', 'Purify the Grave', 'Harmonize', 'Audacity', 'Ashen Rider', 'Psychatog', 'Gather the Pack', 'Spell Pierce', 'Knight of the White Orchid', 'Celestial Colonnade', 'Saproling Migration', 'Concealing Curtains', 'Temple of Abandon', 'Bloodchief''s Thirst', 'Revitalize', 'Groundswell', 'Nimble Obstructionist', 'Arcbound Ravager', 'Joint Exploration', 'Bloodsoaked Champion', 'Melira, the Living Cure', 'Reflector Mage', 'Mastermind''s Acquisition', 'Changeling Outcast', 'Black Sun''s Zenith', 'Fact or Fiction', 'Stinkdrinker Bandit', 'Sunstrike Legionnaire', 'Evangel of Synthesis', 'Cultivate', 'Worthy Knight', 'Stubborn Denial', 'Gateway Plaza', 'Pillar of the Paruns', 'Change the Equation', 'Disrupting Shoal', 'Deafening Clarion', 'Lodestone Golem', 'Dimensional Infiltrator', 'Supreme Will', 'Llanowar Elves', 'Sin Prodder', 'Presence of Gond', 'Necrogen Spellbomb', 'Far // Away', 'Gruul Turf', 'Sigil of the Empty Throne', 'Obliterate', 'Fire Prophecy', 'Syphon Life', 'Forgotten Cave', 'Frantic Search', 'Deep Forest Hermit', 'Woe Strider', 'Glamerdye', 'Consuming Vapors', 'Angrath, the Flame-Chained', 'Dark Petition', 'Hissing Quagmire', 'Mirage Mirror', 'Sheltered Thicket', 'Trace of Abundance', 'Idyllic Beachfront', 'Falkenrath Pit Fighter', 'Putrid Imp', 'Phyrexian Unlife', 'Deprive', 'Obzedat, Ghost Council', 'Odds // Ends', 'Lochmere Serpent', 'Frantic Inventory', 'Tempest Djinn', 'Hero of Bladehold', 'Venerated Loxodon', 'Night of Souls'' Betrayal', 'Aetherblade Agent', 'Norn''s Inquisitor', 'Repeal', 'Frost Marsh', 'Raze to the Ground', 'Misery Charm', 'Summer Bloom', 'Talisman of Curiosity', 'Benthic Biomancer', 'Temple of Silence', 'Hero''s Downfall', 'Sever the Bloodline', 'Vraska''s Contempt', 'Thawing Glaciers', 'Murmuring Bosk', 'Prologue to Phyresis', 'Port Town', 'Sins of the Past', 'Esper Charm', 'Experimental Augury', 'Dusk // Dawn', 'Botanical Plaza', 'Tidespout Tyrant', 'Sylvan Caryatid', 'Wolfbriar Elemental', 'Ogre Slumlord', 'Obstinate Baloth', 'Dokuchi Silencer', 'Battlefield Forge', 'Xenagos, the Reveler', 'Basking Rootwalla', 'Vindicate', 'Yasharn, Implacable Earth', 'Sweltering Suns', 'Sterling Grove', 'Lonely Sandbar', 'Rootbound Crag', 'Fetid Heath', 'Dark Ritual', 'Nine Lives', 'Darksteel Colossus', 'Ensoul Artifact', 'Vivid Crag', 'Vampire Nighthawk', 'Wild Cantor', 'Turnabout', 'Tomik, Distinguished Advokist', 'Midnight Reaper', 'Sarkhan, the Dragonspeaker', 'Plated Geopede', 'Narcomoeba', 'Sinew Sliver', 'Yavimaya Coast', 'Valakut Exploration', 'Gravelgill Duo', 'Mikokoro, Center of the Sea', 'Simian Spirit Guide', 'Baneful Omen', 'Needle Spires', 'Hour of Promise', 'Scrapheap Scrounger', 'Ghostly Pilferer', 'Exclude', 'Boreal Shelf', 'Kumano Faces Kakkazan', 'Silverblade Paladin', 'The Seedcore', 'Nightscape Familiar', 'Terminus', 'Graveborn Muse', 'Union of the Third Path', 'Dread Return', 'Raven''s Crime', 'Jungle Hollow', 'Glacial Fortress', 'Glistener Elf', 'Reckoner''s Bargain', 'Feed the Swarm', 'Kami of False Hope', 'Wizard''s Retort', 'Shape Anew', 'Isolated Chapel', 'Solitary Confinement', 'Commit // Memory', 'Oona''s Prowler', 'The Birth of Meletis', 'Arguel''s Blood Fast', 'Dragon''s Hoard', 'Tanglepool Bridge', 'Erebos''s Intervention', 'Kabira Takedown', 'Zur''s Weirding', 'Hooting Mandrills', 'Grand Arbiter Augustin IV', 'Invoke Calamity', 'Terramorphic Expanse', 'Vadrik, Astral Archmage', 'Ral, Storm Conduit', 'Marauding Blight-Priest', 'Cabal Ritual', 'Founding the Third Path', 'Cleansing Wildfire', 'Thassa''s Intervention', 'Brainstone', 'Cauldron Familiar', 'Ayara, First of Locthwain', 'Seismic Assault', 'Smuggler''s Copter', 'Wayward Guide-Beast', 'Prophetic Prism', 'Hieroglyphic Illumination', 'Oni-Cult Anvil', 'Rishadan Dockhand', 'Faeburrow Elder', 'Nomad Outpost', 'Archon of Sun''s Grace', 'Engulf the Shore', 'Obscura Charm', 'Goblin Electromancer', 'Vault of the Archangel', 'Heap Doll', 'Dawn of Hope', 'Knight Exemplar', 'Blanchwood Prowler', 'Bloodvial Purveyor', 'Cremate', 'Rune Snag', 'Patchwork Automaton', 'Nature''s Lore', 'Urza''s Factory', 'Ponder', 'Terastodon', 'Champion of Wits', 'Resurgent Belief', 'Lavinia of the Tenth', 'Secluded Courtyard', 'Venser, Corpse Puppet', 'Tidehollow Sculler', 'Eerie Ultimatum', 'Tribute to Horobi', 'Go for the Throat', 'Canyon Slough', 'Grafted Butcher', 'Pack Rat', 'Brave the Sands', 'Geothermal Bog', 'Mulch', 'Timely Reinforcements', 'Dead Weight', 'Ethereal Armor', 'Incinerate', 'Into the Roil', 'Quicken', 'Think Twice', 'Kruphix''s Insight', 'Lay Down Arms', 'Judge''s Familiar', 'Oust', 'Etherium Sculptor', 'Ravenous Squirrel', 'The Underworld Cookbook', 'Call of the Death-Dweller', 'Cloudpost', 'Sphinx''s Herald', 'Big Game Hunter', 'Mindcrank', 'Vessel of Nascency', 'Cloudshredder Sliver', 'Merfolk Mistbinder', 'Coiling Oracle', 'Pain Seer', 'Cryptic Caves', 'Dead of Winter', 'Consult the Necrosages', 'Inevitable Betrayal', 'Burst Lightning', 'Worship', 'Crux of Fate', 'Gruul Guildgate', 'Quiet Speculation', 'Brave the Elements', 'Morsel Theft', 'Abzan Charm', 'Cathartic Reunion', 'Gideon''s Intervention', 'Urban Evolution', 'Peek', 'Scrying Sheets', 'Deep Analysis', 'Garruk Wildspeaker', 'Ad Nauseam', 'Mistcutter Hydra', 'Experimental Synthesizer', 'Fiery Temper', 'Fae of Wishes', 'Evolving Wilds', 'See Beyond', 'Treasure Cruise', 'Lazotep Chancellor', 'Sculpting Steel', 'Spoils of the Vault', 'Chain Lightning', 'Tide Shaper', 'Nimble Trapfinder', 'Aetherspouts', 'Shivan Reef', 'Vigor', 'Otherworldly Journey', 'Augur of Skulls', 'Bident of Thassa', 'Oracle of Mul Daya', 'Bone Shards', 'Caves of Koilos', 'Buried Ruin', 'Knight of the Reliquary', 'Sandsteppe Citadel', 'Crawling Barrens', 'Fyndhorn Elves', 'Ambush Viper', 'Unburial Rites', 'Clifftop Retreat', 'Soltari Priest', 'Jukai Naturalist', 'Elderscale Wurm', 'Springleaf Drum', 'Solemnity', 'Commence the Endgame', 'Delay', 'Marit Lage''s Slumber', 'Viscera Seer', 'Out of Time', 'Siege Rhino', 'Goblin Dark-Dwellers', 'Nameless Inversion', 'Dovin''s Acuity', 'Cathedral of War', 'Festering Newt', 'Greater Gargadon', 'Tezzeret''s Gambit', 'Nezumi Graverobber', 'Sign in Blood', 'Barbed Sextant', 'Ishkanah, Grafwidow', 'Zuran Orb', 'Big Score', 'Thraben Inspector', 'Vraan, Executioner Thane', 'Drowned Rusalka', 'Assemble the Legion', 'Makeshift Mannequin', 'Flooded Grove', 'Swooping Lookout', 'Rally the Ancestors', 'Bilious Skulldweller', 'Rust Goliath', 'Shriekmaw', 'Corpse Cur', 'Ral, Izzet Viceroy', 'Late to Dinner', 'River of Tears', 'Madcap Experiment', 'Cabal Therapist', 'Voidslime', 'Stern Dismissal', 'Overgrowth', 'Unstable Mutation', 'Sculpted Perfection', 'Bump in the Night', 'Maelstrom Pulse', 'Triumphant Adventurer', 'Hyena Umbra', 'Inscribed Tablet', 'Eidolon of Blossoms', 'Elas il-Kor, Sadistic Pilgrim', 'Voidwing Hybrid', 'Recurring Nightmare', 'Student of Warfare', 'Graaz, Unstoppable Juggernaut', 'Declaration in Stone', 'Sylvan Library', 'Priest of the Haunted Edge', 'Stirring Wildwood', 'Invasion of Amonkhet', 'Kitchen Finks', 'Mind''s Desire', 'Pull from Tomorrow', 'Eternal Scourge', 'Hall of Oracles', 'Hinterland Harbor', 'Altered Ego', 'Kessig Wolf Run', 'Sunblade Samurai', 'Unmarked Grave', 'Herald of the Pantheon', 'Tooth and Nail', 'Thaumatic Compass', 'Search for Azcanta', 'Rise // Fall', 'Seal of Fire', 'Grand Abolisher', 'Ethersworn Sphinx', 'Scrapwork Mutt', 'Open the Armory', 'Sol Talisman', 'Nested Shambler', 'Chandra, Pyromaster', 'Fearless Fledgling', 'Grim Haruspex', 'Doomed Traveler', 'Boon-Bringer Valkyrie', 'Elvish Rejuvenator', 'Nether Spirit', 'Rain of Tears', 'Orzhov Basilica', 'Vivid Grove', 'Increasing Ambition', 'Bitter Reunion', 'Nevermore', 'Ertai''s Scorn', 'Abundant Growth', 'Undying Evil', 'Succumb to Temptation', 'Bituminous Blast', 'Izzet Boilerworks', 'Glorybringer', 'Ashnod, Flesh Mechanist', 'Monument to Perfection', 'Snow-Covered Plains', 'Golgari Rot Farm', 'Vapor Snag', 'Sunlit Marsh', 'Wooded Bastion', 'Yawgmoth''s Bargain', 'Ghitu Lavarunner', 'Temple of Triumph', 'Riveteers Charm', 'Stone Rain', 'Oona, Queen of the Fae', 'Witching Well', 'Smallpox', 'Healer''s Hawk', 'Ghostly Flicker', 'Nezahal, Primal Tide', 'Scrabbling Claws', 'Radha, Heart of Keld', 'Scattered Groves', 'Barter in Blood', 'Wrench Mind', 'Toolcraft Exemplar', 'Vault Skirge', 'Whispersilk Cloak', 'Fetid Pools', 'Nissa, Steward of Elements', 'Ancient Amphitheater', 'Blood Artist', 'Skyclave Shade', 'Frost Titan', 'Drossforge Bridge', 'Ashenmoor Liege', 'Circular Logic', 'Impulse', 'Acidic Slime', 'Murderous Redcap', 'Energy Refractor', 'Vampire Hexmage', 'Restoration Angel', 'Oblivion Ring', 'Agonizing Remorse', 'Icehide Golem', 'Thragtusk', 'Tectonic Edge', 'Time of Need', 'Ghost Quarter', 'Phalanx Leader', 'Sultai Charm', 'Night Market Lookout', 'Decree of Justice', 'Caldera Hellion', 'Always Watching', 'Negate', 'Ground Seal', 'Secluded Steppe', 'Mistveil Plains'))) 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, 2.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.7 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Melira, the Living Cure', 'Fruit of Tizerus', 'Narcomoeba', 'Tocasia''s Dig Site', 'Seal of Fire', 'Bituminous Blast', 'Turnabout', 'Voyaging Satyr', 'Black Sun''s Zenith', 'The Flame of Keld', 'Wanderwine Hub', 'Chandra, Pyromaster', 'Sylvan Scrying', 'Destroy Evil', 'Sylvan Caryatid', 'Phyrexian Censor', 'Resurgent Belief', 'Heartless Act', 'Dakkon, Shadow Slayer', 'Green Sun''s Twilight', 'Solemnity', 'Rule of Law', 'Experimental Augury', 'Geomancer''s Gambit', 'Summary Dismissal', 'Drowned Rusalka', 'Shivan Reef', 'Elves of Deep Shadow', 'Elvish Rejuvenator', 'Vines of Vastwood', 'Dream Trawler', 'Champion of Wits', 'Chandra, Flamecaller', 'Lay Down Arms', 'Vampire Hexmage', 'Gruul Spellbreaker', 'Leonin Arbiter', 'Tribute to Horobi', 'Invoke Calamity', 'Ashnod, Flesh Mechanist', 'Triumphant Adventurer', 'Wall of Omens', 'Draugr Necromancer', 'Glaring Aegis', 'Abundant Growth', 'King Darien XLVIII', 'Memory Lapse', 'Mortuary Mire', 'Sculpted Perfection', 'Ivory Tower', 'Day of Judgment', 'Wonder', 'Polukranos, World Eater', 'Graven Cairns', 'Herald of the Pantheon', 'Cabal Therapist', 'Venerable Knight', 'Sphere of Safety', 'Brokers Hideout', 'Nimbus Maze', 'Dispatch', 'Maelstrom Pulse', 'Discovery // Dispersal', 'Out of Time', 'Blight Mamba', 'Godo, Bandit Warlord', 'Cut Down', 'Touch the Spirit Realm', 'Makeshift Mannequin', 'Oracle of Tragedy', 'Luminarch Ascension', 'Sunstrike Legionnaire', 'Port Town', 'Steel Overseer', 'Worship', 'Kami of False Hope', 'Engulf the Shore', 'Gitaxian Probe', 'Knight of Glory', 'Seismic Assault', 'Blighted Agent', 'Phantasmal Image', 'Mastermind''s Acquisition', 'Dissipate', 'Commune with Nature', 'Dead // Gone', 'Battle of Wits', 'Wrenn''s Resolve', 'Merfolk Sovereign', 'Ulvenwald Hydra', 'Blazing Rootwalla', 'Kaito, Dancing Shadow', 'Disallow', 'Altar of the Brood', 'Dawn of Hope', 'Destiny Spinner', 'Chandra, Fire Artisan', 'Thraben Inspector', 'Graven Lore', 'Urza''s Factory', 'Etherium Sculptor', 'Barter in Blood', 'Izzet Guildgate', 'Flaying Tendrils', 'Sylvan Advocate', 'Forbid', 'Ogre Slumlord', 'Spoils of the Vault', 'Elemental Masterpiece', 'Venerated Loxodon', 'Obliterate', 'Ghostly Flicker', 'Forbidden Alchemy', 'Viscera Seer', 'Kitchen Imp', 'Teferi, Mage of Zhalfir', 'Castigate', 'Ghost Quarter', 'Hesitation', 'Aquitect''s Will', 'Scrapheap Scrounger', 'Late to Dinner', 'Tidehollow Sculler', 'Akoum Hellhound', 'General''s Enforcer', 'Squee, Goblin Nabob', 'Concealing Curtains', 'Chamber Sentry', 'Inscribed Tablet', 'Tangled Islet', 'Search for Tomorrow', 'Altered Ego', 'Slaughter Pact', 'Bloodchief Ascension', 'Fertile Ground', 'Marauding Blight-Priest', 'Angel''s Grace', 'Gather the Pack', 'Izzet Charm', 'Rocco, Cabaretti Caterer', 'Dismal Backwater', 'Council''s Judgment', 'Unmarked Grave', 'Yasharn, Implacable Earth', 'Giant Killer', 'Divinity of Pride', 'Temple of Malady', 'Bubbling Cauldron', 'Condemn', 'Haunted Mire', 'Coiling Oracle', 'Thawing Glaciers', 'Urban Evolution', 'Boros Guildgate', 'Smallpox', 'Venser, the Sojourner', 'Curiosity', 'Realm Razer', 'Farhaven Elf', 'Progenitor Exarch', 'Faith''s Reward', 'Malcator, Purity Overseer', 'Pore Over the Pages', 'Duress', 'Sandwurm Convergence', 'Sunblade Samurai', 'Purify the Grave', 'Hinterland Harbor', 'Nested Shambler', 'Runed Halo', 'Sandsteppe Citadel', 'Jwari Disruption', 'Bogardan Hellkite', 'Loxodon Smiter', 'Fact or Fiction', 'Sin Collector', 'Experimental Synthesizer', 'Vadrik, Astral Archmage', 'Caldera Hellion', 'Minor Misstep', 'Nine Lives', 'Jokulhaups', 'Stoke the Flames', 'Inkwell Leviathan', 'Darksteel Colossus', 'Protect the Negotiators', 'Thrill of Possibility', 'Snow-Covered Mountain', 'Gleeful Demolition', 'Barbarian Ring', 'Ignite Memories', 'Sunken Hollow', 'Faerie Miscreant', 'Ral, Storm Conduit', 'Nissa, Steward of Elements', 'Idyllic Beachfront', 'Ancient Amphitheater', 'Sheltered Thicket', 'Predatory Sliver', 'Otherworldly Journey', 'Basking Rootwalla', 'Healer''s Hawk', 'Goblin Electromancer', 'Raven''s Crime', 'Restoration Angel', 'Chittering Rats', 'Lingering Souls', 'Mouth of Ronom', 'Kunoros, Hound of Athreos', 'Open the Armory', 'Hero of Bladehold', 'Big Game Hunter', 'World Shaper', 'Mind''s Desire', 'Increasing Ambition', 'Frantic Search', 'Unburial Rites', 'Rust Goliath', 'Nullpriest of Oblivion', 'Sylvan Library', 'Circular Logic', 'Dread Return', 'Elite Inquisitor', 'Genesis Hydra', 'Arcbound Ravager', 'Sprite Dragon', 'Venser, Corpse Puppet', 'Nekrataal', 'Genesis Ultimatum', 'Carven Caryatid', 'Ornithopter', 'Ghitu Lavarunner', 'Circuit Mender', 'Kambal, Consul of Allocation', 'Drake Haven', 'Tide Shaper', 'Murmuring Bosk', 'Glamerdye', 'Rix Maadi Reveler', 'Mazemind Tome', 'Nomad Outpost', 'Throne of the God-Pharaoh', 'Sacred Peaks', 'Obstinate Baloth', 'Malicious Malfunction', 'Ashen Rider', 'Duneblast', 'Prologue to Phyresis', 'Tooth and Nail', 'Bubbling Muck', 'Arlinn Kord', 'Ertai''s Scorn', 'Graveborn Muse', 'Dead Weight', 'Raise the Alarm', 'Lotus Cobra', 'Llanowar Augur', 'Frenetic Sliver', 'Mindsplice Apparatus', 'Felidar Retreat', 'See Beyond', 'Drowned Catacomb', 'Grim Haruspex', 'Teneb, the Harvester', 'Dregscape Zombie', 'Koth, Fire of Resistance', 'Selesnya Guildgate', 'Monument to Perfection', 'Ammit Eternal', 'Judge''s Familiar', 'Terastodon', 'Fallaji Archaeologist', 'Dying to Serve', 'Verduran Enchantress', 'Ephara, God of the Polis', 'Racers'' Ring', 'Icehide Golem', 'Mikokoro, Center of the Sea', 'Vampire Lacerator', 'Goldmire Bridge', 'Pariah', 'Faerie Vandal', 'Unsubstantiate', 'Quiet Speculation', 'Anger of the Gods', 'Distorted Curiosity', 'Saffi Eriksdotter', 'Rotting Rats', 'Sarkhan, the Dragonspeaker', 'Wooded Bastion', 'Game Trail', 'Arcane Sanctum', 'Vryn Wingmare', 'Silver-Fur Master', 'Angel of Despair', 'Platinum Angel', 'Hideous End', 'Call of the Death-Dweller', 'Vapor Snag', 'Tocatli Honor Guard', 'Glimmerpost', 'Empyrial Armor', 'Tomik, Distinguished Advokist', 'Hooting Mandrills', 'Lonely Sandbar', 'Tendo Ice Bridge', 'Epic Experiment', 'Phyrexian Dreadnought', 'Darksteel Citadel', 'Jungle Hollow', 'Celestial Colonnade', 'Farseek', 'Demolition Field', 'Lightning Strike', 'Dryad Militant', 'Stinkweed Imp', 'Bloodvial Purveyor', 'Combat Thresher', 'Commune with Spirits', 'Marble Diamond', 'Shape Anew', 'Consuming Vapors', 'Desperate Ritual', 'Midnight Guard', 'Grimoire Thief', 'Molten Tributary', 'Sign in Blood', 'Crawling Chorus', 'Fae of Wishes', 'Ossification', 'Baneful Omen', 'Might of Old Krosa', 'Seething Song', 'Artistic Refusal', 'Kessig Wolf Run', 'Stoic Rebuttal', 'Soltari Priest', 'Into the Roil', 'Rampant Growth', 'Hostage Taker', 'Mesmeric Fiend', 'Mina and Denn, Wildborn', 'Maestros Charm', 'Yahenni''s Expertise', 'Student of Warfare', 'Hypnotic Specter', 'Sunlit Marsh', 'Eiganjo Castle', 'Sea-Dasher Octopus', 'Corrupted Conviction', 'Nissa, Worldwaker', 'Flooded Grove', 'Gnawing Vermin', 'Agonizing Remorse', 'Voidwing Hybrid', 'Ambush Viper', 'Assault // Battery', 'Brave the Sands', 'Approach of the Second Sun', 'Duplicant', 'Bala Ged Recovery', 'Delver of Secrets', 'Enchantress''s Presence', 'Xenagos, the Reveler', 'Nezahal, Primal Tide', 'The Scorpion God', 'Sweltering Suns', 'Rites of Initiation', 'The Underworld Cookbook', 'Angel of Serenity', 'Phyrexian Revoker', 'Ishkanah, Grafwidow', 'Sea Gate Oracle', 'Pyroclasm', 'Thrash // Threat', 'Isolated Chapel', 'Chief of the Foundry', 'Springleaf Drum', 'Yawgmoth''s Bargain', 'Sudden Edict', 'Sterling Grove', 'Reflector Mage', 'Bloodchief''s Thirst', 'Sire of Insanity', 'Kaya, Ghost Assassin', 'Elvish Visionary', 'Bloodline Keeper', 'Necrogen Spellbomb', 'Temple of Mystery', 'Nameless Inversion', 'Vivid Marsh', 'Shriekmaw', 'Kabira Takedown', 'Hope of Ghirapur', 'Call to the Grave', 'Wolfbriar Elemental', 'Anafenza, the Foremost', 'Stubborn Denial', 'Universal Automaton', 'Dread Wanderer', 'Master of Death', 'Consume the Meek', 'Prophetic Prism', 'Blessed Alliance', 'Gnat Miser', 'Oracle of Mul Daya', 'Tidespout Tyrant', 'Sol Talisman', 'Gadrak, the Crown-Scourge', 'Oust', 'Wild Cantor', 'Nimble Trapfinder', 'Oona''s Prowler', 'Ethersworn Sphinx', 'Executioner''s Capsule', 'Tilling Treefolk', 'Karumonix, the Rat King', 'Helm of the Host', 'Rites of Spring', 'Cloudshift', 'Llanowar Elves', 'Distended Mindbender', 'Glistener Elf', 'Commune with the Gods', 'Dragonskull Summit', 'Unctus, Grand Metatect', 'Pillar of the Paruns', 'Presence of Gond', 'Triskelion', 'Disrupting Shoal', 'Timeless Witness', 'Tomebound Lich', 'Vampire Neonate', 'Ovika, Enigma Goliath', 'Martyr of Sands', 'Moorland Haunt', 'Declaration in Stone', 'Cataclysmic Gearhulk', 'Treasure Cruise', 'Obscura Charm', 'Lodestone Golem', 'Archangel Avacyn', 'Westvale Abbey', 'Lose Focus', 'Night of Souls'' Betrayal', 'Kiora Bests the Sea God', 'Careful Cultivation', 'Scour All Possibilities', 'Bitter Reunion', 'Nevermore', 'Evacuation', 'Rakdos''s Return', 'Nezumi Graverobber', 'Cauldron Familiar', 'Precursor Golem', 'Zuran Orb', 'Angrath, the Flame-Chained', 'Winds of Abandon', 'Shardless Agent', 'Yavimaya Iconoclast', 'Dusk // Dawn', 'Banishing Slash', 'The Birth of Meletis', 'Archangel of Wrath', 'Temple of Deceit', 'Assemble the Legion', 'Plated Geopede', 'Yavimaya Coast', 'Deafening Clarion', 'Devious Cover-Up', 'Fiery Temper', 'Feed the Swarm', 'Garruk Wildspeaker', 'Bolas''s Citadel', 'Whispersilk Cloak', 'Zephyr Singer', 'Joint Exploration', 'Arbor Elf', 'Seeker of the Way', 'Swooping Lookout', 'Anguished Unmaking', 'Diffusion Sliver', 'Bloodsoaked Champion', 'Gideon''s Intervention', 'Nimble Larcenist', 'Battlefield Forge', 'Vivid Crag', 'Always Watching', 'Deprive', 'Network Disruptor', 'Explore', 'Tolarian Terror', 'Repudiate // Replicate', 'Vampire Nighthawk', 'Phoenix Chick', 'Bring the Ending', 'Succumb to Temptation', 'Blightbelly Rat', 'Porphyry Nodes', 'Silundi Vision', 'Weathered Wayfarer', 'Glorybringer', 'Valiant Changeling', 'Ayara, First of Locthwain', 'Stupor', 'Stern Dismissal', 'Invigorate', 'Ghostly Pilferer', 'Geothermal Bog', 'Lavinia of the Tenth', 'Cryptic Caves', 'Invasion of Zendikar', 'Moon-Circuit Hacker', 'Terminus', 'Lost Legacy', 'Gallia of the Endless Dance', 'Venser, Shaper Savant', 'Arguel''s Blood Fast', 'Rune Snag', 'Benevolent Bodyguard', 'Zur''s Weirding', 'Territorial Kavu', 'Ayli, Eternal Pilgrim', 'Mishra''s Factory', 'Acclaimed Contender', 'Gift of Immortality', 'Rain of Tears', 'Ranger of Eos', 'Dimensional Infiltrator', 'Huatli, Radiant Champion', 'Frantic Inventory', 'Grand Abolisher', 'Elderscale Wurm', 'Cathedral of War', 'Invasion of Azgol', 'Overgrowth', 'Ashenmoor Liege', 'Slogurk, the Overslime', 'Kefnet the Mindful', 'Notorious Throng', 'Sylvan Primordial', 'Ichorclaw Myr', 'Honor of the Pure', 'Thragtusk', 'Forgotten Cave', 'Undying Evil', 'Quicken', 'Galerider Sliver', 'Astral Slide', 'Spatial Contortion', 'Hyena Umbra', 'Raffine''s Informant', 'Orzhov Guildgate', 'Cloudpost', 'It That Betrays', 'Secluded Courtyard', 'Esper Charm', 'Illuminator Virtuoso', 'Augur of Skulls', 'Knight of New Alara', 'Madcap Experiment', 'Hieroglyphic Illumination', 'Second Sunrise', 'Ramunap Excavator', 'Sleight of Hand', 'Surge of Salvation', 'Colossal Skyturtle', 'Voltage Surge', 'Commence the Endgame', 'Thopter Spy Network', 'Psychic Possession', 'Diabolic Tutor', 'Heliod''s Intervention', 'Avacyn''s Pilgrim', 'Kitchen Finks', 'Glimpse of Tomorrow', 'Cremate', 'Mistvault Bridge', 'Witching Well', 'Inevitable Betrayal', 'Kruphix''s Insight', 'Archon of Sun''s Grace', 'Orzhov Charm', 'Temple of Silence', 'Botanical Plaza', 'Tendrils of Agony', 'Brainstone', 'Vigor', 'Oni-Cult Anvil', 'Bone Shards', 'Ethereal Armor', 'Stinkdrinker Bandit', 'Riveteers Charm', 'Temple of Abandon', 'Toolcraft Exemplar', 'Putrefy', 'Moderation', 'Timely Reinforcements', 'Ancient Ziggurat', 'Price of Progress', 'Memoricide', 'Shimmer Dragon', 'Spell Pierce', 'Union of the Third Path', 'Impulse', 'Serra Ascendant', 'Deep Forest Hermit', 'Riveteers Overlook', 'Mothdust Changeling', 'Tezzeret, Artifice Master', 'Satyr Wayfinder', 'Shred Memory', 'Thundermaw Hellkite', 'Brineborn Cutthroat', 'Vault Skirge', 'Early Harvest', 'Patchwork Automaton', 'Unstable Mutation', 'Check for Traps', 'Third Path Iconoclast', 'Twinshot Sniper', 'Earthquake', 'Aetherling', 'Kor Skyfisher', 'Heap Doll', 'Sin Prodder', 'Froghemoth', 'Lazotep Chancellor', 'Ivy Lane Denizen', 'Gods Willing', 'Time of Need', 'Azorius Charm', 'Calciform Pools', 'Blood on the Snow', 'Gigadrowse', 'Bident of Thassa', 'Jukai Naturalist', 'Fracturing Gust', 'Drown in Ichor', 'Scuttling Doom Engine', 'Cloudshredder Sliver', 'Raging Ravine', 'Dark Ritual', 'Hero of Oxid Ridge', 'Maze''s End', 'Sarkhan the Masterless', 'Delay', 'Upheaval', 'Abiding Grace', 'Sorin, Vengeful Bloodlord', 'Steppe Lynx', 'Vivid Grove', 'Sulfur Falls', 'Ulcerate', 'Kitesail Freebooter', 'Hall of Oracles', 'Pain Seer', 'Throat Slitter', 'Altar of the Goyf', 'Tanglepool Bridge', 'Ground Seal', 'Chain Lightning', 'Ancient Stirrings', 'Mausoleum Secrets', 'Prosperous Thief', 'Syphon Life', 'Squadron Hawk', 'Mulldrifter', 'Glint-Sleeve Siphoner', 'Angel of Grace', 'Murderous Redcap', 'Eerie Ultimatum', 'Gateway Plaza', 'Mistcutter Hydra', 'Rishadan Dockhand', 'All That Glitters', 'Voidslime', 'Gift of Estates', 'Argentum Masticore', 'Grave Titan', 'Voldaren Pariah', 'Silumgar''s Scorn', 'Spirited Companion', 'Scattered Groves', 'Gruul Guildgate', 'Woodland Cemetery', 'Evolving Wilds', 'Bloodbraid Elf', 'Eldrazi Displacer', 'Rustvale Bridge', 'Ral, Izzet Viceroy', 'Temple of Triumph', 'Consult the Necrosages', 'Sins of the Past', 'Frostwalk Bastion', 'Herd Baloth', 'White Sun''s Zenith', 'Watcher for Tomorrow', 'Opulent Palace', 'Dimir Aqueduct', 'Changeling Outcast', 'Golgari Guildgate', 'Mindcrank', 'Needle Spires', 'Crawling Barrens', 'Dross Skullbomb', 'Falkenrath Pit Fighter', 'Far // Away', 'Harmonize', 'Sinew Sliver', 'Spell Burst', 'Dire-Strain Rampage', 'Fiery Justice', 'Kappa Tech-Wrecker', 'Lochmere Serpent', 'Brain Freeze', 'Llanowar Mentor', 'Umara Wizard', 'Knight Exemplar', 'Blanchwood Prowler', 'Neutralize', 'Myth Realized', 'Lantern-Lit Graveyard', 'Armored Scrapgorger', 'Barbed Sextant', 'Talisman of Impulse', 'Alms of the Vein', 'Thornwood Falls', 'Briarbridge Tracker', 'Nature''s Lore', 'Razortide Bridge', 'Secluded Steppe', 'Erebos''s Intervention', 'Pardic Miner', 'Groundswell', 'Tyrant of Discord', 'Psychatog', 'Fleecemane Lion', 'Surrak, the Hunt Caller', 'Buried Ruin', 'Pharika''s Cure', 'Demonic Bargain', 'Fearless Fledgling', 'Audacity', 'Flame Rift', 'Tranquil Thicket', 'Obzedat, Ghost Council', 'Silverbluff Bridge', 'Fetid Pools', 'Rootbound Crag', 'Clifftop Retreat', 'Gravelgill Duo', 'Invasion of Ergamon', 'Favored Hoplite', 'Myr Superion', 'Sheoldred''s Edict', 'Meeting of Minds', 'Viashino Pyromancer', 'Elixir of Immortality', 'Corpse Cur', 'Greater Tanuki', 'Jace Beleren', 'Fade from Memory', 'Pull from Tomorrow', 'Founding the Third Path', 'Hanweir Garrison', 'Invisible Stalker', 'Wizard''s Retort', 'Mirage Mirror', 'Seal of Cleansing', 'Valakut Exploration', 'Kjeldoran Outpost', 'Open the Gates', 'Negate', 'Titania, Protector of Argoth', 'Leonin Relic-Warder', 'Waking the Trolls', 'Shizo, Death''s Storehouse', 'Grolnok, the Omnivore', 'Arcum''s Astrolabe', 'Smother', 'Kumano Faces Kakkazan', 'Eternal Scourge', 'Tainted Indulgence', 'Tempest Djinn', 'Rakdos Charm', 'Norn''s Inquisitor', 'Big Score', 'Supreme Will', 'Terramorphic Expanse', 'Annex Sentry', 'Xerex Strobe-Knight', 'Nephalia Drownyard', 'Grenzo, Dungeon Warden', 'Boreal Shelf', 'Silent Gravestone', 'Mistblade Shinobi', 'Abzan Charm', 'Woodfall Primus', 'Halana and Alena, Partners', 'Merciless Eviction', 'Tear Asunder', 'Goblin Dark-Dwellers', 'Scab-Clan Berserker', 'Contaminated Aquifer', 'The Seedcore', 'Rally the Ancestors', 'Rift Bolt', 'Mana Leak', 'Birds of Paradise', 'Sphinx''s Herald', 'Hero''s Downfall', 'Sultai Charm', 'Control Magic', 'Obscura Storefront', 'Dead of Winter', 'Raze to the Ground', 'Rakdos Guildgate', 'Scrying Sheets', 'Aegis of the Gods', 'Timeless Dragon', 'Artisan of Kozilek', 'Combat Research', 'Fumigate', 'Gideon Jura', 'Rise and Shine', 'Dark-Dweller Oracle', 'Ruric Thar, the Unbowed', 'Remorseful Cleric', 'Jungle Shrine', 'Doom Blade', 'Elas il-Kor, Sadistic Pilgrim', 'Archaeomancer', 'Argentum Armor', 'Phyrexian Unlife', 'Sigil of the Empty Throne', 'Frost Marsh', 'Hornet Queen', 'Oath of Kaya', 'Detention Sphere', 'Pharika''s Libation', 'Benthic Biomancer', 'Hour of Promise', 'Unholy Heat', 'Forging the Anchor', 'Chief Engineer', 'Vraan, Executioner Thane', 'Exclude', 'Gutterbones', 'Stir the Grave', 'Caves of Koilos', 'Rise // Fall', 'Wasteland Strangler', 'Decree of Justice', 'Stone Rain', 'Coalition Relic', 'Folio of Fancies', 'Kiora, the Crashing Wave', 'Mindslaver', 'Graaz, Unstoppable Juggernaut', 'Tribal Flames', 'Disenchant', 'Reckoner''s Bargain', 'Trace of Abundance', 'Putrid Imp', 'Simic Guildgate', 'Odds // Ends', 'Think Twice', 'Mirror Entity', 'Blood Artist', 'Sigrid, God-Favored', 'Pulse of the Fields', 'Cleansing Wildfire', 'Nimble Obstructionist', 'Sculpting Steel', 'Stirring Wildwood', 'Merfolk Mistbinder', 'Grave Scrabbler', 'Temple of Plenty', 'Hard Evidence', 'Fire Prophecy', 'Battle of Frost and Fire', 'Fierce Empath', 'Leonin Warleader', 'Sever the Bloodline', 'Arbalest Engineers', 'Invasion of New Capenna', 'Change the Equation', 'Simian Spirit Guide', 'Silverblade Paladin', 'Tresserhorn Sinks', 'Endbringer', 'Into the Story', 'Abundant Harvest', 'Greater Gargadon', 'Azorius Guildgate', 'Vexing Shusher', 'Vampiric Rites', 'Bump in the Night', 'Invasion of Regatha', 'Oona''s Grace', 'Evangel of Synthesis', 'Mirran Crusader', 'Priest of the Haunted Edge', 'Sunpetal Grove', 'Grand Architect', 'Seal of Removal', 'Acidic Slime', 'Saproling Migration', 'Orim''s Chant', 'Scrapwork Mutt', 'Cabaretti Courtyard', 'Stromkirk Noble', 'Doomed Traveler', 'Deep Analysis', 'Volt Charge', 'Skyclave Shade', 'Strike It Rich', 'Recurring Nightmare', 'Woe Strider', 'Misery Charm', 'Dark Petition', 'Reinforced Ronin', 'Vraska''s Contempt', 'Gryff''s Boon', 'Marit Lage''s Slumber', 'Mesa Enchantress', 'Blightning', 'Snow-Covered Swamp', 'Dragon''s Hoard', 'Forsake the Worldly', 'Revitalize', 'Dreadhorde Butcher', 'Bilious Skulldweller', 'Canyon Slough', 'Frost Titan', 'Faerie Conclave', 'Stasis Snare', 'Crack the Earth', 'Quest for the Holy Relic', 'Knight of the Reliquary', 'Mystifying Maze', 'Dovin''s Acuity', 'Radha, Heart of Keld', 'Shard Volley', 'Herd Migration', 'Siege Rhino', 'Eidolon of Blossoms', 'Sinister Concoction', 'Fetid Heath', 'Shrapnel Blast', 'Blade Splicer', 'Mnemonic Sphere', 'Vessel of Nascency', 'Wilt', 'Wrath of God', 'Rakdos Cackler', 'Forked Bolt', 'Burning of Xinye', 'Guile', 'Wayward Guide-Beast', 'Summer Bloom', 'Scrabbling Claws', 'Scarab Feast', 'Figure of Destiny', 'Arch of Orazca', 'Wrench Mind', 'Servo Exhibition', 'Sea Gate Wreckage', 'Tangle', 'Night Market Lookout', 'Energy Refractor', 'Thornglint Bridge', 'Pyrite Spellbomb', 'Nightscape Familiar', 'Dauntless Bodyguard', 'Ravenous Squirrel', 'The Celestus', 'Midnight Reaper', 'Victim of Night', 'Thaumatic Compass', 'Ensoul Artifact', 'General Ferrous Rokiric', 'Worthy Knight', 'Ponder', 'Izzet Boilerworks', 'Malakir Rebirth', 'Zombie Infestation', 'Karn''s Bastion', 'Fight as One', 'Inspiring Veteran', 'Fyndhorn Elves', 'Frontier Bivouac', 'Aether Spellbomb', 'Oblivion Ring', 'Festering Newt', 'Peek', 'Cathartic Reunion', 'Ghostfire Blade', 'Yorion, Sky Nomad', 'Kor Firewalker', 'Terminate', 'Cabal Ritual', 'Grand Arbiter Augustin IV', 'Commit // Memory', 'Floriferous Vinewall', 'Spectral Shift', 'Drossforge Bridge', 'Cultivate', 'Invasion of Amonkhet', 'Haunted Fengraf', 'Idyllic Tutor', 'Empyrial Plate', 'Repeal', 'Crux of Fate', 'Silumgar, the Drifting Death', 'Snow-Covered Plains', 'Mulch', 'Heliod''s Pilgrim', 'Hypergenesis', 'Demigod of Revenge', 'Unlucky Witness', 'Grafted Butcher', 'Benalish Marshal', 'Orzhov Basilica', 'Shimmerdrift Vale', 'Gruul Turf', 'Embodiment of Fury', 'Jace, Architect of Thought', 'Smoldering Marsh', 'Canopy Vista', 'Golgari Rot Farm', 'Astral Drift', 'Master of Etherium', 'Tyrant''s Choice', 'Tribute to Hunger', 'Primal Command', 'Cold-Eyed Selkie', 'Faeburrow Elder', 'Pyretic Ritual', 'Thassa''s Intervention', 'Temple of Enlightenment', 'Magister of Worth', 'Goblin Bombardment', 'Mystical Teachings', 'Mephidross Vampire', 'Solitary Confinement', 'Dissolve', 'Orcish Lumberjack', 'Myr Battlesphere', 'Dokuchi Silencer', 'Lavaclaw Reaches', 'Tectonic Edge', 'Vedalken Heretic', 'Kogla, the Titan Ape', 'Collected Conjuring', 'Devil''s Play', 'Krosan Grip', 'Ad Nauseam', 'Aetherblade Agent', 'Wood Elves', 'Harrow', 'Nether Spirit', 'Merrow Reejerey', 'Phalanx Leader', 'Vraska''s Fall', 'Smuggler''s Copter', 'Incinerate', 'Vindicate', 'Choked Estuary', 'Brave the Elements', 'Vault of the Archangel', 'Search for Azcanta', 'Electrolyze', 'Cabal Initiate', 'Lurrus of the Dream-Den', 'Aetherspouts', 'Ardent Recruit', 'Conflagrate', 'Hissing Quagmire', 'Become Immense', 'Settle the Wreckage', 'Drainpipe Vermin', 'Burst Lightning', 'Tezzeret''s Gambit', 'Talisman of Curiosity', 'Oona, Queen of the Fae', 'Doomskar', 'Geyadrone Dihada', 'River of Tears', 'Glacial Fortress', 'Slagwoods Bridge', 'Morsel Theft', 'Utter End', 'Felidar Cub', 'Research // Development', 'Shambling Vent', 'Go for the Throat', 'Mistveil Plains', 'Pack Rat', 'Knight of the White Orchid', 'Bogbrew Witch', 'Angel of Condemnation', 'Dimir Guildgate', 'Torens, Fist of the Angels', 'Boon-Bringer Valkyrie'))) 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, 2.7, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.6 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Diffusion Sliver', 'Caldera Hellion', 'Coiling Oracle', 'Grolnok, the Omnivore', 'Stubborn Denial', 'Open the Gates', 'Loxodon Smiter', 'Merfolk Sovereign', 'Corpse Cur', 'Madcap Experiment', 'Mephidross Vampire', 'Aegis of the Gods', 'Bogardan Hellkite', 'Sphere of Safety', 'Master of Death', 'Memory Lapse', 'Declaration in Stone', 'Ghitu Lavarunner', 'Incinerate', 'Mortuary Mire', 'Obscura Storefront', 'Alms of the Vein', 'Nimble Obstructionist', 'Selesnya Guildgate', 'Touch the Spirit Realm', 'Territorial Kavu', 'Precursor Golem', 'Crawling Chorus', 'The Celestus', 'Morsel Theft', 'Sudden Edict', 'Valakut Exploration', 'Psychatog', 'Explore', 'Venser, the Sojourner', 'Mikokoro, Center of the Sea', 'Unsubstantiate', 'Wasteland Strangler', 'Executioner''s Capsule', 'Electrolyze', 'Saproling Migration', 'It That Betrays', 'Banishing Slash', 'Fae of Wishes', 'Calciform Pools', 'Raise the Alarm', 'Eldrazi Displacer', 'Kitchen Finks', 'Doomed Traveler', 'Westvale Abbey', 'Wrath of God', 'Mystical Teachings', 'Yavimaya Iconoclast', 'Judge''s Familiar', 'Ral, Storm Conduit', 'Tezzeret''s Gambit', 'Farseek', 'Jungle Hollow', 'Battlefield Forge', 'Consume the Meek', 'Ral, Izzet Viceroy', 'Cosmos Elixir', 'Mistvault Bridge', 'Always Watching', 'Ulvenwald Hydra', 'Sweltering Suns', 'Dread Wanderer', 'Dark Petition', 'Abzan Charm', 'Seal of Removal', 'Thornglint Bridge', 'Rune Snag', 'Sea-Dasher Octopus', 'Aetherblade Agent', 'Godo, Bandit Warlord', 'Blood on the Snow', 'Lotus Cobra', 'Annex Sentry', 'Augur of Skulls', 'Yahenni''s Expertise', 'Cabal Therapist', 'Volt Charge', 'Eerie Ultimatum', 'Kaya, Ghost Assassin', 'Bloodchief''s Thirst', 'Felidar Retreat', 'Yasharn, Implacable Earth', 'Zuran Orb', 'Acclaimed Contender', 'Pore Over the Pages', 'Out of Time', 'Razortide Bridge', 'Fetid Pools', 'Search for Tomorrow', 'Brainstone', 'Geomancer''s Gambit', 'Elderscale Wurm', 'Mesmeric Fiend', 'Wizard''s Retort', 'Kami of False Hope', 'Sol Talisman', 'Inspiring Veteran', 'Knight of the Reliquary', 'Astral Drift', 'Tranquil Thicket', 'Boros Guildgate', 'Earthquake', 'Delver of Secrets', 'Rift Bolt', 'Frantic Search', 'Fiery Temper', 'Vampiric Rites', 'Rally the Ancestors', 'Temple of Abandon', 'Cold-Eyed Selkie', 'Stromkirk Noble', 'Fearless Fledgling', 'Hinterland Harbor', 'Ashen Rider', 'Knight of the White Orchid', 'Vampire Neonate', 'Founding the Third Path', 'Student of Warfare', 'Assemble the Legion', 'Celestial Colonnade', 'Lightning Strike', 'Fade from Memory', 'Unholy Heat', 'Timeless Witness', 'Galerider Sliver', 'Aetherling', 'Nevermore', 'Pyrite Spellbomb', 'Angel of Despair', 'Hanweir Garrison', 'Goblin Dark-Dwellers', 'Arbalest Engineers', 'Boreal Shelf', 'Talisman of Impulse', 'Ancient Stirrings', 'Minor Misstep', 'Necrogen Spellbomb', 'Vraska''s Contempt', 'Combat Thresher', 'Destroy Evil', 'Mirran Crusader', 'Guile', 'Radha, Heart of Keld', 'Thaumatic Compass', 'Shard Volley', 'Sarkhan the Masterless', 'Stoke the Flames', 'Urban Evolution', 'Canopy Vista', 'Shambling Vent', 'Thundermaw Hellkite', 'Concealing Curtains', 'Skyclave Shade', 'Swooping Lookout', 'Into the Roil', 'General''s Enforcer', 'Hostage Taker', 'Jokulhaups', 'Mindcrank', 'Myr Superion', 'Ashnod, Flesh Mechanist', 'Night of Souls'' Betrayal', 'Kaito, Dancing Shadow', 'Stirring Wildwood', 'Repudiate // Replicate', 'Orzhov Charm', 'Revitalize', 'Groundswell', 'Caves of Koilos', 'Mistcutter Hydra', 'Weathered Wayfarer', 'Gigadrowse', 'Sarkhan, the Dragonspeaker', 'Seeker of the Way', 'Shrapnel Blast', 'Tolarian Terror', 'Angel''s Grace', 'Pardic Miner', 'Dead Weight', 'Pyroclasm', 'Tooth and Nail', 'Phalanx Leader', 'Teneb, the Harvester', 'Silver-Fur Master', 'Pain Seer', 'Think Twice', 'Lose Focus', 'Nezumi Graverobber', 'Jungle Shrine', 'Frost Marsh', 'Distended Mindbender', 'Dark Ritual', 'Ashenmoor Liege', 'Dreadhorde Butcher', 'Lazotep Chancellor', 'Temple of Deceit', 'Cathedral of War', 'Wall of Omens', 'Oni-Cult Anvil', 'Worship', 'Dire-Strain Rampage', 'Rule of Law', 'Rakdos Cackler', 'Cleansing Wildfire', 'Esper Charm', 'Stoic Rebuttal', 'Timely Reinforcements', 'Quest for the Holy Relic', 'Brokers Hideout', 'Dead // Gone', 'Mind''s Desire', 'Feed the Swarm', 'Sylvan Primordial', 'Arcbound Ravager', 'Venerated Loxodon', 'Timeless Dragon', 'Midnight Guard', 'Blighted Agent', 'Toolcraft Exemplar', 'Archaeomancer', 'Nether Spirit', 'Malcator, Purity Overseer', 'Tezzeret, Artifice Master', 'Joint Exploration', 'Cultivate', 'Wrenn''s Resolve', 'Engulf the Shore', 'Lost Legacy', 'Dark-Dweller Oracle', 'Search for Azcanta', 'Hesitation', 'Lurrus of the Dream-Den', 'Worthy Knight', 'River of Tears', 'Snow-Covered Swamp', 'Pyretic Ritual', 'Ishkanah, Grafwidow', 'Reckoner''s Bargain', 'Voltage Surge', 'Slagwoods Bridge', 'Altar of the Brood', 'Ponder', 'Faerie Vandal', 'Triumphant Adventurer', 'Golgari Guildgate', 'Negate', 'Anafenza, the Foremost', 'Chief Engineer', 'Scattered Groves', 'Azorius Charm', 'Otherworldly Journey', 'Kumano Faces Kakkazan', 'Devil''s Play', 'Thragtusk', 'Ranger of Eos', 'Arcane Sanctum', 'Fyndhorn Elves', 'Shape Anew', 'Makeshift Mannequin', 'Orzhov Guildgate', 'Duneblast', 'Secluded Steppe', 'Kor Skyfisher', 'Herd Baloth', 'Destiny Spinner', 'Froghemoth', 'Vivid Crag', 'Molten Tributary', 'Voldaren Pariah', 'Tangled Islet', 'Master of Etherium', 'Avacyn''s Pilgrim', 'Phyrexian Dreadnought', 'Obzedat, Ghost Council', 'Forbidden Alchemy', 'Gadrak, the Crown-Scourge', 'Day of Judgment', 'Gideon Jura', 'Surrak, the Hunt Caller', 'Chittering Rats', 'Throat Slitter', 'Stone Rain', 'Etherium Sculptor', 'Invasion of Zendikar', 'Bloodsoaked Champion', 'Watcher for Tomorrow', 'Dokuchi Silencer', 'Raze to the Ground', 'Karumonix, the Rat King', 'Stern Dismissal', 'Abundant Growth', 'Dream Trawler', 'Fracturing Gust', 'Nephalia Drownyard', 'Dissipate', 'Rustvale Bridge', 'Healer''s Hawk', 'Rakdos''s Return', 'Norn''s Inquisitor', 'Rootbound Crag', 'Delay', 'Recurring Nightmare', 'Venser, Corpse Puppet', 'Detention Sphere', 'Sandwurm Convergence', 'Grand Architect', 'Silundi Vision', 'Bump in the Night', 'Dragon''s Hoard', 'Kefnet the Mindful', 'Ancient Ziggurat', 'Cloudpost', 'Argentum Armor', 'Audacity', 'Faerie Conclave', 'Magister of Worth', 'Scab-Clan Berserker', 'World Shaper', 'Blanchwood Prowler', 'Simian Spirit Guide', 'Sheoldred''s Edict', 'Putrefy', 'Graven Cairns', 'Cabal Initiate', 'Sinister Concoction', 'Heartless Act', 'Satyr Wayfinder', 'Graven Lore', 'Astral Slide', 'Kessig Wolf Run', 'Dread Return', 'Sign in Blood', 'Vivid Marsh', 'Brain Freeze', 'Orzhov Basilica', 'Call of the Death-Dweller', 'Call to the Grave', 'Gruul Turf', 'Terastodon', 'Gnat Miser', 'Lavaclaw Reaches', 'Steppe Lynx', 'Halana and Alena, Partners', 'Sorin, Vengeful Bloodlord', 'Condemn', 'Needle Spires', 'Champion of Wits', 'Frontier Bivouac', 'Heliod''s Pilgrim', 'Sigrid, God-Favored', 'Draugr Necromancer', 'Crack the Earth', 'Festering Newt', 'The Birth of Meletis', 'Oracle of Mul Daya', 'Waking the Trolls', 'Game Trail', 'White Sun''s Zenith', 'Angrath, the Flame-Chained', 'Cauldron Familiar', 'Psychic Possession', 'Neutralize', 'Temple of Enlightenment', 'Vines of Vastwood', 'Brave the Sands', 'Price of Progress', 'Idyllic Beachfront', 'Vexing Shusher', 'Smoldering Marsh', 'Control Magic', 'Energy Refractor', 'Angel of Grace', 'Graaz, Unstoppable Juggernaut', 'Chain Lightning', 'Ambush Viper', 'Spatial Contortion', 'Brineborn Cutthroat', 'Exclude', 'Blood Artist', 'Racers'' Ring', 'Nissa, Steward of Elements', 'Nested Shambler', 'Grave Scrabbler', 'Elite Inquisitor', 'Black Sun''s Zenith', 'Barbarian Ring', 'Wrench Mind', 'Obliterate', 'Thrash // Threat', 'Saffi Eriksdotter', 'Tribal Flames', 'Grave Titan', 'Zombie Infestation', 'Dragonskull Summit', 'Tainted Indulgence', 'Azorius Guildgate', 'Commune with the Gods', 'Arch of Orazca', 'Garruk Wildspeaker', 'Maelstrom Pulse', 'Tyrant of Discord', 'Duplicant', 'Prologue to Phyresis', 'Hyena Umbra', 'Treasure Cruise', 'Glint-Sleeve Siphoner', 'Settle the Wreckage', 'Mirage Mirror', 'Grenzo, Dungeon Warden', 'Koth, Fire of Resistance', 'Bring the Ending', 'Angel of Condemnation', 'Sinew Sliver', 'Nightscape Familiar', 'Krosan Grip', 'Pariah', 'Basking Rootwalla', 'Darksteel Citadel', 'Drown in Ichor', 'Mastermind''s Acquisition', 'Spell Burst', 'Xerex Strobe-Knight', 'Tear Asunder', 'Invigorate', 'Restoration Angel', 'Elvish Visionary', 'Serra Ascendant', 'Hope of Ghirapur', 'Tendo Ice Bridge', 'Umara Wizard', 'Undying Evil', 'Marit Lage''s Slumber', 'Stinkdrinker Bandit', 'Nimble Trapfinder', 'Succumb to Temptation', 'Ghostfire Blade', 'Temple of Plenty', 'Mina and Denn, Wildborn', 'Careful Cultivation', 'Commence the Endgame', 'Kogla, the Titan Ape', 'Ghostly Flicker', 'Stinkweed Imp', 'Frenetic Sliver', 'Tendrils of Agony', 'Thornwood Falls', 'Ignite Memories', 'Surge of Salvation', 'Raffine''s Informant', 'Pull from Tomorrow', 'Fact or Fiction', 'Research // Development', 'Fire Prophecy', 'Sylvan Scrying', 'See Beyond', 'Elas il-Kor, Sadistic Pilgrim', 'Strike It Rich', 'Baneful Omen', 'Overgrowth', 'Union of the Third Path', 'Honor of the Pure', 'Into the Story', 'Greater Gargadon', 'Night Market Lookout', 'Phoenix Chick', 'Gideon''s Intervention', 'Protect the Negotiators', 'Dauntless Bodyguard', 'Commit // Memory', 'Consult the Necrosages', 'Argentum Masticore', 'Mesa Enchantress', 'Sunblade Samurai', 'Mouth of Ronom', 'The Scorpion God', 'Geothermal Bog', 'Canyon Slough', 'Misery Charm', 'Glorybringer', 'Hero of Bladehold', 'Forging the Anchor', 'Time of Need', 'Inscribed Tablet', 'The Flame of Keld', 'Elvish Rejuvenator', 'Bloodbraid Elf', 'The Underworld Cookbook', 'Cabal Ritual', 'Dimir Aqueduct', 'Chandra, Flamecaller', 'Divinity of Pride', 'Phyrexian Revoker', 'Sylvan Caryatid', 'Battle of Wits', 'Abundant Harvest', 'Devious Cover-Up', 'Viscera Seer', 'Chamber Sentry', 'Epic Experiment', 'Remorseful Cleric', 'Drossforge Bridge', 'Second Sunrise', 'Kjeldoran Outpost', 'Briarbridge Tracker', 'Deprive', 'Changeling Outcast', 'Carven Caryatid', 'Quiet Speculation', 'Myth Realized', 'Invoke Calamity', 'Martyr of Sands', 'Smuggler''s Copter', 'Change the Equation', 'Vindicate', 'Archon of Sun''s Grace', 'Abiding Grace', 'Turnabout', 'Sylvan Advocate', 'Bolas''s Citadel', 'Shizo, Death''s Storehouse', 'Hard Evidence', 'Priest of the Haunted Edge', 'Woodland Cemetery', 'Blazing Rootwalla', 'Sunken Hollow', 'Venerable Knight', 'Melira, the Living Cure', 'Voidwing Hybrid', 'Prosperous Thief', 'Ossification', 'Sin Collector', 'Phantasmal Image', 'Big Score', 'Ad Nauseam', 'Xenagos, the Reveler', 'Gnawing Vermin', 'Rise and Shine', 'Silverblade Paladin', 'Falkenrath Pit Fighter', 'Evolving Wilds', 'Yawgmoth''s Bargain', 'Seismic Assault', 'Silumgar, the Drifting Death', 'Giant Killer', 'Network Disruptor', 'Hall of Oracles', 'Idyllic Tutor', 'Gods Willing', 'Kunoros, Hound of Athreos', 'Dissolve', 'Solitary Confinement', 'Castigate', 'Rise // Fall', 'Plated Geopede', 'Haunted Mire', 'Bone Shards', 'Golgari Rot Farm', 'Tidespout Tyrant', 'Wayward Guide-Beast', 'Thawing Glaciers', 'Bloodline Keeper', 'Squee, Goblin Nabob', 'Genesis Ultimatum', 'Rakdos Guildgate', 'Arcum''s Astrolabe', 'Sultai Charm', 'Kruphix''s Insight', 'Mystifying Maze', 'Stupor', 'Curiosity', 'Oblivion Ring', 'Ghostly Pilferer', 'Ancient Amphitheater', 'Wilt', 'Early Harvest', 'Glaring Aegis', 'Hypergenesis', 'Hour of Promise', 'Thassa''s Intervention', 'Endless Horizons', 'Bitter Reunion', 'Arlinn Kord', 'Ayara, First of Locthwain', 'Hieroglyphic Illumination', 'Sin Prodder', 'Ground Seal', 'Repeal', 'Supreme Will', 'Ornithopter', 'Sunstrike Legionnaire', 'Cremate', 'Floriferous Vinewall', 'Dross Skullbomb', 'Contaminated Aquifer', 'Jukai Naturalist', 'Vessel of Nascency', 'Goblin Bombardment', 'Bubbling Cauldron', 'Oona''s Prowler', 'Ensoul Artifact', 'The Seedcore', 'Heap Doll', 'Malicious Malfunction', 'Buried Ruin', 'Faeburrow Elder', 'Lantern-Lit Graveyard', 'Barbed Sextant', 'Seal of Cleansing', 'Runed Halo', 'Aetherspouts', 'Consuming Vapors', 'Commune with Nature', 'Patchwork Automaton', 'Circular Logic', 'Agonizing Remorse', 'Sunlit Marsh', 'Mindslaver', 'Orim''s Chant', 'Gruul Guildgate', 'Ondu Inversion', 'Bubbling Muck', 'Stasis Snare', 'Tribute to Horobi', 'Fumigate', 'Leonin Warleader', 'Akoum Hellhound', 'Malakir Rebirth', 'Vraan, Executioner Thane', 'Demigod of Revenge', 'Combat Research', 'Drowned Catacomb', 'Nimble Larcenist', 'Sculpting Steel', 'Wood Elves', 'Wild Cantor', 'Eternal Scourge', 'Anger of the Gods', 'Temple of Silence', 'Tidehollow Sculler', 'Collected Conjuring', 'Elves of Deep Shadow', 'Nekrataal', 'Pack Rat', 'Aquitect''s Will', 'Syphon Life', 'Gryff''s Boon', 'Become Immense', 'Benalish Marshal', 'Cabaretti Courtyard', 'Port Town', 'Colossal Skyturtle', 'Tempest Djinn', 'Darksteel Colossus', 'Chandra, Fire Artisan', 'Illuminator Virtuoso', 'Harrow', 'Phyrexian Censor', 'Open the Armory', 'Inkwell Leviathan', 'Haunted Fengraf', 'Drowned Rusalka', 'Isolated Chapel', 'Flooded Grove', 'Sea Gate Wreckage', 'Spell Pierce', 'Valiant Changeling', 'Drainpipe Vermin', 'Grand Arbiter Augustin IV', 'Benevolent Bodyguard', 'Universal Automaton', 'Sleight of Hand', 'Torens, Fist of the Angels', 'Frost Titan', 'Oath of Kaya', 'Vadrik, Astral Archmage', 'Herd Migration', 'Folio of Fancies', 'Leonin Relic-Warder', 'Scarab Feast', 'Angel of Serenity', 'Blightbelly Rat', 'Fetid Heath', 'Nimbus Maze', 'Raging Ravine', 'Gallia of the Endless Dance', 'Vampire Hexmage', 'Altar of the Goyf', 'Tectonic Edge', 'Kitchen Imp', 'Dimir Guildgate', 'Gather the Pack', 'Siege Rhino', 'Deep Analysis', 'Doom Blade', 'Aether Spellbomb', 'Gruul Spellbreaker', 'Kor Firewalker', 'Arbor Elf', 'Maze''s End', 'Upheaval', 'Zur''s Weirding', 'Cathartic Reunion', 'Renewed Faith', 'Ardent Recruit', 'Rampant Growth', 'Cataclysmic Gearhulk', 'Shatter the Sky', 'Eternal Dragon', 'Quicken', 'Felidar Cub', 'Lay Down Arms', 'Deep Forest Hermit', 'Mirror Entity', 'Jace, Architect of Thought', 'All That Glitters', 'Assault // Battery', 'Sulfur Falls', 'Raven''s Crime', 'Thraben Inspector', 'Realm Razer', 'Faith''s Reward', 'Empyrial Plate', 'Ghost Quarter', 'Prophetic Prism', 'Ethereal Armor', 'Merciless Eviction', 'Purify the Grave', 'Hero of Oxid Ridge', 'Terramorphic Expanse', 'Winds of Abandon', 'Cloudshift', 'Temple of Mystery', 'Vigor', 'Springleaf Drum', 'Late to Dinner', 'Sterling Grove', 'Vedalken Heretic', 'Anguished Unmaking', 'Wolfbriar Elemental', 'Oona''s Grace', 'Lingering Souls', 'Enchantress''s Presence', 'Mazemind Tome', 'Wooded Bastion', 'Leonin Arbiter', 'Sprite Dragon', 'Burst Lightning', 'Utter End', 'Hooting Mandrills', 'Midnight Reaper', 'Llanowar Mentor', 'Merfolk Mistbinder', 'Invasion of Azgol', 'Commune with Spirits', 'Sigil of the Empty Throne', 'Kiora, the Crashing Wave', 'Dying to Serve', 'Glamerdye', 'Greater Tanuki', 'Hissing Quagmire', 'Rakdos Charm', 'Fiery Justice', 'Oona, Queen of the Fae', 'General Ferrous Rokiric', 'Cryptic Caves', 'Pharika''s Libation', 'Tanglepool Bridge', 'Voidslime', 'Dryad Militant', 'Forked Bolt', 'Servo Exhibition', 'Scuttling Doom Engine', 'Armored Scrapgorger', 'Tilling Treefolk', 'Fight as One', 'Pharika''s Cure', 'Zephyr Singer', 'Nezahal, Primal Tide', 'Gravelgill Duo', 'Far // Away', 'Genesis Hydra', 'Gift of Estates', 'Harmonize', 'Yavimaya Coast', 'Twinshot Sniper', 'Lavinia of the Tenth', 'Grim Haruspex', 'Stir the Grave', 'Notorious Throng', 'Vivid Grove', 'Mistblade Shinobi', 'Nissa, Worldwaker', 'Riveteers Overlook', 'Fleecemane Lion', 'Bilious Skulldweller', 'Kitesail Freebooter', 'Orcish Lumberjack', 'Invasion of Ergamon', 'Lonely Sandbar', 'Summer Bloom', 'Scrapheap Scrounger', 'Invasion of New Capenna', 'Spectral Shift', 'Seal of Fire', 'Rotting Rats', 'Sandsteppe Citadel', 'Ivy Lane Denizen', 'Big Game Hunter', 'Slogurk, the Overslime', 'Forsake the Worldly', 'Disallow', 'Cut Down', 'Steel Overseer', 'Sever the Bloodline', 'Tomebound Lich', 'Squadron Hawk', 'Sculpted Perfection', 'Secluded Courtyard', 'Conflagrate', 'Izzet Charm', 'Temple of Triumph', 'Peek', 'Cloudshredder Sliver', 'Trace of Abundance', 'Doomskar', 'Llanowar Augur', 'Titania, Protector of Argoth', 'Dakkon, Shadow Slayer', 'Snow-Covered Mountain', 'Vampire Lacerator', 'Glacial Fortress', 'Flaying Tendrils', 'Sylvan Library', 'Ravenous Squirrel', 'Glistener Elf', 'Fruit of Tizerus', 'Knight of Glory', 'Sins of the Past', 'Grafted Butcher', 'Nature''s Lore', 'Duress', 'Myr Battlesphere', 'Eiganjo Castle', 'Chandra, Pyromaster', 'Altered Ego', 'Hideous End', 'Reflector Mage', 'Victim of Night', 'Diabolic Tutor', 'Experimental Synthesizer', 'Tyrant''s Choice', 'Clifftop Retreat', 'Wanderwine Hub', 'Gateway Plaza', 'Chief of the Foundry', 'Riveteers Charm', 'Inevitable Betrayal', 'Monument to Perfection', 'Ertai''s Scorn', 'Vault Skirge', 'Solemnity', 'Karn''s Bastion', 'Viashino Pyromancer', 'Impulse', 'Gitaxian Probe', 'Tocatli Honor Guard', 'Invasion of Regatha', 'Evangel of Synthesis', 'Ichorclaw Myr', 'Archangel of Wrath', 'Silent Gravestone', 'Bituminous Blast', 'Eidolon of Blossoms', 'Invasion of Amonkhet', 'Graveborn Muse', 'Figure of Destiny', 'Frostwalk Bastion', 'Circuit Mender', 'Smother', 'Woodfall Primus', 'Hypnotic Specter', 'Mnemonic Sphere', 'Elixir of Immortality', 'Kiora Bests the Sea God', 'Tangle', 'Presence of Gond', 'Heliod''s Intervention', 'Seething Song', 'Blessed Alliance', 'Wonder', 'Vault of the Archangel', 'Reinforced Ronin', 'Odds // Ends', 'Izzet Guildgate', 'Mishra''s Factory', 'Shimmerdrift Vale', 'Sacred Peaks', 'Disrupting Shoal', 'Increasing Ambition', 'Sphinx''s Herald', 'Boon-Bringer Valkyrie', 'Deafening Clarion', 'Dispatch', 'Talisman of Curiosity', 'Hero''s Downfall', 'Glimpse of Tomorrow', 'Unstable Mutation', 'Oust', 'Tide Shaper', 'Rites of Spring', 'Izzet Boilerworks', 'Tocasia''s Dig Site', 'Mana Leak', 'Unctus, Grand Metatect', 'Rites of Initiation', 'Voyaging Satyr', 'Demolition Field', 'Marble Diamond', 'Nomad Outpost', 'Fertile Ground', 'Marauding Blight-Priest', 'Resurgent Belief', 'Opulent Palace', 'Bogbrew Witch', 'Invisible Stalker', 'Mothdust Changeling', 'Ivory Tower', 'Verduran Enchantress', 'Yorion, Sky Nomad', 'Crawling Barrens', 'Predatory Sliver', 'Primal Command', 'Ramunap Excavator', 'Sunscour', 'Bala Ged Recovery', 'Murderous Redcap', 'Temple of Malady', 'Gift of Immortality', 'Goblin Electromancer', 'Pillar of the Paruns', 'Brave the Elements', 'Archangel Avacyn', 'Rishadan Dockhand', 'Merrow Reejerey', 'Choked Estuary', 'Ammit Eternal', 'Putrid Imp', 'Arguel''s Blood Fast', 'Ogre Slumlord', 'Shardless Agent', 'Discovery // Dispersal', 'Green Sun''s Twilight', 'Knight of New Alara', 'Third Path Iconoclast', 'Blade Splicer', 'Frantic Inventory', 'Scour All Possibilities', 'Summary Dismissal', 'Oracle of Tragedy', 'Dismal Backwater', 'Mindsplice Apparatus', 'Shivan Reef', 'Meeting of Minds', 'Elemental Masterpiece', 'Vryn Wingmare', 'Terminus', 'Disenchant', 'Spoils of the Vault', 'Sire of Insanity', 'Ovika, Enigma Goliath', 'Woe Strider', 'Porphyry Nodes', 'Icehide Golem', 'Goldmire Bridge', 'Crux of Fate', 'Silverbluff Bridge', 'Progenitor Exarch', 'Whispersilk Cloak', 'Botanical Plaza', 'Quarantine Field', 'Kappa Tech-Wrecker', 'Moderation', 'Council''s Judgment', 'Empyrial Armor', 'Teferi, Mage of Zhalfir', 'Smallpox', 'Go for the Throat', 'Rix Maadi Reveler', 'Mausoleum Secrets', 'Memoricide', 'Lodestone Golem', 'Obstinate Baloth', 'Bloodchief Ascension', 'Gutterbones', 'Knight Exemplar', 'Evacuation', 'Mulch', 'Lochmere Serpent', 'Kambal, Consul of Allocation', 'Vapor Snag', 'Coalition Relic', 'Sunpetal Grove', 'Blightning', 'Dawn of Hope', 'Bident of Thassa', 'Benthic Biomancer', 'Faerie Miscreant', 'Distorted Curiosity', 'Endbringer', 'Tomik, Distinguished Advokist', 'Dregscape Zombie', 'Desperate Ritual', 'Drake Haven', 'Scrabbling Claws', 'Geyadrone Dihada', 'Thopter Spy Network', 'Decree of Justice', 'Mulldrifter', 'Shriekmaw', 'Encroaching Wastes', 'Scrapwork Mutt', 'Rocco, Cabaretti Caterer', 'Sheltered Thicket', 'Nullpriest of Oblivion', 'Ethersworn Sphinx', 'Maestros Charm', 'Shimmer Dragon', 'Labyrinth of Skophos', 'Experimental Augury', 'Bloodvial Purveyor', 'Dimensional Infiltrator', 'Forgotten Cave', 'Phyrexian Unlife', 'Venser, Shaper Savant', 'Throne of the God-Pharaoh', 'Herald of the Pantheon', 'Fierce Empath', 'Silumgar''s Scorn', 'Pulse of the Fields', 'Acidic Slime', 'Unmarked Grave', 'Urza''s Factory', 'Narcomoeba', 'Llanowar Elves', 'Grimoire Thief', 'Rust Goliath', 'Soltari Priest', 'Polukranos, World Eater', 'Ruric Thar, the Unbowed', 'Unburial Rites', 'Dusk // Dawn', 'Sea Gate Oracle', 'Jwari Disruption', 'Kabira Takedown', 'Vampire Nighthawk', 'Huatli, Radiant Champion', 'Forbid', 'Murmuring Bosk', 'Artistic Refusal', 'Check for Traps', 'Moon-Circuit Hacker', 'Rain of Tears', 'Obscura Charm', 'Nameless Inversion', 'Simic Guildgate', 'Thrill of Possibility', 'Blight Mamba', 'Artisan of Kozilek', 'Platinum Angel', 'Barter in Blood', 'Jace Beleren', 'Farhaven Elf', 'Tresserhorn Sinks', 'Approach of the Second Sun', 'Birds of Paradise', 'Might of Old Krosa', 'Mistveil Plains', 'Burning of Xinye', 'Ayli, Eternal Pilgrim', 'Ulcerate', 'Helm of the Host', 'Snow-Covered Plains', 'Demonic Bargain', 'Favored Hoplite', 'Battle of Frost and Fire', 'Embodiment of Fury', 'King Darien XLVIII', 'Triskelion', 'Fallaji Archaeologist', 'Corrupted Conviction', 'Shred Memory', 'Nine Lives', 'Slaughter Pact', 'Moorland Haunt', 'Witching Well', 'Gleeful Demolition', 'Terminate', 'Flame Rift', 'Luminarch Ascension', 'Vraska''s Fall', 'Glimmerpost', 'Dead of Winter', 'Grand Abolisher', 'Hornet Queen', 'Unlucky Witness', 'Tribute to Hunger', 'Dovin''s Acuity', 'Ephara, God of the Polis', 'Spirited Companion', 'Scrying Sheets', 'Erebos''s Intervention'))) 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, 2.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.6 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Duneblast', 'Krosan Grip', 'Triumphant Adventurer', 'Quest for the Holy Relic', 'Pore Over the Pages', 'Worthy Knight', 'Frost Marsh', 'Tyrant of Discord', 'Weathered Wayfarer', 'The Seedcore', 'Sol Talisman', 'Sunlit Marsh', 'Dark Ritual', 'Gift of Estates', 'Declaration in Stone', 'Seal of Removal', 'Garruk Wildspeaker', 'Sculpting Steel', 'Smoldering Marsh', 'Green Sun''s Twilight', 'Kitesail Freebooter', 'Stubborn Denial', 'Woodland Cemetery', 'Archaeomancer', 'Rakdos Charm', 'Shriekmaw', 'Dimir Guildgate', 'Moon-Circuit Hacker', 'Lingering Souls', 'Lurrus of the Dream-Den', 'Unstable Mutation', 'Vivid Marsh', 'Opulent Palace', 'Raise the Alarm', 'Mindslaver', 'Check for Traps', 'Zur''s Weirding', 'Corpse Cur', 'Mastermind''s Acquisition', 'Anafenza, the Foremost', 'Maelstrom Pulse', 'Consume the Meek', 'Vampire Neonate', 'Myr Superion', 'Night of Souls'' Betrayal', 'Elves of Deep Shadow', 'Nimbus Maze', 'Brokers Hideout', 'Hissing Quagmire', 'Hero of Bladehold', 'Thraben Inspector', 'Wasteland Strangler', 'Night Market Lookout', 'Talisman of Curiosity', 'Kefnet the Mindful', 'Distended Mindbender', 'Throne of the God-Pharaoh', 'Assemble the Legion', 'Third Path Iconoclast', 'Harrow', 'Yahenni''s Expertise', 'Tyrant''s Choice', 'Vryn Wingmare', 'Forked Bolt', 'Crawling Chorus', 'Resurgent Belief', 'Invisible Stalker', 'Exclude', 'Merfolk Sovereign', 'Barbed Sextant', 'Izzet Guildgate', 'Rocco, Cabaretti Caterer', 'Champion of Wits', 'Shred Memory', 'Solemnity', 'Ovika, Enigma Goliath', 'Nissa, Steward of Elements', 'Raffine''s Informant', 'Groundswell', 'Saffi Eriksdotter', 'Ghostfire Blade', 'Arcum''s Astrolabe', 'Yavimaya Coast', 'Needle Spires', 'Maze''s End', 'Search for Tomorrow', 'Thopter Spy Network', 'Rootbound Crag', 'Angel of Condemnation', 'Silundi Vision', 'Aether Spellbomb', 'Tempest Djinn', 'Castigate', 'Rites of Initiation', 'Heartless Act', 'Nether Spirit', 'Vivid Grove', 'Ravenous Squirrel', 'Benevolent Bodyguard', 'Wall of Omens', 'Combat Thresher', 'Temple of Plenty', 'Artisan of Kozilek', 'Sunblade Samurai', 'Fruit of Tizerus', 'Benalish Marshal', 'Late to Dinner', 'Snow-Covered Mountain', 'Maestros Charm', 'Grave Titan', 'Shimmerdrift Vale', 'Yavimaya Iconoclast', 'Altar of the Brood', 'Norn''s Inquisitor', 'Nimble Trapfinder', 'Fire Prophecy', 'Ephara, God of the Polis', 'Pyroclasm', 'Hinterland Harbor', 'Mirage Mirror', 'Founding the Third Path', 'Vadrik, Astral Archmage', 'Fetid Heath', 'Shivan Reef', 'Dragon''s Hoard', 'Koth, Fire of Resistance', 'Invasion of Zendikar', 'Hypnotic Specter', 'Moderation', 'Stir the Grave', 'Hideous End', 'Ivory Tower', 'Priest of the Haunted Edge', 'Altered Ego', 'Drossforge Bridge', 'Kunoros, Hound of Athreos', 'Mazemind Tome', 'Sigrid, God-Favored', 'Blighted Agent', 'Dakkon, Shadow Slayer', 'Haunted Mire', 'Tocasia''s Dig Site', 'Cosmos Elixir', 'Cremate', 'Abzan Charm', 'Malicious Malfunction', 'Pariah', 'All That Glitters', 'Burning of Xinye', 'Wanderwine Hub', 'Caldera Hellion', 'Eiganjo Castle', 'Minor Misstep', 'Stoic Rebuttal', 'Ondu Inversion', 'Peek', 'Saproling Migration', 'Ensoul Artifact', 'Ancient Amphitheater', 'Obscura Storefront', 'Acidic Slime', 'Stupor', 'Black Sun''s Zenith', 'Fade from Memory', 'Nevermore', 'Blood Artist', 'Blanchwood Prowler', 'Orcish Lumberjack', 'Devious Cover-Up', 'Watcher for Tomorrow', 'Pulse of the Fields', 'Desperate Ritual', 'Venser, the Sojourner', 'Temple of Malady', 'Farseek', 'Drowned Catacomb', 'Sylvan Caryatid', 'Arguel''s Blood Fast', 'Dead Weight', 'Commence the Endgame', 'Carven Caryatid', 'Devil''s Play', 'Frantic Inventory', 'Elvish Visionary', 'Viashino Pyromancer', 'Distorted Curiosity', 'Yawgmoth''s Bargain', 'Glacial Fortress', 'Mouth of Ronom', 'Frost Titan', 'Thundermaw Hellkite', 'Squadron Hawk', 'Quiet Speculation', 'Unlucky Witness', 'Duplicant', 'Bident of Thassa', 'Endbringer', 'Sandwurm Convergence', 'Evacuation', 'River of Tears', 'Dismal Backwater', 'Karn''s Bastion', 'General''s Enforcer', 'Knight of the Reliquary', 'Leonin Relic-Warder', 'Geothermal Bog', 'Tranquil Thicket', 'Research // Development', 'Jwari Disruption', 'Scrapwork Mutt', 'Thornglint Bridge', 'The Underworld Cookbook', 'Bolas''s Citadel', 'Arch of Orazca', 'Seal of Cleansing', 'Mistvault Bridge', 'Psychic Possession', 'Glimmerpost', 'Rix Maadi Reveler', 'Fallaji Archaeologist', 'Tomebound Lich', 'Purify the Grave', 'Wrath of God', 'Platinum Angel', 'Seething Song', 'Sudden Edict', 'Briarbridge Tracker', 'Unburial Rites', 'Kabira Takedown', 'Elderscale Wurm', 'Eerie Ultimatum', 'Dead // Gone', 'Mulldrifter', 'Raze to the Ground', 'Kitchen Finks', 'Glint-Sleeve Siphoner', 'Ashnod, Flesh Mechanist', 'Terminus', 'Endless Horizons', 'Ancient Ziggurat', 'Wolfbriar Elemental', 'Dross Skullbomb', 'Pardic Miner', 'Kor Skyfisher', 'Strike It Rich', 'Thragtusk', 'Chittering Rats', 'Sin Prodder', 'Oracle of Mul Daya', 'White Sun''s Zenith', 'Psychatog', 'Doomed Traveler', 'Ramunap Excavator', 'Game Trail', 'Lonely Sandbar', 'Seeker of the Way', 'Smother', 'Throat Slitter', 'Morsel Theft', 'Glorybringer', 'Sin Collector', 'Figure of Destiny', 'Aetherspouts', 'Invasion of Azgol', 'Disenchant', 'Volt Charge', 'Dragonskull Summit', 'Cabaretti Courtyard', 'Sandsteppe Citadel', 'Wooded Bastion', 'Embodiment of Fury', 'Wilt', 'Geomancer''s Gambit', 'Diffusion Sliver', 'Executioner''s Capsule', 'Dream Trawler', 'Kiora, the Crashing Wave', 'Arbalest Engineers', 'Nightscape Familiar', 'Scuttling Doom Engine', 'Blightning', 'Thawing Glaciers', 'Xerex Strobe-Knight', 'Mausoleum Secrets', 'Radha, Heart of Keld', 'Smallpox', 'Inspiring Veteran', 'Thaumatic Compass', 'Gideon Jura', 'Demolition Field', 'Memory Lapse', 'Turnabout', 'Phantasmal Image', 'Tide Shaper', 'Huatli, Radiant Champion', 'Frenetic Sliver', 'Springleaf Drum', 'Dregscape Zombie', 'Renewed Faith', 'Hanweir Garrison', 'Protect the Negotiators', 'Big Score', 'Malakir Rebirth', 'Scrapheap Scrounger', 'Bogbrew Witch', 'Sunpetal Grove', 'Ghost Quarter', 'Verduran Enchantress', 'Silumgar''s Scorn', 'Scarab Feast', 'Raging Ravine', 'Boreal Shelf', 'Gryff''s Boon', 'Eternal Scourge', 'Network Disruptor', 'Dryad Militant', 'Melira, the Living Cure', 'Aquitect''s Will', 'Prophetic Prism', 'Stromkirk Noble', 'Shard Volley', 'The Flame of Keld', 'Mulch', 'Midnight Guard', 'Graveborn Muse', 'Leonin Arbiter', 'Agonizing Remorse', 'Slaughter Pact', 'Explore', 'Satyr Wayfinder', 'Teferi, Mage of Zhalfir', 'Surge of Salvation', 'Bubbling Cauldron', 'Blazing Rootwalla', 'Early Harvest', 'Snow-Covered Plains', 'Battle of Frost and Fire', 'Tendo Ice Bridge', 'Commune with Spirits', 'Memoricide', 'Tainted Indulgence', 'Selesnya Guildgate', 'World Shaper', 'Wild Cantor', 'Hall of Oracles', 'Vigor', 'Westvale Abbey', 'Bogardan Hellkite', 'Honor of the Pure', 'Oni-Cult Anvil', 'Anguished Unmaking', 'Riveteers Overlook', 'Venerable Knight', 'Elas il-Kor, Sadistic Pilgrim', 'Herd Baloth', 'Artistic Refusal', 'Sigil of the Empty Throne', 'Remorseful Cleric', 'Eldrazi Displacer', 'Secluded Steppe', 'Scour All Possibilities', 'Wizard''s Retort', 'Steel Overseer', 'Wood Elves', 'Abundant Growth', 'Lost Legacy', 'Audacity', 'Disrupting Shoal', 'Concealing Curtains', 'Myr Battlesphere', 'Consuming Vapors', 'Marit Lage''s Slumber', 'Mnemonic Sphere', 'Graven Cairns', 'Cauldron Familiar', 'Frontier Bivouac', 'Snow-Covered Swamp', 'Dark Petition', 'Nine Lives', 'Canopy Vista', 'Always Watching', 'Decree of Justice', 'Jokulhaups', 'Greater Gargadon', 'Tezzeret, Artifice Master', 'Jukai Naturalist', 'Phyrexian Censor', 'Second Sunrise', 'Bloodvial Purveyor', 'Arbor Elf', 'Heap Doll', 'Woe Strider', 'Fearless Fledgling', 'Rule of Law', 'Coiling Oracle', 'Midnight Clock', 'Sea-Dasher Octopus', 'Lavinia of the Tenth', 'Thornwood Falls', 'Touch the Spirit Realm', 'Icehide Golem', 'Victim of Night', 'Brave the Elements', 'Orim''s Chant', 'Discovery // Dispersal', 'Flaying Tendrils', 'Blightbelly Rat', 'Izzet Charm', 'Bloodchief Ascension', 'Mina and Denn, Wildborn', 'Mystifying Maze', 'Marble Diamond', 'Gallia of the Endless Dance', 'Kor Firewalker', 'Pull from Tomorrow', 'Tidehollow Sculler', 'Vindicate', 'Burst Lightning', 'Floriferous Vinewall', 'Boros Guildgate', 'Stasis Snare', 'Kjeldoran Outpost', 'Bone Shards', 'Grave Scrabbler', 'Grand Abolisher', 'Mystical Teachings', 'Illuminator Virtuoso', 'Nature''s Lore', 'Collected Conjuring', 'Gruul Turf', 'Armored Scrapgorger', 'Felidar Retreat', 'Go for the Throat', 'Notorious Throng', 'Dovin''s Acuity', 'Greater Tanuki', 'Drown in Ichor', 'Cut Down', 'Flooded Grove', 'Glimpse of Tomorrow', 'Inkwell Leviathan', 'Dispatch', 'Madcap Experiment', 'Sunken Hollow', 'Patchwork Automaton', 'King Darien XLVIII', 'Soltari Priest', 'Bloodbraid Elf', 'Cloudshredder Sliver', 'Timely Reinforcements', 'Increasing Ambition', 'Gnat Miser', 'Change the Equation', 'Anger of the Gods', 'Dissolve', 'Unmarked Grave', 'Oblivion Ring', 'Dread Wanderer', 'Pack Rat', 'Ichorclaw Myr', 'Siege Rhino', 'Summary Dismissal', 'Wonder', 'Temple of Mystery', 'Karumonix, the Rat King', 'Commune with Nature', 'Cataclysmic Gearhulk', 'Sarkhan the Masterless', 'Shardless Agent', 'Oracle of Tragedy', 'Riveteers Charm', 'Mikokoro, Center of the Sea', 'Elvish Rejuvenator', 'Altar of the Goyf', 'Llanowar Mentor', 'Nimble Larcenist', 'Sphere of Safety', 'Archangel Avacyn', 'Temple of Abandon', 'Alms of the Vein', 'Nameless Inversion', 'Mana Leak', 'Big Game Hunter', 'Prologue to Phyresis', 'It That Betrays', 'Angel of Grace', 'Azorius Charm', 'Goblin Dark-Dwellers', 'Dokuchi Silencer', 'Rampant Growth', 'Into the Story', 'Grimoire Thief', 'Ancient Stirrings', 'Control Magic', 'Ashenmoor Liege', 'Terastodon', 'Wrench Mind', 'Orzhov Charm', 'Thrash // Threat', 'Argentum Masticore', 'Reflector Mage', 'Jace, Architect of Thought', 'The Celestus', 'Experimental Synthesizer', 'Vedalken Heretic', 'Gods Willing', 'Phyrexian Dreadnought', 'Gift of Immortality', 'Darksteel Citadel', 'Chief of the Foundry', 'Mindcrank', 'Knight of New Alara', 'Grand Arbiter Augustin IV', 'Barter in Blood', 'Gitaxian Probe', 'Impulse', 'Makeshift Mannequin', 'See Beyond', 'Tangle', 'Utter End', 'Urza''s Factory', 'Genesis Ultimatum', 'Choked Estuary', 'Combat Research', 'Dauntless Bodyguard', 'Recurring Nightmare', 'Deep Forest Hermit', 'Venerated Loxodon', 'Hero''s Downfall', 'Sweltering Suns', 'Quarantine Field', 'Sea Gate Wreckage', 'Goblin Electromancer', 'Chamber Sentry', 'Hypergenesis', 'Lazotep Chancellor', 'Inevitable Betrayal', 'Canyon Slough', 'Timeless Witness', 'Phyrexian Unlife', 'Oona''s Prowler', 'Faith''s Reward', 'Frostwalk Bastion', 'Halana and Alena, Partners', 'Stern Dismissal', 'Hooting Mandrills', 'Hour of Promise', 'Fae of Wishes', 'Kumano Faces Kakkazan', 'Sylvan Library', 'Fyndhorn Elves', 'Guile', 'Scrabbling Claws', 'Umara Wizard', 'Ulvenwald Hydra', 'Hornet Queen', 'Voidwing Hybrid', 'Mothdust Changeling', 'Esper Charm', 'Sacred Peaks', 'Vexing Shusher', 'Faerie Miscreant', 'Pharika''s Cure', 'Kappa Tech-Wrecker', 'Merfolk Mistbinder', 'Ethereal Armor', 'Wrenn''s Resolve', 'Zephyr Singer', 'Shape Anew', 'Changeling Outcast', 'Obliterate', 'Rain of Tears', 'Pyretic Ritual', 'Gruul Spellbreaker', 'Darksteel Colossus', 'Might of Old Krosa', 'Vault of the Archangel', 'Fleecemane Lion', 'Supreme Will', 'Forbidden Alchemy', 'Knight Exemplar', 'Blade Splicer', 'Territorial Kavu', 'Putrid Imp', 'Titania, Protector of Argoth', 'Pillar of the Paruns', 'Runed Halo', 'Treasure Cruise', 'Doomskar', 'Presence of Gond', 'Faerie Conclave', 'Voidslime', 'Healer''s Hawk', 'Brain Freeze', 'Invasion of New Capenna', 'Mephidross Vampire', 'Faerie Vandal', 'Sinew Sliver', 'Llanowar Augur', 'Thassa''s Intervention', 'Rotting Rats', 'Dusk // Dawn', 'Kogla, the Titan Ape', 'Sheoldred''s Edict', 'Council''s Judgment', 'Chandra, Flamecaller', 'Banishing Slash', 'Nimble Obstructionist', 'Chandra, Pyromaster', 'Negate', 'Quicken', 'Ogre Slumlord', 'Lavaclaw Reaches', 'Sylvan Scrying', 'Earthquake', 'Cabal Therapist', 'Bloodchief''s Thirst', 'Assault // Battery', 'Murderous Redcap', 'Drake Haven', 'Vivid Crag', 'Sultai Charm', 'Vampiric Rites', 'Empyrial Plate', 'Voyaging Satyr', 'Lotus Cobra', 'Dimensional Infiltrator', 'Mistveil Plains', 'Smuggler''s Copter', 'Open the Gates', 'Ishkanah, Grafwidow', 'Meeting of Minds', 'Bilious Skulldweller', 'Gleeful Demolition', 'Kruphix''s Insight', 'Dissipate', 'Ashen Rider', 'Gnawing Vermin', 'Rakdos Cackler', 'Sign in Blood', 'Tolarian Terror', 'Trace of Abundance', 'Inscribed Tablet', 'Sunstrike Legionnaire', 'Sphinx''s Herald', 'Sterling Grove', 'Blood on the Snow', 'Ad Nauseam', 'Rustvale Bridge', 'Witching Well', 'Ral, Storm Conduit', 'Settle the Wreckage', 'Azorius Guildgate', 'Ignite Memories', 'Condemn', 'Mesmeric Fiend', 'Pharika''s Libation', 'Oona, Queen of the Fae', 'Blight Mamba', 'Invigorate', 'Realm Razer', 'Cathartic Reunion', 'Voltage Surge', 'Gateway Plaza', 'Vessel of Nascency', 'Tilling Treefolk', 'Slagwoods Bridge', 'Marauding Blight-Priest', 'Circular Logic', 'Ghostly Flicker', 'Fight as One', 'Delver of Secrets', 'Sins of the Past', 'Aetherling', 'Jace Beleren', 'Hero of Oxid Ridge', 'Oust', 'Vines of Vastwood', 'Rust Goliath', 'Draugr Necromancer', 'Ayli, Eternal Pilgrim', 'Oath of Kaya', 'Drainpipe Vermin', 'Sinister Concoction', 'Golgari Guildgate', 'Undying Evil', 'Sculpted Perfection', 'Ulcerate', 'Spectral Shift', 'Goldmire Bridge', 'Obzedat, Ghost Council', 'Grenzo, Dungeon Warden', 'Jungle Shrine', 'Eidolon of Blossoms', 'Phoenix Chick', 'Secluded Courtyard', 'Tribal Flames', 'The Scorpion God', 'Crux of Fate', 'Steppe Lynx', 'Rites of Spring', 'Stirring Wildwood', 'Silumgar, the Drifting Death', 'Lodestone Golem', 'Kitchen Imp', 'Sorin, Vengeful Bloodlord', 'Temple of Triumph', 'Avacyn''s Pilgrim', 'Aegis of the Gods', 'Herd Migration', 'Etherium Sculptor', 'Heliod''s Intervention', 'Vampire Nighthawk', 'Revitalize', 'Vault Skirge', 'Cold-Eyed Selkie', 'Mirror Entity', 'Genesis Hydra', 'Repudiate // Replicate', 'Golgari Rot Farm', 'Lose Focus', 'Stoke the Flames', 'Consult the Necrosages', 'Merrow Reejerey', 'Ivy Lane Denizen', 'Brineborn Cutthroat', 'Time of Need', 'Yasharn, Implacable Earth', 'Herald of the Pantheon', 'Stinkdrinker Bandit', 'Ertai''s Scorn', 'Grim Haruspex', 'Gigadrowse', 'Molten Tributary', 'Falkenrath Pit Fighter', 'Mistcutter Hydra', 'Experimental Augury', 'Tezzeret''s Gambit', 'Unholy Heat', 'Simian Spirit Guide', 'Cleansing Wildfire', 'Feed the Swarm', 'Pain Seer', 'Sylvan Primordial', 'Spell Burst', 'Cryptic Caves', 'Master of Etherium', 'Forgotten Cave', 'Bubbling Muck', 'Bitter Reunion', 'Pyrite Spellbomb', 'Talisman of Impulse', 'Cultivate', 'Colossal Skyturtle', 'Vraska''s Fall', 'Barbarian Ring', 'Rise // Fall', 'Incinerate', 'Malcator, Purity Overseer', 'Dead of Winter', 'Bump in the Night', 'Gideon''s Intervention', 'Winds of Abandon', 'Tear Asunder', 'Fumigate', 'Rally the Ancestors', 'Viscera Seer', 'Gather the Pack', 'Terminate', 'Ruric Thar, the Unbowed', 'Folio of Fancies', 'Tocatli Honor Guard', 'Ponder', 'Idyllic Beachfront', 'Call of the Death-Dweller', 'Sulfur Falls', 'Out of Time', 'Servo Exhibition', 'Galerider Sliver', 'Flame Rift', 'Elixir of Immortality', 'Drowned Rusalka', 'Invoke Calamity', 'Astral Slide', 'Glamerdye', 'Lay Down Arms', 'Phyrexian Revoker', 'Shizo, Death''s Storehouse', 'Ranger of Eos', 'Conflagrate', 'Judge''s Familiar', 'Hope of Ghirapur', 'Calciform Pools', 'Fertile Ground', 'Whispersilk Cloak', 'Tribute to Horobi', 'Voldaren Pariah', 'Fact or Fiction', 'Polukranos, World Eater', 'Crawling Barrens', 'Rune Snag', 'Call to the Grave', 'Arcbound Ravager', 'Urban Evolution', 'Sleight of Hand', 'Tanglepool Bridge', 'Battle of Wits', 'Mirran Crusader', 'Vapor Snag', 'Magister of Worth', 'Torens, Fist of the Angels', 'Heliod''s Pilgrim', 'Archangel of Wrath', 'Odds // Ends', 'Eternal Dragon', 'Luminarch Ascension', 'Nekrataal', 'Swooping Lookout', 'Search for Azcanta', 'Gravelgill Duo', 'Empyrial Armor', 'Stave Off', 'Evolving Wilds', 'Obscura Charm', 'Student of Warfare', 'Glaring Aegis', 'Chief Engineer', 'Day of Judgment', 'Encroaching Wastes', 'Temple of Deceit', 'Bala Ged Recovery', 'Ghitu Lavarunner', 'Hard Evidence', 'Knight of Glory', 'Mortuary Mire', 'Kiora Bests the Sea God', 'Elemental Masterpiece', 'Temple of Silence', 'Shambling Vent', 'Duress', 'Ethersworn Sphinx', 'Helm of the Host', 'Jungle Hollow', 'Baneful Omen', 'Nullpriest of Oblivion', 'Hyena Umbra', 'Forsake the Worldly', 'Abiding Grace', 'Enchantress''s Presence', 'Engulf the Shore', 'Buried Ruin', 'Vraan, Executioner Thane', 'Necrogen Spellbomb', 'Putrefy', 'Kaya, Ghost Assassin', 'Scattered Groves', 'Vampire Hexmage', 'Think Twice', 'Fierce Empath', 'Unctus, Grand Metatect', 'Spoils of the Vault', 'Disallow', 'Nested Shambler', 'Racers'' Ring', 'Isolated Chapel', 'Idyllic Tutor', 'Corrupted Conviction', 'Tendrils of Agony', 'Hostage Taker', 'Deep Analysis', 'Nissa, Worldwaker', 'Tangled Islet', 'Mistblade Shinobi', 'Cabal Initiate', 'Solitary Confinement', 'Benthic Biomancer', 'Farhaven Elf', 'Seismic Assault', 'Silent Gravestone', 'Midnight Reaper', 'Elite Inquisitor', 'Shatter the Sky', 'Rakdos''s Return', 'Into the Roil', 'Deprive', 'Nezumi Graverobber', 'Dreadhorde Butcher', 'Yorion, Sky Nomad', 'Tomik, Distinguished Advokist', 'Monument to Perfection', 'Zuran Orb', 'Tooth and Nail', 'Gadrak, the Crown-Scourge', 'Unsubstantiate', 'Tidespout Tyrant', 'Brainstone', 'Frantic Search', 'Woodfall Primus', 'Valiant Changeling', 'Martyr of Sands', 'Izzet Boilerworks', 'Battlefield Forge', 'Repeal', 'Ghostly Pilferer', 'Ardent Recruit', 'Acclaimed Contender', 'Timeless Dragon', 'Universal Automaton', 'Silver-Fur Master', 'Froghemoth', 'Sprite Dragon', 'Rishadan Dockhand', 'Silverbluff Bridge', 'Murmuring Bosk', 'Overgrowth', 'Sheltered Thicket', 'Reckoner''s Bargain', 'Graven Lore', 'Deafening Clarion', 'Ossification', 'Grafted Butcher', 'Cloudshift', 'Ground Seal', 'Master of Death', 'Basking Rootwalla', 'Labyrinth of Skophos', 'Myth Realized', 'Waking the Trolls', 'Summer Bloom', 'Zombie Infestation', 'Llanowar Elves', 'Knight of the White Orchid', 'Forbid', 'Tresserhorn Sinks', 'Rise and Shine', 'Sarkhan, the Dragonspeaker', 'Predatory Sliver', 'Porphyry Nodes', 'Serra Ascendant', 'Twinshot Sniper', 'Ral, Izzet Viceroy', 'Dark-Dweller Oracle', 'Rift Bolt', 'Dimir Aqueduct', 'Godo, Bandit Warlord', 'Scab-Clan Berserker', 'Geyadrone Dihada', 'Arcane Sanctum', 'Price of Progress', 'Annex Sentry', 'Angel''s Grace', 'Sylvan Advocate', 'Raven''s Crime', 'Cabal Ritual', 'Skyclave Shade', 'Dire-Strain Rampage', 'Evangel of Synthesis', 'Abundant Harvest', 'Precursor Golem', 'Slogurk, the Overslime', 'Phalanx Leader', 'Argentum Armor', 'Obstinate Baloth', 'Augur of Skulls', 'Primal Command', 'Merciless Eviction', 'Shimmer Dragon', 'Angel of Serenity', 'Simic Guildgate', 'Otherworldly Journey', 'Archon of Sun''s Grace', 'Venser, Corpse Puppet', 'Demigod of Revenge', 'Teneb, the Harvester', 'Detention Sphere', 'Toolcraft Exemplar', 'Rakdos Guildgate', 'Spell Pierce', 'Spirited Companion', 'Faeburrow Elder', 'Chandra, Fire Artisan', 'Misery Charm', 'Syphon Life', 'Seal of Fire', 'Forging the Anchor', 'Celestial Colonnade', 'Stone Rain', 'General Ferrous Rokiric', 'Aetherblade Agent', 'Restoration Angel', 'Birds of Paradise', 'Loxodon Smiter', 'Invasion of Ergamon', 'Become Immense', 'Tribute to Hunger', 'Haunted Fengraf', 'Electrolyze', 'Valakut Exploration', 'Invasion of Amonkhet', 'Moorland Haunt', 'Lochmere Serpent', 'Graaz, Unstoppable Juggernaut', 'Prosperous Thief', 'Invasion of Regatha', 'Ambush Viper', 'Surrak, the Hunt Caller', 'Astral Drift', 'Bring the Ending', 'Fetid Pools', 'Bituminous Blast', 'Kaito, Dancing Shadow', 'Curiosity', 'Favored Hoplite', 'Far // Away', 'Circuit Mender', 'Wayward Guide-Beast', 'Commune with the Gods', 'Kami of False Hope', 'Hesitation', 'Coalition Relic', 'Mishra''s Factory', 'Erebos''s Intervention', 'Silverblade Paladin', 'Contaminated Aquifer', 'Open the Armory', 'Blessed Alliance', 'Arlinn Kord', 'Fiery Temper', 'Felidar Cub', 'Fracturing Gust', 'The Birth of Meletis', 'Destroy Evil', 'Tectonic Edge', 'Cloudpost', 'Giant Killer', 'Upheaval', 'Diabolic Tutor', 'Orzhov Guildgate', 'Dying to Serve', 'Succumb to Temptation', 'Progenitor Exarch', 'Fiery Justice', 'Lantern-Lit Graveyard', 'Plated Geopede', 'Union of the Third Path', 'Oona''s Grace', 'Angel of Despair', 'Shrapnel Blast', 'Port Town', 'Harmonize', 'Orzhov Basilica', 'Reinforced Ronin', 'Nephalia Drownyard', 'Ammit Eternal', 'Brave the Sands', 'Vampire Lacerator', 'Nomad Outpost', 'Caves of Koilos', 'Divinity of Pride', 'Akoum Hellhound', 'Triskelion', 'Stinkweed Imp', 'Mesa Enchantress', 'Festering Newt', 'Mindsplice Apparatus', 'Grolnok, the Omnivore', 'Careful Cultivation', 'Nezahal, Primal Tide', 'Neutralize', 'Cathedral of War', 'Sever the Bloodline', 'Terramorphic Expanse', 'Sea Gate Oracle', 'Chain Lightning', 'Dawn of Hope', 'Crack the Earth', 'Kambal, Consul of Allocation', 'Botanical Plaza', 'Squee, Goblin Nabob', 'Worship', 'Spatial Contortion', 'Xenagos, the Reveler', 'Boon-Bringer Valkyrie', 'Joint Exploration', 'Hieroglyphic Illumination', 'Sunscour', 'Grand Architect', 'Vraska''s Contempt', 'Epic Experiment', 'Lightning Strike', 'Mind''s Desire', 'Commit // Memory', 'Delay', 'Ornithopter', 'Clifftop Retreat', 'Razortide Bridge', 'Ayara, First of Locthwain', 'Demonic Bargain', 'Bloodline Keeper', 'Sire of Insanity', 'Venser, Shaper Savant', 'Glistener Elf', 'Doom Blade', 'Dread Return', 'Scrying Sheets', 'Energy Refractor', 'Spirit Mantle', 'Bloodsoaked Champion', 'Destiny Spinner', 'Approach of the Second Sun', 'Kessig Wolf Run', 'Temple of Enlightenment', 'Gutterbones', 'Narcomoeba', 'Goblin Bombardment', 'Thrill of Possibility', 'Leonin Warleader', 'Angrath, the Flame-Chained', 'Gruul Guildgate'))) 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, 2.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.6 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Guile', 'Kami of False Hope', 'Lodestone Golem', 'Garruk Wildspeaker', 'Riveteers Overlook', 'Urza''s Factory', 'Vivid Crag', 'Terastodon', 'Devious Cover-Up', 'Swooping Lookout', 'Honor of the Pure', 'Ghostly Pilferer', 'Elixir of Immortality', 'Thrash // Threat', 'Snow-Covered Mountain', 'Abundant Harvest', 'Universal Automaton', 'Ally Encampment', 'Altar of the Brood', 'Giant Killer', 'Rise and Shine', 'Glimmerpost', 'Misery Charm', 'Ossification', 'Forging the Anchor', 'Benthic Biomancer', 'Myth Realized', 'Heap Doll', 'Maelstrom Pulse', 'Presence of Gond', 'Green Sun''s Twilight', 'Graveborn Muse', 'Orzhov Charm', 'Kappa Tech-Wrecker', 'Temple of Triumph', 'Union of the Third Path', 'Smallpox', 'Draugr Necromancer', 'Acidic Slime', 'Stone Rain', 'Forbid', 'Bloodsoaked Champion', 'Hornet Queen', 'Golgari Guildgate', 'Epic Experiment', 'Fetid Heath', 'Nether Spirit', 'Glistener Elf', 'Check for Traps', 'Gruul Turf', 'Ovika, Enigma Goliath', 'Ancient Stirrings', 'Ancient Amphitheater', 'Circuit Mender', 'Temple of Silence', 'Sin Prodder', 'Vadrik, Astral Archmage', 'Late to Dinner', 'Bala Ged Recovery', 'Venerable Knight', 'Putrid Imp', 'Anguished Unmaking', 'Vigor', 'Yasharn, Implacable Earth', 'Prophetic Prism', 'Stir the Grave', 'Cosmos Elixir', 'Armored Scrapgorger', 'Night Market Lookout', 'Nimbus Maze', 'Tectonic Edge', 'Radha, Heart of Keld', 'Mistcutter Hydra', 'Halana and Alena, Partners', 'Burst Lightning', 'Faeburrow Elder', 'Murmuring Bosk', 'Tolarian Terror', 'Fierce Empath', 'The Scorpion God', 'Chittering Rats', 'Vampire Neonate', 'Devil''s Play', 'Sigrid, God-Favored', 'Sphinx''s Herald', 'Mistblade Shinobi', 'River of Tears', 'Concealing Curtains', 'Search for Tomorrow', 'Greater Gargadon', 'Archon of Sun''s Grace', 'Cathedral of War', 'Sea Gate Wreckage', 'Teferi, Mage of Zhalfir', 'Smoldering Marsh', 'Meeting of Minds', 'Murderous Redcap', 'Triskelion', 'Doom Blade', 'Anger of the Gods', 'Spell Pierce', 'Llanowar Mentor', 'Feed the Swarm', 'Serra Ascendant', 'Detention Sphere', 'Shivan Reef', 'Commune with the Gods', 'Forgotten Cave', 'Mystical Teachings', 'Ulvenwald Hydra', 'Dread Return', 'Frantic Inventory', 'Thornwood Falls', 'Frontier Bivouac', 'Tyrant''s Choice', 'Vampire Lacerator', 'Phyrexian Dreadnought', 'Precursor Golem', 'Lonely Sandbar', 'Evolving Wilds', 'Titania, Protector of Argoth', 'Memoricide', 'Evangel of Synthesis', 'Sheoldred''s Edict', 'Venerated Loxodon', 'Utter End', 'Remorseful Cleric', 'Fae of Wishes', 'Nevermore', 'Yavimaya Coast', 'Narcomoeba', 'Obstinate Baloth', 'Shimmerdrift Vale', 'Hesitation', 'Brokers Hideout', 'Angel''s Grace', 'Nightscape Familiar', 'Thrill of Possibility', 'Orim''s Chant', 'Elves of Deep Shadow', 'Dawn of Hope', 'Stromkirk Noble', 'Settle the Wreckage', 'Champion of Wits', 'Briarbridge Tracker', 'Ruric Thar, the Unbowed', 'Ayara, First of Locthwain', 'Scour All Possibilities', 'Deep Forest Hermit', 'Mirran Crusader', 'Pharika''s Libation', 'Knight of the White Orchid', 'Vault Skirge', 'The Underworld Cookbook', 'Sever the Bloodline', 'Shatter the Sky', 'Baneful Omen', 'Razortide Bridge', 'Sheltered Thicket', 'Mikokoro, Center of the Sea', 'Expedition Envoy', 'Vampire Nighthawk', 'Venser, Shaper Savant', 'Arbor Elf', 'Cloudpost', 'Goblin Electromancer', 'Jungle Hollow', 'Cut Down', 'Cabal Ritual', 'Tidehollow Sculler', 'Vault of the Archangel', 'Choked Estuary', 'Fight as One', 'Phyrexian Revoker', 'Silver-Fur Master', 'Geothermal Bog', 'Norn''s Inquisitor', 'Vapor Snag', 'Ogre Slumlord', 'Argentum Armor', 'Sarkhan the Masterless', 'Unstable Mutation', 'Tranquil Thicket', 'Yavimaya Iconoclast', 'Mausoleum Secrets', 'Hall of Oracles', 'Lavinia of the Tenth', 'Artisan of Kozilek', 'Pyretic Ritual', 'Vryn Wingmare', 'Tendrils of Agony', 'Supreme Will', 'Marauding Blight-Priest', 'Tomebound Lich', 'Assault // Battery', 'Demigod of Revenge', 'Go for the Throat', 'Impulse', 'Revitalize', 'Cabaretti Courtyard', 'Kiora Bests the Sea God', 'Vedalken Heretic', 'Wild Cantor', 'Vines of Vastwood', 'Scrapheap Scrounger', 'Negate', 'Tanglepool Bridge', 'Dovin''s Acuity', 'Deprive', 'Hard Evidence', 'Arcbound Ravager', 'Scattered Groves', 'Nameless Inversion', 'Raise the Alarm', 'Carven Caryatid', 'Battle of Frost and Fire', 'Orcish Lumberjack', 'Knight of Glory', 'Sunpetal Grove', 'Blood on the Snow', 'Gather the Pack', 'Huatli, Radiant Champion', 'Shizo, Death''s Storehouse', 'Incinerate', 'Invasion of Regatha', 'Sacred Peaks', 'Colossal Skyturtle', 'Barbed Sextant', 'Sandsteppe Citadel', 'Executioner''s Capsule', 'Invasion of Amonkhet', 'Thopter Spy Network', 'Phalanx Leader', 'Geomancer''s Gambit', 'Resurgent Belief', 'Silverbluff Bridge', 'Banishing Slash', 'Renewed Faith', 'Sultai Charm', 'Tilling Treefolk', 'Rampant Growth', 'Rust Goliath', 'Viashino Pyromancer', 'Dread Wanderer', 'Mouth of Ronom', 'Stirring Wildwood', 'Gryff''s Boon', 'Reckoner''s Bargain', 'Fracturing Gust', 'Lavaclaw Reaches', 'Healer''s Hawk', 'Experimental Augury', 'Commune with Nature', 'Sinister Concoction', 'Saproling Migration', 'Slaughter Pact', 'Farhaven Elf', 'Spell Burst', 'Sylvan Scrying', 'Satyr Wayfinder', 'Elas il-Kor, Sadistic Pilgrim', 'Syphon Life', 'Fyndhorn Elves', 'Thragtusk', 'Voidwing Hybrid', 'Knight Exemplar', 'Blood Artist', 'Kazandu Blademaster', 'Hero of Oxid Ridge', 'Abundant Growth', 'Minor Misstep', 'Jace Beleren', 'Grand Architect', 'Quarantine Field', 'Benalish Marshal', 'Yawgmoth''s Bargain', 'Battle of Wits', 'Engulf the Shore', 'Verduran Enchantress', 'Rakdos Cackler', 'Reinforced Ronin', 'Upheaval', 'Xerex Strobe-Knight', 'Isolated Chapel', 'See Beyond', 'Drowned Catacomb', 'Divinity of Pride', 'Simic Guildgate', 'Night of Souls'' Betrayal', 'Abzan Charm', 'Halimar Excavator', 'Sprite Dragon', 'Might of Old Krosa', 'Commune with Spirits', 'Shimmer Dragon', 'Rix Maadi Reveler', 'Geyadrone Dihada', 'Benevolent Bodyguard', 'Tooth and Nail', 'Rakdos Guildgate', 'Dire-Strain Rampage', 'Mulch', 'Corpse Cur', 'Sweltering Suns', 'Shriekmaw', 'Mindcrank', 'Maestros Charm', 'Ashnod, Flesh Mechanist', 'Blessed Alliance', 'Sphere of Safety', 'Mina and Denn, Wildborn', 'Sin Collector', 'Elvish Rejuvenator', 'Bump in the Night', 'Succumb to Temptation', 'Glorybringer', 'Empyrial Plate', 'Zur''s Weirding', 'Burning of Xinye', 'Mortuary Mire', 'Wolfbriar Elemental', 'Kefnet the Mindful', 'Reflector Mage', 'Farseek', 'Rakdos Charm', 'Genesis Ultimatum', 'Wasteland Strangler', 'Zombie Infestation', 'Crack the Earth', 'Fetid Pools', 'Open the Armory', 'Disenchant', 'Trace of Abundance', 'Aegis of the Gods', 'Lightning Strike', 'Aetherling', 'Prologue to Phyresis', 'Rule of Law', 'Kessig Wolf Run', 'Leonin Warleader', 'Dead // Gone', 'Temple of Deceit', 'Inevitable Betrayal', 'Sandwurm Convergence', 'Tribute to Horobi', 'Tangle', 'All That Glitters', 'Mastermind''s Acquisition', 'Karumonix, the Rat King', 'Gallia of the Endless Dance', 'Morsel Theft', 'Spirit Mantle', 'Mana Leak', 'Game Trail', 'Hanweir Garrison', 'Angel of Despair', 'Pyrite Spellbomb', 'Elite Inquisitor', 'Sulfur Falls', 'Sudden Edict', 'Blanchwood Prowler', 'Sculpting Steel', 'Mindsplice Apparatus', 'Mirror Entity', 'Dragon''s Hoard', 'Mesmeric Fiend', 'Azorius Charm', 'Weathered Wayfarer', 'Pharika''s Cure', 'Froghemoth', 'Pain Seer', 'Woodland Cemetery', 'The Flame of Keld', 'Herald of the Pantheon', 'Solemnity', 'Argentum Masticore', 'Jokulhaups', 'Enchantress''s Presence', 'Smother', 'Boon-Bringer Valkyrie', 'Mystifying Maze', 'Joint Exploration', 'Ivory Tower', 'Faith''s Reward', 'Diabolic Tutor', 'Sylvan Library', 'Voltage Surge', 'Delver of Secrets', 'Touch the Spirit Realm', 'Alms of the Vein', 'Idyllic Tutor', 'Tendo Ice Bridge', 'Sarkhan, the Dragonspeaker', 'Duneblast', 'Labyrinth of Skophos', 'Realm Razer', 'Darksteel Colossus', 'Hour of Promise', 'Graven Cairns', 'Xenagos, the Reveler', 'Ardent Recruit', 'Marble Diamond', 'Bogbrew Witch', 'Psychic Possession', 'Magister of Worth', 'Chief Engineer', 'Quiet Speculation', 'Wrench Mind', 'Gift of Immortality', 'Grand Abolisher', 'Master of Death', 'Woe Strider', 'Vraska''s Fall', 'Quest for the Holy Relic', 'Tidespout Tyrant', 'Ghostly Flicker', 'Gods Willing', 'Venser, Corpse Puppet', 'Demolition Field', 'Scrabbling Claws', 'Triumphant Adventurer', 'Kaya, Ghost Assassin', 'Mindslaver', 'Out of Time', 'Raging Ravine', 'Drown in Ichor', 'Victim of Night', 'Experimental Synthesizer', 'Bogardan Hellkite', 'Gadrak, the Crown-Scourge', 'Krosan Grip', 'Early Harvest', 'Bloodbraid Elf', 'Ad Nauseam', 'Snow-Covered Plains', 'Talisman of Curiosity', 'Master of Etherium', 'Mishra''s Factory', 'Slagwoods Bridge', 'Priest of the Haunted Edge', 'Plated Geopede', 'Kalastria Healer', 'It That Betrays', 'Merfolk Sovereign', 'Recurring Nightmare', 'Sigil of the Empty Throne', 'Woodfall Primus', 'Ertai''s Scorn', 'Thawing Glaciers', 'Siege Rhino', 'Springleaf Drum', 'Cloudshift', 'Nature''s Lore', 'Fallaji Archaeologist', 'Gift of Estates', 'Steppe Lynx', 'Arcum''s Astrolabe', 'Obzedat, Ghost Council', 'Hero''s Downfall', 'Chandra, Flamecaller', 'Astral Slide', 'Angel of Grace', 'Brain Freeze', 'Watcher for Tomorrow', 'Arlinn Kord', 'Myr Battlesphere', 'Myr Superion', 'Gideon''s Intervention', 'Runed Halo', 'Kaito, Dancing Shadow', 'Koth, Fire of Resistance', 'Bloodline Keeper', 'Drainpipe Vermin', 'Dying to Serve', 'Deep Analysis', 'Arcane Sanctum', 'Wood Elves', 'Sinew Sliver', 'Brainstone', 'Midnight Clock', 'Kor Skyfisher', 'Grafted Butcher', 'Slogurk, the Overslime', 'Gideon Jura', 'Cloudshredder Sliver', 'Ponder', 'Monument to Perfection', 'Selesnya Guildgate', 'Dokuchi Silencer', 'Dregscape Zombie', 'Lingering Souls', 'Seal of Fire', 'Favored Hoplite', 'Stubborn Denial', 'Ashen Rider', 'Bubbling Muck', 'Malakir Rebirth', 'Repeal', 'Nimble Obstructionist', 'Drossforge Bridge', 'Terminus', 'Heliod''s Intervention', 'Bloodchief Ascension', 'Open the Gates', 'Goblin Dark-Dwellers', 'Clifftop Retreat', 'Control Magic', 'Hada Freeblade', 'King Darien XLVIII', 'Temple of Plenty', 'Hero of Bladehold', 'Demonic Bargain', 'Malcator, Purity Overseer', 'Hypnotic Specter', 'Blightning', 'Cabal Initiate', 'Mistvault Bridge', 'Wall of Omens', 'Necrogen Spellbomb', 'Peek', 'Aetherspouts', 'Ishkanah, Grafwidow', 'Cliffside Lookout', 'Talisman of Impulse', 'Volt Charge', 'Judge''s Familiar', 'Protect the Negotiators', 'Vampire Hexmage', 'Vraan, Executioner Thane', 'Throat Slitter', 'Blighted Agent', 'Frostwalk Bastion', 'Vindicate', 'Price of Progress', 'Caves of Koilos', 'Frantic Search', 'Tangled Islet', 'Bone Shards', 'Tempest Djinn', 'Valiant Changeling', 'Rain of Tears', 'Become Immense', 'Oracle of Mul Daya', 'Seismic Assault', 'Unlucky Witness', 'Hissing Quagmire', 'Chief of the Foundry', 'Glacial Fortress', 'Elderscale Wurm', 'Progenitor Exarch', 'Dark Ritual', 'Unctus, Grand Metatect', 'Dryad Militant', 'Oblivion Ring', 'Thraben Inspector', 'Glint-Sleeve Siphoner', 'Notorious Throng', 'Altar of the Goyf', 'Obliterate', 'Pyroclasm', 'Restoration Angel', 'Wanderwine Hub', 'Oni-Cult Anvil', 'Winds of Abandon', 'Tribute to Hunger', 'Oona''s Prowler', 'Silverblade Paladin', 'Solitary Confinement', 'Seeker of the Way', 'Sunblade Samurai', 'Archangel of Wrath', 'Moderation', 'Yahenni''s Expertise', 'Midnight Reaper', 'Rotting Rats', 'Fire Prophecy', 'Sins of the Past', 'Mesa Enchantress', 'Figure of Destiny', 'Jwari Shapeshifter', 'Big Score', 'Drowned Rusalka', 'Kitchen Finks', 'Dead of Winter', 'Into the Roil', 'Makeshift Mannequin', 'Combat Thresher', 'Midnight Guard', 'Goblin Bombardment', 'Surrak, the Hunt Caller', 'Think Twice', 'Calciform Pools', 'Voidslime', 'Dimir Guildgate', 'Simian Spirit Guide', 'Kabira Takedown', 'Chamber Sentry', 'Rites of Spring', 'Spirited Companion', 'Platinum Angel', 'Blazing Rootwalla', 'Unburial Rites', 'General''s Enforcer', 'Summary Dismissal', 'Crawling Chorus', 'Sculpted Perfection', 'Kiora, the Crashing Wave', 'Skyclave Shade', 'Sunscour', 'Zephyr Singer', 'Putrefy', 'Consuming Vapors', 'Bring the Ending', 'Nested Shambler', 'Fearless Fledgling', 'Sunken Hollow', 'Turnabout', 'Increasing Ambition', 'Coiling Oracle', 'Yorion, Sky Nomad', 'Explore', 'Jace, Architect of Thought', 'Archaeomancer', 'Leonin Arbiter', 'Ground Seal', 'Madcap Experiment', 'Spoils of the Vault', 'Felidar Retreat', 'General Ferrous Rokiric', 'Abiding Grace', 'Harmonize', 'Predatory Sliver', 'Acclaimed Contender', 'Audacity', 'Thaumatic Compass', 'Disallow', 'Harrow', 'Rustvale Bridge', 'Scrapwork Mutt', 'Forbidden Alchemy', 'Condemn', 'Sylvan Caryatid', 'Genesis Hydra', 'Timely Reinforcements', 'Temple of Enlightenment', 'Botanical Plaza', 'Dark Petition', 'Decree of Justice', 'Surge of Salvation', 'Dross Skullbomb', 'Contaminated Aquifer', 'Sleight of Hand', 'Hostage Taker', 'Sea-Dasher Octopus', 'Voyaging Satyr', 'Grolnok, the Omnivore', 'Needle Spires', 'Second Sunrise', 'Tezzeret, Artifice Master', 'Rites of Initiation', 'Lurrus of the Dream-Den', 'Ral, Izzet Viceroy', 'Hypergenesis', 'Kambal, Consul of Allocation', 'Memory Lapse', 'Angel of Condemnation', 'Dimir Aqueduct', 'Gateway Plaza', 'Deafening Clarion', 'Lantern-Lit Graveyard', 'Elemental Masterpiece', 'Call of the Death-Dweller', 'Luminarch Ascension', 'Bubbling Cauldron', 'Riveteers Charm', 'Faerie Vandal', 'Frenetic Sliver', 'Stoic Rebuttal', 'Distorted Curiosity', 'Bident of Thassa', 'Always Watching', 'Angel of Serenity', 'Vivid Marsh', 'Time of Need', 'The Celestus', 'Timeless Dragon', 'Consume the Meek', 'Combat Research', 'Neutralize', 'Sign in Blood', 'Rune Snag', 'Astral Drift', 'Angrath, the Flame-Chained', 'Temple of Malady', 'Mind''s Desire', 'Pardic Miner', 'Toolcraft Exemplar', 'Obscura Charm', 'Pillar of the Paruns', 'Pack Rat', 'Glamerdye', 'Brave the Sands', 'Brineborn Cutthroat', 'Scrying Sheets', 'Flooded Grove', 'Grenzo, Dungeon Warden', 'Circular Logic', 'Chandra, Fire Artisan', 'Invasion of Azgol', 'Blight Mamba', 'Invoke Calamity', 'Wooded Bastion', 'Port Town', 'Faerie Conclave', 'Kunoros, Hound of Athreos', 'Shardless Agent', 'Rishadan Dockhand', 'Gleeful Demolition', 'Summer Bloom', 'Obscura Storefront', 'Oath of Kaya', 'Darksteel Citadel', 'Orzhov Basilica', 'Tribal Flames', 'Cataclysmic Gearhulk', 'Rise // Fall', 'Repudiate // Replicate', 'Idyllic Beachfront', 'Shambling Vent', 'Ivy Lane Denizen', 'Phoenix Chick', 'Dissolve', 'Anafenza, the Foremost', 'Stasis Snare', 'Wizard''s Retort', 'Felidar Cub', 'Kitesail Freebooter', 'Fade from Memory', 'Terminate', 'Nomad Outpost', 'Destiny Spinner', 'Doomskar', 'Aether Spellbomb', 'Unholy Heat', 'Pulse of the Fields', 'Far // Away', 'Distended Mindbender', 'Phyrexian Unlife', 'Otherworldly Journey', 'Tear Asunder', 'Brave the Elements', 'Molten Tributary', 'Whispersilk Cloak', 'Izzet Guildgate', 'Izzet Charm', 'Gutterbones', 'Mothdust Changeling', 'Assemble the Legion', 'Buried Ruin', 'Floriferous Vinewall', 'Primal Command', 'Fact or Fiction', 'Avacyn''s Pilgrim', 'Servo Exhibition', 'Battlefield Forge', 'Blade Splicer', 'Ichorclaw Myr', 'Faerie Miscreant', 'Tezzeret''s Gambit', 'Ammit Eternal', 'Tomik, Distinguished Advokist', 'Gnawing Vermin', 'Duress', 'Cabal Therapist', 'Spectral Shift', 'Shape Anew', 'Izzet Boilerworks', 'Bituminous Blast', 'Canopy Vista', 'Strike It Rich', 'Groundswell', 'Ensoul Artifact', 'Rocco, Cabaretti Caterer', 'Invisible Stalker', 'Altered Ego', 'Drake Haven', 'White Sun''s Zenith', 'Timeless Witness', 'Curiosity', 'Bloodchief''s Thirst', 'Dakkon, Shadow Slayer', 'Empyrial Armor', 'Etherium Sculptor', 'Merciless Eviction', 'Artistic Refusal', 'Oust', 'Karn''s Bastion', 'Rally the Ancestors', 'Changeling Outcast', 'Stoke the Flames', 'Dimensional Infiltrator', 'Ornithopter', 'Earthquake', 'Dragonskull Summit', 'Delay', 'Unmarked Grave', 'Frost Titan', 'Vivid Grove', 'Eldrazi Displacer', 'Icehide Golem', 'Greater Tanuki', 'Fleecemane Lion', 'Overgrowth', 'Inkwell Leviathan', 'Basking Rootwalla', 'Haunted Mire', 'Eiganjo Castle', 'Electrolyze', 'Pore Over the Pages', 'Pull from Tomorrow', 'Commence the Endgame', 'Bolas''s Citadel', 'Worthy Knight', 'Jwari Disruption', 'Rootbound Crag', 'Shard Volley', 'Shred Memory', 'Approach of the Second Sun', 'Silundi Vision', 'Sunlit Marsh', 'Worship', 'Westvale Abbey', 'Nimble Trapfinder', 'Into the Story', 'Ulcerate', 'Endbringer', 'Gruul Guildgate', 'Mirage Mirror', 'Esper Charm', 'Nissa, Steward of Elements', 'Dauntless Bodyguard', 'Herd Migration', 'Oona''s Grace', 'Dissipate', 'Mistveil Plains', 'Ancient Ziggurat', 'Blightbelly Rat', 'Thundermaw Hellkite', 'Raven''s Crime', 'Phyrexian Censor', 'Jukai Naturalist', 'Maze''s End', 'Saffi Eriksdotter', 'Umara Wizard', 'Ignite Memories', 'Viscera Seer', 'Scarab Feast', 'Nekrataal', 'Nezumi Graverobber', 'Godo, Bandit Warlord', 'Sea Gate Oracle', 'Kjeldoran Outpost', 'Zuran Orb', 'Illuminator Virtuoso', 'Gigadrowse', 'Festering Newt', 'Snow-Covered Swamp', 'Ghostfire Blade', 'Aetherblade Agent', 'Lotus Cobra', 'Canyon Slough', 'Fertile Ground', 'Energy Refractor', 'Vampiric Rites', 'Squadron Hawk', 'Raze to the Ground', 'Scab-Clan Berserker', 'Throne of the God-Pharaoh', 'Spatial Contortion', 'Corrupted Conviction', 'Grimoire Thief', 'Ral, Storm Conduit', 'Valakut Exploration', 'Eerie Ultimatum', 'Cold-Eyed Selkie', 'Torens, Fist of the Angels', 'Arguel''s Blood Fast', 'Student of Warfare', 'Temple of Mystery', 'Archangel Avacyn', 'Dismal Backwater', 'Melira, the Living Cure', 'Crawling Barrens', 'Careful Cultivation', 'Search for Azcanta', 'Martyr of Sands', 'Consult the Necrosages', 'Invasion of Zendikar', 'Ethersworn Sphinx', 'Sire of Insanity', 'Grave Titan', 'Ayli, Eternal Pilgrim', 'Mephidross Vampire', 'Leonin Relic-Warder', 'Steel Overseer', 'Doomed Traveler', 'Gruul Spellbreaker', 'Secluded Courtyard', 'Hooting Mandrills', 'Sterling Grove', 'Soltari Priest', 'Jungle Shrine', 'Heartless Act', 'Elvish Visionary', 'Dusk // Dawn', 'Twinshot Sniper', 'Helm of the Host', 'Wayward Guide-Beast', 'Destroy Evil', 'Commit // Memory', 'Stave Off', 'Invasion of New Capenna', 'Tainted Indulgence', 'Coalition Relic', 'Big Game Hunter', 'Merfolk Mistbinder', 'Marit Lage''s Slumber', 'Dark-Dweller Oracle', 'Nissa, Worldwaker', 'Call to the Grave', 'Hieroglyphic Illumination', 'Unsubstantiate', 'Invigorate', 'Stupor', 'Azorius Guildgate', 'Silumgar''s Scorn', 'Evacuation', 'Stinkdrinker Bandit', 'Eidolon of Blossoms', 'Network Disruptor', 'Lochmere Serpent', 'Hinterland Harbor', 'Kitchen Imp', 'Cathartic Reunion', 'Silumgar, the Drifting Death', 'Invasion of Ergamon', 'Tocatli Honor Guard', 'Rift Bolt', 'Crux of Fate', 'Wilt', 'Psychatog', 'Dream Trawler', 'Oracle of Tragedy', 'Flame Rift', 'Porphyry Nodes', 'Endless Horizons', 'Ravenous Squirrel', 'Racers'' Ring', 'Grim Haruspex', 'Folio of Fancies', 'Encroaching Wastes', 'Eternal Dragon', 'Galerider Sliver', 'Ghost Quarter', 'Herd Baloth', 'Lay Down Arms', 'Celestial Colonnade', 'Dispatch', 'Territorial Kavu', 'Glaring Aegis', 'Prosperous Thief', 'Knight of the Reliquary', 'Ephara, God of the Polis', 'Grand Arbiter Augustin IV', 'Gitaxian Probe', 'Venser, the Sojourner', 'Scuttling Doom Engine', 'Agonizing Remorse', 'Stern Dismissal', 'Purify the Grave', 'Llanowar Elves', 'Cryptic Caves', 'The Birth of Meletis', 'Secluded Steppe', 'Heliod''s Pilgrim', 'Loxodon Smiter', 'Tyrant of Discord', 'Cauldron Familiar', 'Eternal Scourge', 'Sylvan Advocate', 'Cleansing Wildfire', 'Kogla, the Titan Ape', 'Lost Legacy', 'Thassa''s Intervention', 'Opulent Palace', 'Teneb, the Harvester', 'Oona, Queen of the Fae', 'Undying Evil', 'Ghitu Lavarunner', 'Tide Shaper', 'Declaration in Stone', 'Raffine''s Informant', 'Black Sun''s Zenith', 'Hideous End', 'Seal of Removal', 'Chain Lightning', 'Treasure Cruise', 'Council''s Judgment', 'Nezahal, Primal Tide', 'Annex Sentry', 'Fruit of Tizerus', 'Temple of Abandon', 'Flaying Tendrils', 'Fiery Justice', 'Squee, Goblin Nabob', 'Arch of Orazca', 'Ambush Viper', 'Cremate', 'Lazotep Chancellor', 'Gnat Miser', 'Moon-Circuit Hacker', 'Thornglint Bridge', 'Vraska''s Contempt', 'Polukranos, World Eater', 'Stinkweed Imp', 'Lose Focus', 'Dead Weight', 'Ondu Inversion', 'Caldera Hellion', 'Forsake the Worldly', 'Day of Judgment', 'Hyena Umbra', 'Smuggler''s Copter', 'Nephalia Drownyard', 'Glimpse of Tomorrow', 'Hope of Ghirapur', 'Graven Lore', 'Birds of Paradise', 'Nimble Larcenist', 'Llanowar Augur', 'Fumigate', 'Wonder', 'Disrupting Shoal', 'Tresserhorn Sinks', 'Boros Guildgate', 'Bloodvial Purveyor', 'Vessel of Nascency', 'Augur of Skulls', 'Duplicant', 'Aquitect''s Will', 'Change the Equation', 'Inscribed Tablet', 'Ramunap Excavator', 'Mnemonic Sphere', 'Knight of New Alara', 'Silent Gravestone', 'Diffusion Sliver', 'Goldmire Bridge', 'World Shaper', 'Orzhov Guildgate', 'Cultivate', 'Pariah', 'Seal of Cleansing', 'Embodiment of Fury', 'Shrapnel Blast', 'Graaz, Unstoppable Juggernaut', 'Castigate', 'Odds // Ends', 'The Seedcore', 'Frost Marsh', 'Wrenn''s Resolve', 'Seething Song', 'Ranger of Eos', 'Ethereal Armor', 'Bilious Skulldweller', 'Sylvan Primordial', 'Arbalest Engineers', 'Bitter Reunion', 'Malicious Malfunction', 'Merrow Reejerey', 'Haunted Fengraf', 'Chandra, Pyromaster', 'Desperate Ritual', 'Founding the Third Path', 'Boreal Shelf', 'Voldaren Pariah', 'Barter in Blood', 'Third Path Iconoclast', 'Kruphix''s Insight', 'Gravelgill Duo', 'Grave Scrabbler', 'Golgari Rot Farm', 'Return to the Ranks', 'Mulldrifter', 'Nine Lives', 'Patchwork Automaton', 'Rakdos''s Return', 'Sorin, Vengeful Bloodlord', 'Sunstrike Legionnaire', 'Exclude', 'Terramorphic Expanse', 'Mazemind Tome', 'Erebos''s Intervention', 'Research // Development', 'Dreadhorde Butcher', 'Sol Talisman', 'Waking the Trolls', 'Fiery Temper', 'Forked Bolt', 'Inspiring Veteran', 'Barbarian Ring', 'Akoum Hellhound', 'Urban Evolution', 'Quicken', 'Ashenmoor Liege', 'Nullpriest of Oblivion', 'Collected Conjuring', 'Wrath of God', 'Kor Firewalker', 'Phantasmal Image', 'Witching Well', 'Falkenrath Pit Fighter', 'Vexing Shusher', 'Discovery // Dispersal', 'Moorland Haunt', 'Conflagrate', 'Kumano Faces Kakkazan', 'Tocasia''s Dig Site'))) 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, 2.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.6 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Hour of Promise', 'Kazandu Blademaster', 'Rootbound Crag', 'Kappa Tech-Wrecker', 'Memoricide', 'Epic Experiment', 'Calciform Pools', 'Phyrexian Revoker', 'Abundant Harvest', 'Maze''s End', 'Mindcrank', 'Quicken', 'Impulse', 'Scab-Clan Berserker', 'Cold-Eyed Selkie', 'Blazing Rootwalla', 'Midnight Clock', 'Glacial Fortress', 'Archon of Sun''s Grace', 'Kabira Takedown', 'Bloodchief Ascension', 'Vault Skirge', 'Invasion of Zendikar', 'Glimmerpost', 'Felidar Cub', 'Strike It Rich', 'Abzan Charm', 'Spoils of the Vault', 'Crawling Chorus', 'Dread Wanderer', 'Sunscour', 'Ovika, Enigma Goliath', 'Phantasmal Image', 'Sins of the Past', 'Dakkon, Shadow Slayer', 'Benthic Biomancer', 'Zur''s Weirding', 'Tanglepool Bridge', 'Pardic Miner', 'Acidic Slime', 'Gather the Pack', 'Consume the Meek', 'Forgotten Cave', 'Haunted Fengraf', 'Eerie Ultimatum', 'Gateway Plaza', 'Smuggler''s Copter', 'Drossforge Bridge', 'Reinforced Ronin', 'Sylvan Primordial', 'Blade Splicer', 'Faerie Conclave', 'Electrolyze', 'Kiora, the Crashing Wave', 'Eidolon of Blossoms', 'Grave Scrabbler', 'Day of Judgment', 'Ancient Amphitheater', 'Kefnet the Mindful', 'Chief of the Foundry', 'Chief Engineer', 'Chandra, Pyromaster', 'Triskelion', 'Porphyry Nodes', 'Network Disruptor', 'Xerex Strobe-Knight', 'Rotting Rats', 'Game Trail', 'Necrogen Spellbomb', 'Marit Lage''s Slumber', 'Nephalia Drownyard', 'Lightning Strike', 'Diffusion Sliver', 'Sunlit Marsh', 'Smallpox', 'Sultai Charm', 'Malicious Malfunction', 'Bloodvial Purveyor', 'Mind''s Desire', 'Sorin, Vengeful Bloodlord', 'Explore', 'Duplicant', 'Mothdust Changeling', 'Battle of Wits', 'Throat Slitter', 'Gutterbones', 'Swiftfoot Boots', 'Aetherblade Agent', 'Chaotic Transformation', 'Raging Ravine', 'Gruul Guildgate', 'Krosan Grip', 'Mina and Denn, Wildborn', 'Helm of the Host', 'Altered Ego', 'Mnemonic Sphere', 'Conflagrate', 'Teferi, Mage of Zhalfir', 'Summer Bloom', 'Sinew Sliver', 'Realm Razer', 'Verduran Enchantress', 'Unlucky Witness', 'Venerable Knight', 'Obliterate', 'Ethersworn Sphinx', 'Vampire Neonate', 'Assault // Battery', 'Temple of Enlightenment', 'Mulch', 'Oni-Cult Anvil', 'Angel of Despair', 'Talisman of Impulse', 'Big Game Hunter', 'Pack Rat', 'Oona''s Prowler', 'Galerider Sliver', 'Evangel of Synthesis', 'Rocco, Cabaretti Caterer', 'Sarkhan, the Dragonspeaker', 'Umara Wizard', 'Mesa Enchantress', 'Steppe Lynx', 'Loran''s Escape', 'Touch the Spirit Realm', 'Call to the Grave', 'Drowned Rusalka', 'Aetherling', 'Lurrus of the Dream-Den', 'Tendrils of Agony', 'Thragtusk', 'Divinity of Pride', 'Victim of Night', 'Garruk Wildspeaker', 'Oracle of Mul Daya', 'Harmonize', 'Reveillark', 'Shambling Vent', 'Mycosynth Golem', 'Supreme Will', 'Pyrite Spellbomb', 'Graven Lore', 'Llanowar Mentor', 'Icehide Golem', 'Fruit of Tizerus', 'Goblin Bombardment', 'The Scorpion God', 'Bitter Reunion', 'Ad Nauseam', 'Clifftop Retreat', 'Ravenous Squirrel', 'Raffine''s Informant', 'Armored Scrapgorger', 'Mirage Mirror', 'Terminate', 'Reckless Rage', 'Remorseful Cleric', 'Hero''s Downfall', 'Hideous End', 'Tidehollow Sculler', 'Ashenmoor Liege', 'Vampire Hexmage', 'Tidespout Tyrant', 'Temple of Mystery', 'Engulf the Shore', 'Chittering Rats', 'Combat Research', 'Repudiate // Replicate', 'Akroan Crusader', 'Blue Sun''s Zenith', 'Cut Down', 'Teshar, Ancestor''s Apostle', 'Joint Exploration', 'Counterflux', 'Change the Equation', 'Second Sunrise', 'Tribute to Horobi', 'Archaeomancer', 'Assemble the Legion', 'Unsubstantiate', 'Merfolk Sovereign', 'Surge of Salvation', 'Gigadrowse', 'Pain Seer', 'Grand Arbiter Augustin IV', 'Wasteland Strangler', 'Squadron Hawk', 'Labyrinth of Skophos', 'Barbed Sextant', 'Wilt', 'Voyaging Satyr', 'Lavinia of the Tenth', 'Artisan of Kozilek', 'Merfolk Mistbinder', 'Crack the Earth', 'Dregscape Zombie', 'Lazotep Chancellor', 'Etherium Sculptor', 'Oona''s Grace', 'The Seedcore', 'Forging the Anchor', 'Astral Slide', 'Territorial Kavu', 'Revitalize', 'Cultivate', 'Jukai Naturalist', 'Cryptic Caves', 'Myr Battlesphere', 'Murderous Redcap', 'Gleeful Demolition', 'Spirited Companion', 'Distorted Curiosity', 'Voldaren Pariah', 'Tribal Flames', 'Faeburrow Elder', 'Devious Cover-Up', 'Gruul Spellbreaker', 'Memory Lapse', 'Sigil of the Empty Throne', 'Call of the Death-Dweller', 'Fetid Heath', 'Tangled Islet', 'Stave Off', 'Dismal Backwater', 'Runed Halo', 'Sarkhan the Masterless', 'Celestial Colonnade', 'Anguished Unmaking', 'Leonin Relic-Warder', 'Graaz, Unstoppable Juggernaut', 'Midnight Reaper', 'Blightbelly Rat', 'Defiant Strike', 'Ally Encampment', 'Hypergenesis', 'Faith''s Reward', 'Slagwoods Bridge', 'Thrill of Possibility', 'Protect the Negotiators', 'Port Town', 'Varolz, the Scar-Striped', 'Greater Gargadon', 'Universal Automaton', 'Goblin Dark-Dwellers', 'Gods Willing', 'Rakdos Guildgate', 'Weathered Wayfarer', 'Silent Gravestone', 'Wall of Omens', 'Forbid', 'Ossification', 'Control Magic', 'Stirring Wildwood', 'Plated Geopede', 'Cabal Initiate', 'Wolfbriar Elemental', 'Yavimaya Iconoclast', 'Dream Trawler', 'Thornglint Bridge', 'Sylvan Advocate', 'Genesis Hydra', 'Slagstorm', 'General Ferrous Rokiric', 'Early Harvest', 'Nimble Trapfinder', 'Timely Reinforcements', 'Approach of the Second Sun', 'Astral Drift', 'Herald of the Pantheon', 'Delay', 'Gruul Turf', 'Frost Marsh', 'Disrupting Shoal', 'Dryad Militant', 'Temple of Abandon', 'Rust Goliath', 'Dimir Guildgate', 'Corpse Cur', 'Mindsplice Apparatus', 'Goblin Electromancer', 'Acclaimed Contender', 'Coiling Oracle', 'Stoic Rebuttal', 'Sacred Peaks', 'Vadrik, Astral Archmage', 'Dark-Dweller Oracle', 'Viscera Seer', 'Dread Return', 'Bolas''s Citadel', 'Martyr of Sands', 'Buried Ruin', 'Pharika''s Libation', 'Spectral Shift', 'Knight of the Reliquary', 'Banishing Slash', 'Glint-Sleeve Siphoner', 'Bloodbraid Elf', 'Battlefield Forge', 'Shriekmaw', 'Vraska''s Fall', 'Riveteers Charm', 'Argentum Masticore', 'Madcap Experiment', 'Decree of Justice', 'Glorybringer', 'Ishkanah, Grafwidow', 'Consuming Vapors', 'Champion of Wits', 'Vedalken Heretic', 'Misery Charm', 'Obzedat, Ghost Council', 'Woodland Cemetery', 'Scrapheap Scrounger', 'Saffi Eriksdotter', 'Rustvale Bridge', 'Scrying Sheets', 'Doomed Traveler', 'Presence of Gond', 'Dokuchi Silencer', 'Ral, Izzet Viceroy', 'Myr Kinsmith', 'Kruphix''s Insight', 'Desperate Ritual', 'Springleaf Drum', 'Voidwing Hybrid', 'Oath of Kaya', 'Rise and Shine', 'Heliod''s Intervention', 'Hieroglyphic Illumination', 'Quarantine Field', 'Undying Evil', 'Earthquake', 'See Beyond', 'Caldera Hellion', 'Ichorclaw Myr', 'Pillar of the Paruns', 'Disenchant', 'Tocatli Honor Guard', 'Falkenrath Pit Fighter', 'Eternal Scourge', 'Repeal', 'Nimble Obstructionist', 'Eldrazi Skyspawner', 'Sulfur Falls', 'Unmarked Grave', 'Teneb, the Harvester', 'Leonin Lightscribe', 'Tectonic Edge', 'Sculpting Steel', 'Obstinate Baloth', 'Vexing Shusher', 'Gift of Estates', 'Dusk // Dawn', 'Snow-Covered Mountain', 'Agonizing Remorse', 'Dark Petition', 'Glamerdye', 'Concealing Curtains', 'Watcher for Tomorrow', 'Return to the Ranks', 'Ral, Storm Conduit', 'Glaring Aegis', 'Vivid Marsh', 'Kogla, the Titan Ape', 'Valiant Changeling', 'Putrid Imp', 'Sea Gate Oracle', 'Coalition Relic', 'Midnight Guard', 'Brineborn Cutthroat', 'Student of Warfare', 'Dead of Winter', 'Chandra, Flamecaller', 'Boros Guildgate', 'Sea-Dasher Octopus', 'Rakdos''s Return', 'Slogurk, the Overslime', 'Scattered Groves', 'Hooting Mandrills', 'Folio of Fancies', 'Gird for Battle', 'Expedition Envoy', 'Jwari Disruption', 'Mistblade Shinobi', 'Hanweir Garrison', 'Condemn', 'Inevitable Betrayal', 'Orzhov Charm', 'Seal of Removal', 'Embodiment of Fury', 'Bone Shards', 'Elite Inquisitor', 'Burning of Xinye', 'Invoke Calamity', 'Stubborn Denial', 'Farhaven Elf', 'Psychatog', 'Recurring Nightmare', 'Mortuary Mire', 'Always Watching', 'Mystical Teachings', 'Ensoul Artifact', 'Wayward Guide-Beast', 'Restoration Angel', 'Duress', 'The Flame of Keld', 'Sylvan Caryatid', 'Chandra, Fire Artisan', 'Sylvan Scrying', 'Sandsteppe Citadel', 'Vault of the Archangel', 'Inspiring Veteran', 'Shizo, Death''s Storehouse', 'Cathedral of War', 'Temple of Plenty', 'Battle of Frost and Fire', 'Temple of Malady', 'Avacyn''s Pilgrim', 'Winds of Abandon', 'Molten Tributary', 'Birds of Paradise', 'Settle the Wreckage', 'Tranquil Thicket', 'Ramunap Excavator', 'Duneblast', 'Wonder', 'Barter in Blood', 'Treasure Cruise', 'Expedite', 'Sphere of Safety', 'Whispersilk Cloak', 'Forked Bolt', 'Polukranos, World Eater', 'Temple of Silence', 'Silver-Fur Master', 'Idyllic Beachfront', 'Scrabbling Claws', 'Brainstone', 'Unctus, Grand Metatect', 'Boreal Shelf', 'Tangle', 'Toolcraft Exemplar', 'Check for Traps', 'Might of Old Krosa', 'Brave the Sands', 'Colossal Skyturtle', 'Syphon Life', 'Shatter the Sky', 'Mistvault Bridge', 'Glistener Elf', 'Snow-Covered Plains', 'Llanowar Elves', 'Platinum Angel', 'Dissolve', 'Rain of Tears', 'Swooping Lookout', 'Kitchen Finks', 'Black Sun''s Zenith', 'Knight of New Alara', 'Venser, Corpse Puppet', 'Ignite Memories', 'Shivan Reef', 'Drowned Catacomb', 'Yisan, the Wanderer Bard', 'Woe Strider', 'Tilling Treefolk', 'Kor Firewalker', 'Heliod''s Pilgrim', 'Idyllic Tutor', 'Invigorate', 'Nezahal, Primal Tide', 'Elemental Masterpiece', 'Frantic Inventory', 'Ranger of Eos', 'Reckoner''s Bargain', 'Dross Skullbomb', 'Grave Titan', 'Karn''s Bastion', 'Lay Down Arms', 'Raven''s Crime', 'Venerated Loxodon', 'Racers'' Ring', 'The Birth of Meletis', 'Cosmos Elixir', 'Empyrial Plate', 'Ashen Rider', 'The Underworld Cookbook', 'Baneful Omen', 'Sin Collector', 'Elas il-Kor, Sadistic Pilgrim', 'Herd Baloth', 'Rally the Ancestors', 'Cauldron Familiar', 'Sweltering Suns', 'Canyon Slough', 'Stone Rain', 'Healer''s Hawk', 'Dragon''s Hoard', 'Metalwork Colossus', 'Mesmeric Fiend', 'Sunpetal Grove', 'Burst Lightning', 'Orzhov Basilica', 'Unburial Rites', 'Stupor', 'Predatory Sliver', 'Arcane Sanctum', 'Corrupted Crossroads', 'Venser, Shaper Savant', 'Magister of Worth', 'Cloudshift', 'Kozilek''s Predator', 'Disallow', 'Silumgar''s Scorn', 'Nevermore', 'Festering Newt', 'Satyr Wayfinder', 'Flaying Tendrils', 'Ghostfire Blade', 'Psychic Possession', 'Wrench Mind', 'Caves of Koilos', 'Council''s Judgment', 'Raise the Alarm', 'Search for Azcanta', 'Izzet Guildgate', 'Altar of the Goyf', 'Talisman of Unity', 'Dissipate', 'Vryn Wingmare', 'Draugr Necromancer', 'Ayara, First of Locthwain', 'Ivy Lane Denizen', 'Pulse of the Fields', 'Grolnok, the Omnivore', 'Circular Logic', 'Canopy Vista', 'Notorious Throng', 'Jace Beleren', 'Shred Memory', 'Barbarian Ring', 'Makeshift Mannequin', 'Vessel of Nascency', 'Norn''s Inquisitor', 'Scuttling Doom Engine', 'Thassa''s Intervention', 'Ogre Slumlord', 'Precursor Golem', 'Vivid Crag', 'Goldmire Bridge', 'Arbor Elf', 'Diabolic Tutor', 'Dauntless Bodyguard', 'Marble Diamond', 'Ephara, God of the Polis', 'Curiosity', 'Faerie Miscreant', 'Destiny Spinner', 'Bloodchief''s Thirst', 'Archangel Avacyn', 'Kaya, Ghost Assassin', 'Gideon Jura', 'Late to Dinner', 'Elvish Visionary', 'Basking Rootwalla', 'Sea Gate Wreckage', 'Dimensional Infiltrator', 'Thundermaw Hellkite', 'Isolated Chapel', 'Reckless Charge', 'Minor Misstep', 'Sandwurm Convergence', 'Ambush Viper', 'Giant Killer', 'Tribute to Hunger', 'Stir the Grave', 'Serra Ascendant', 'Elspeth Conquers Death', 'Nature''s Lore', 'Leonin Arbiter', 'Castigate', 'Elixir of Immortality', 'Mausoleum Secrets', 'Ornithopter', 'Fiery Justice', 'Vraska''s Contempt', 'Commune with Nature', 'Arcbound Ravager', 'Stinkdrinker Bandit', 'Energy Refractor', 'Worthy Knight', 'Distended Mindbender', 'Tree of Tales', 'Titania, Protector of Argoth', 'Ondu Inversion', 'Prosperous Thief', 'Angel''s Grace', 'Maestros Charm', 'Seismic Assault', 'Summary Dismissal', 'Lantern-Lit Graveyard', 'Patchwork Automaton', 'Search for Tomorrow', 'Geyadrone Dihada', 'Dawn of Hope', 'Ground Seal', 'Moorland Haunt', 'Mouth of Ronom', 'Blightning', 'Sinister Concoction', 'Anafenza, the Foremost', 'Brokers Hideout', 'Renewed Faith', 'Blanchwood Prowler', 'Ponder', 'Rampant Growth', 'Huatli, Radiant Champion', 'Llanowar Augur', 'Squee, Goblin Nabob', 'Geothermal Bog', 'Grenzo, Dungeon Warden', 'Ghost Quarter', 'Scrapwork Mutt', 'Tempest Djinn', 'It That Betrays', 'Kalastria Healer', 'Union of the Third Path', 'Big Score', 'Torens, Fist of the Angels', 'The Celestus', 'Phyrexian Dreadnought', 'Terastodon', 'Cliffside Lookout', 'Basilisk Collar', 'Hero of Bladehold', 'Arbalest Engineers', 'Siege Rhino', 'Harrow', 'Spirit Mantle', 'Dimir Aqueduct', 'Commune with Spirits', 'Sylvan Library', 'Nezumi Graverobber', 'Malakir Rebirth', 'Bogbrew Witch', 'Wrath of God', 'Drown in Ichor', 'Lose Focus', 'Timeless Witness', 'Shrapnel Blast', 'Ivory Tower', 'Angel of Serenity', 'General''s Enforcer', 'Kor Skyfisher', 'Night of Souls'' Betrayal', 'Sunblade Samurai', 'Bituminous Blast', 'Gideon''s Intervention', 'Overgrowth', 'Blessed Alliance', 'Upheaval', 'Knight Exemplar', 'Tolarian Terror', 'Endbringer', 'Artistic Refusal', 'Geomancer''s Gambit', 'Turnabout', 'Yahenni''s Expertise', 'Fleecemane Lion', 'Endless Horizons', 'Solitary Confinement', 'Westvale Abbey', 'Grand Abolisher', 'Tainted Indulgence', 'Benalish Marshal', 'Spatial Contortion', 'Terminus', 'Selesnya Guildgate', 'Feed the Swarm', 'Dragonskull Summit', 'Frost Titan', 'Nissa, Steward of Elements', 'Oust', 'Sphinx''s Herald', 'Fertile Ground', 'Maelstrom Pulse', 'Timeless Dragon', 'Nekrataal', 'Groundswell', 'Nimble Larcenist', 'Go for the Throat', 'Gryff''s Boon', 'Heartless Act', 'Blood on the Snow', 'Corrupted Conviction', 'Phoenix Chick', 'Witching Well', 'Yawgmoth''s Bargain', 'Nissa, Worldwaker', 'Launch the Fleet', 'Halana and Alena, Partners', 'Favored Hoplite', 'Into the Roil', 'Fade from Memory', 'Invisible Stalker', 'Mistcutter Hydra', 'Stoke the Flames', 'Changeling Outcast', 'Cartel Aristocrat', 'Blighted Agent', 'Putrefy', 'Demolition Field', 'Shard Volley', 'Out of Time', 'Contaminated Aquifer', 'Teleportation Circle', 'Pyroclasm', 'Annex Sentry', 'Loxodon Smiter', 'Master of Death', 'Botanical Plaza', 'Frostwalk Bastion', 'Lodestone Golem', 'Elvish Rejuvenator', 'Gravelgill Duo', 'Vampiric Rites', 'All That Glitters', 'Erebos''s Intervention', 'Servo Exhibition', 'White Sun''s Zenith', 'Cabal Ritual', 'Demonic Bargain', 'Lavaclaw Reaches', 'Founding the Third Path', 'Volt Charge', 'Brave the Elements', 'Shardless Agent', 'Jace, Architect of Thought', 'Bogardan Hellkite', 'Wanderwine Hub', 'Jungle Hollow', 'Empyrial Armor', 'Honor of the Pure', 'Angel of Grace', 'Abundant Growth', 'Azorius Guildgate', 'Forsake the Worldly', 'Simic Guildgate', 'Fae of Wishes', 'Sunstrike Legionnaire', 'Resurgent Belief', 'Hornet Queen', 'Arcum''s Astrolabe', 'Smother', 'Secluded Steppe', 'Drainpipe Vermin', 'Fierce Empath', 'Sin Prodder', 'Obscura Charm', 'Unholy Heat', 'Deprive', 'Angrath, the Flame-Chained', 'Eiganjo Castle', 'Purify the Grave', 'Meeting of Minds', 'Pyretic Ritual', 'Mishra''s Self-Replicator', 'Kuldotha Forgemaster', 'Nether Spirit', 'Invasion of Amonkhet', 'Silverblade Paladin', 'Exclude', 'Dire-Strain Rampage', 'Cabaretti Courtyard', 'Mystic Monastery', 'Think Twice', 'Mirran Crusader', 'Commence the Endgame', 'Encroaching Wastes', 'Silverbluff Bridge', 'Mastermind''s Acquisition', 'Bubbling Cauldron', 'Arch of Orazca', 'Darksteel Citadel', 'Lonely Sandbar', 'Malcator, Purity Overseer', 'Throne of the God-Pharaoh', 'Nine Lives', 'Commit // Memory', 'Tide Shaper', 'Urban Evolution', 'Grand Architect', 'Nomad Outpost', 'Gnat Miser', 'Evacuation', 'Boon-Bringer Valkyrie', 'Succumb to Temptation', 'Ancient Ziggurat', 'Augur of Skulls', 'Sunken Hollow', 'Invasion of Regatha', 'Odds // Ends', 'Jungle Shrine', 'Mystifying Maze', 'Brain Freeze', 'Wooded Bastion', 'Leonin Warleader', 'Bring the Ending', 'Blood Artist', 'Kumano Faces Kakkazan', 'Phalanx Leader', 'Ulcerate', 'Jwari Shapeshifter', 'Myth Realized', 'Vraan, Executioner Thane', 'Dispatch', 'Moon-Circuit Hacker', 'Luminarch Ascension', 'Pharika''s Cure', 'Bump in the Night', 'Sire of Insanity', 'Fyndhorn Elves', 'Time of Need', 'Vivid Grove', 'Talisman of Curiosity', 'Kambal, Consul of Allocation', 'Crawling Barrens', 'Frantic Search', 'Thopter Spy Network', 'Nameless Inversion', 'Increasing Ambition', 'Hesitation', 'Ghostly Pilferer', 'Mishra''s Factory', 'Orcish Lumberjack', 'Hope of Ghirapur', 'Wizard''s Retort', 'Pore Over the Pages', 'Utter End', 'Seal of Fire', 'Hinterland Harbor', 'Wrenn''s Resolve', 'Otherworldly Journey', 'Collected Conjuring', 'Yorion, Sky Nomad', 'Golgari Rot Farm', 'Koth, Fire of Resistance', 'Smoldering Marsh', 'Ghostly Flicker', 'Ancient Stirrings', 'Deafening Clarion', 'Stinkweed Imp', 'Tomik, Distinguished Advokist', 'Wood Elves', 'Heap Doll', 'Phyrexian Censor', 'Peek', 'Neutralize', 'Oblivion Ring', 'Tresserhorn Sinks', 'Voltage Surge', 'Eternal Dragon', 'Shimmer Dragon', 'Bident of Thassa', 'Dovin''s Acuity', 'Become Immense', 'Esper Charm', 'Pull from Tomorrow', 'Deep Analysis', 'Delver of Secrets', 'Prologue to Phyresis', 'Mephidross Vampire', 'Chamber Sentry', 'Briarbridge Tracker', 'Incinerate', 'Combat Thresher', 'Golgari Guildgate', 'Archangel of Wrath', 'Stasis Snare', 'Gloomshrieker', 'Primal Command', 'Aegis of the Gods', 'Knight of the White Orchid', 'King Darien XLVIII', 'Monument to Perfection', 'Ayli, Eternal Pilgrim', 'Ardent Recruit', 'Thornwood Falls', 'Drowner of Hope', 'Lochmere Serpent', 'Melira, Sylvok Outcast', 'Eldrazi Displacer', 'Narcomoeba', 'Gift of Immortality', 'Rise // Fall', 'Aether Spellbomb', 'Grim Haruspex', 'Orzhov Guildgate', 'Argentum Armor', 'Figure of Destiny', 'Yasharn, Implacable Earth', 'Discovery // Dispersal', 'Rakdos Cackler', 'Fallaji Archaeologist', 'Needle Spires', 'Demigod of Revenge', 'Seething Song', 'Hostage Taker', 'Fracturing Gust', 'Fiery Temper', 'Flametongue Kavu', 'Choked Estuary', 'Kher Keep', 'Vines of Vastwood', 'Third Path Iconoclast', 'Felidar Retreat', 'Fact or Fiction', 'Anger of the Gods', 'Zuran Orb', 'Kjeldoran Outpost', 'Tezzeret, Artifice Master', 'Cabal Therapist', 'Oracle of Tragedy', 'Stromkirk Noble', 'Hedron Archive', 'Faerie Vandal', 'Circuit Mender', 'Quest for the Holy Relic', 'Terramorphic Expanse', 'Valakut Exploration', 'Drake Haven', 'World Shaper', 'Rites of Initiation', 'Razortide Bridge', 'Dead Weight', 'Merrow Reejerey', 'Rift Bolt', 'Tendo Ice Bridge', 'Waking the Trolls', 'Melira, the Living Cure', 'Invasion of New Capenna', 'Devil''s Play', 'Darksteel Colossus', 'Price of Progress', 'Shape Anew', 'Bubbling Muck', 'Doomskar', 'Orim''s Chant', 'Grafted Butcher', 'Surrak, the Hunt Caller', 'Gallia of the Endless Dance', 'Rakdos Charm', 'Blight Mamba', 'Anafenza, Kin-Tree Spirit', 'Rites of Spring', 'Yavimaya Coast', 'Mazemind Tome', 'Declaration in Stone', 'Ghitu Lavarunner', 'Farseek', 'Green Sun''s Twilight', 'Ashnod, Flesh Mechanist', 'Froghemoth', 'Consult the Necrosages', 'Radiant Grove', 'Audacity', 'Sol Talisman', 'Scour All Possibilities', 'Rune Snag', 'Vigor', 'Destroy Evil', 'Soltari Priest', 'Silumgar, the Drifting Death', 'Mikokoro, Center of the Sea', 'Kiora Bests the Sea God', 'Hall of Oracles', 'River of Tears', 'Voidslime', 'Radha, Heart of Keld', 'Knowledge Pool', 'Spell Pierce', 'Sever the Bloodline', 'Rule of Law', 'Frontier Bivouac', 'Sheltered Thicket', 'Night Market Lookout', 'Xenagos, the Reveler', 'Fire Prophecy', 'Morsel Theft', 'Altar of the Brood', 'Sleight of Hand', 'Ammit Eternal', 'Kunoros, Hound of Athreos', 'Glimpse of Tomorrow', 'Enchantress''s Presence', 'Vampire Nighthawk', 'Illuminator Virtuoso', 'Obscura Storefront', 'Temple of Deceit', 'Rix Maadi Reveler', 'Fetid Pools', 'Fearless Fledgling', 'Phyrexian Unlife', 'Genesis Ultimatum', 'Far // Away', 'Cloudpost', 'Seeker of the Way', 'Dark Ritual', 'Frenetic Sliver', 'Detention Sphere', 'Dying to Serve', 'Merciless Eviction', 'Floriferous Vinewall', 'Reflector Mage', 'Tyrant''s Choice', 'Tear Asunder', 'Murmuring Bosk', 'Crux of Fate', 'Twinshot Sniper', 'Fight as One', 'Herd Migration', 'Ertai''s Scorn', 'Graveborn Muse', 'Nested Shambler', 'Moderation', 'Thraben Inspector', 'Priest of the Haunted Edge', 'Inscribed Tablet', 'Viashino Pyromancer', 'Slaughter Pact', 'Mana Leak', 'Aquitect''s Will', 'Inkwell Leviathan', 'Knight of Glory', 'Carven Caryatid', 'Graven Cairns', 'Self-Assembler', 'Research // Development', 'Greater Tanuki', 'Sigrid, God-Favored', 'Kami of False Hope', 'Executioner''s Capsule', 'Azorius Charm', 'Progenitor Exarch', 'Seal of Cleansing', 'Riveteers Overlook', 'Elderscale Wurm', 'Thrash // Threat', 'Snow-Covered Swamp', 'Silundi Vision', 'Izzet Charm', 'Zephyr Singer', 'Thaumatic Compass', 'Bala Ged Recovery', 'Thawing Glaciers', 'Rishadan Dockhand', 'Nightscape Familiar', 'Vindicate', 'Benevolent Bodyguard', 'Lingering Souls', 'Temple of Triumph', 'Vapor Snag', 'Into the Story', 'Archpriest of Shadows', 'Tezzeret''s Gambit', 'Haunted Mire', 'Saproling Migration', 'Experimental Augury', 'Mindslaver', 'Hyena Umbra', 'Hypnotic Specter', 'Gnawing Vermin', 'Dead // Gone', 'Open the Gates', 'Judge''s Familiar', 'Pariah', 'Wild Cantor', 'Gadrak, the Crown-Scourge', 'Simian Spirit Guide', 'Open the Armory', 'Zombie Infestation', 'Cathartic Reunion', 'Mirror Entity', 'Elves of Deep Shadow', 'Quiet Speculation', 'Venser, the Sojourner', 'Kitesail Freebooter', 'Lotus Cobra', 'Sudden Edict', 'Kaito, Dancing Shadow', 'Tyrant of Discord', 'Hero of Oxid Ridge', 'Trace of Abundance', 'Invasion of Azgol', 'Lost Legacy', 'Guile', 'Shimmerdrift Vale', 'Alms of the Vein', 'Skyclave Shade', 'Worship', 'Akoum Hellhound', 'Vindictive Flamestoker', 'Izzet Boilerworks', 'Ruric Thar, the Unbowed', 'Angel of Condemnation', 'Bilious Skulldweller', 'Deep Forest Hermit', 'Wandering Fumarole', 'Dreadhorde Butcher', 'Forbidden Alchemy', 'Sign in Blood', 'Mulldrifter', 'Aetherspouts', 'Godo, Bandit Warlord', 'Solemnity', 'Woodfall Primus', 'Marauding Blight-Priest', 'Mistveil Plains', 'Experimental Synthesizer', 'Kitchen Imp', 'Kessig Wolf Run', 'Scarab Feast', 'Bloodline Keeper', 'Flooded Grove', 'Lagrella, the Magpie', 'Tezzeret the Schemer', 'Arlinn Kord', 'Doom Blade', 'Tomebound Lich', 'Karumonix, the Rat King', 'Vampire Lacerator', 'Hada Freeblade', 'Secluded Courtyard', 'Arguel''s Blood Fast', 'Invasion of Ergamon', 'Fumigate', 'Opulent Palace', 'Cloudshredder Sliver', 'Sanctum of Ugin', 'Cataclysmic Gearhulk', 'Nullpriest of Oblivion', 'Unstable Mutation', 'Augur of Bolas', 'Master of Etherium', 'Stern Dismissal', 'Sheoldred''s Edict', 'Sprite Dragon', 'Ethereal Armor', 'Urza''s Factory', 'Bloodsoaked Champion', 'Hissing Quagmire', 'Myr Superion', 'Careful Cultivation', 'Cremate', 'Flame Rift', 'Jokulhaups', 'Raze to the Ground', 'Steel Overseer', 'Oona, Queen of the Fae', 'Grimoire Thief', 'Ulvenwald Hydra', 'Spell Burst', 'Sterling Grove', 'Chain Lightning', 'Nimbus Maze', 'Abiding Grace', 'Gitaxian Probe', 'Prophetic Prism', 'Halimar Excavator', 'Triumphant Adventurer', 'Sculpted Perfection', 'Negate', 'Cleansing Wildfire', 'Commune with the Gods', 'Hard Evidence', 'Evolving Wilds', 'Tooth and Nail', 'Tocasia''s Dig Site'))) 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, 2.6, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.7 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Slogurk, the Overslime', 'Geomancer''s Gambit', 'Sweltering Suns', 'Mindcrank', 'Kefnet the Mindful', 'Kozilek''s Predator', 'Eternal Dragon', 'Rift Bolt', 'Boreal Shelf', 'Phyrexian Censor', 'Blanchwood Prowler', 'Cremate', 'Anguished Unmaking', 'Drowned Rusalka', 'Radha, Heart of Keld', 'Huatli, Radiant Champion', 'Kitchen Imp', 'Pyrite Spellbomb', 'Blightbelly Rat', 'Nevermore', 'Shape Anew', 'Tidespout Tyrant', 'Idyllic Tutor', 'Sea Gate Wreckage', 'Sulfur Falls', 'Sculpting Steel', 'Mystic Monastery', 'Ashenmoor Liege', 'Argentum Armor', 'Smuggler''s Copter', 'Knowledge Pool', 'Altar of the Goyf', 'Maelstrom Pulse', 'Expedition Envoy', 'Lochmere Serpent', 'Shimmerdrift Vale', 'Go for the Throat', 'Midnight Guard', 'Sultai Charm', 'Venser, Corpse Puppet', 'Vault Skirge', 'Llanowar Elves', 'Hooting Mandrills', 'Minor Misstep', 'Scuttling Doom Engine', 'Agonizing Remorse', 'Rites of Initiation', 'Late to Dinner', 'Change the Equation', 'Lost Legacy', 'Annex Sentry', 'Vampire Lacerator', 'Yavimaya Coast', 'Ertai''s Scorn', 'Tangled Islet', 'Madcap Experiment', 'Vryn Wingmare', 'The Birth of Meletis', 'Obliterate', 'Gruul Turf', 'Orcish Lumberjack', 'Gitaxian Probe', 'Nullpriest of Oblivion', 'Thopter Spy Network', 'Ossification', 'Bident of Thassa', 'Fact or Fiction', 'Darksteel Colossus', 'Draugr Necromancer', 'Cathedral of War', 'Vines of Vastwood', 'Racers'' Ring', 'Dimir Aqueduct', 'Mesmeric Fiend', 'Goblin Bombardment', 'Mnemonic Sphere', 'Negate', 'Rotting Rats', 'Ashen Rider', 'Aetherspouts', 'Battle of Wits', 'Kami of False Hope', 'Predatory Sliver', 'Terminus', 'Prophetic Prism', 'Solitary Confinement', 'Into the Story', 'Executioner''s Capsule', 'Timely Reinforcements', 'Stone Rain', 'Farseek', 'Tocatli Honor Guard', 'Lavaclaw Reaches', 'Shizo, Death''s Storehouse', 'Ornithopter', 'Metalwork Colossus', 'Venser, the Sojourner', 'Witching Well', 'Otherworldly Journey', 'Revitalize', 'Dusk // Dawn', 'Riveteers Charm', 'Opulent Palace', 'Oona, Queen of the Fae', 'Graaz, Unstoppable Juggernaut', 'Wrench Mind', 'Midnight Reaper', 'Mastermind''s Acquisition', 'Abundant Growth', 'Explore', 'Sudden Edict', 'Lantern-Lit Graveyard', 'Triskelion', 'Teferi, Mage of Zhalfir', 'Hornet Queen', 'Gruul Guildgate', 'Simic Guildgate', 'Empyrial Plate', 'Elderscale Wurm', 'Varolz, the Scar-Striped', 'Cabal Therapist', 'Mindslaver', 'Koth, Fire of Resistance', 'Return to the Ranks', 'Surrak, the Hunt Caller', 'Dimensional Infiltrator', 'Rain of Tears', 'Burning of Xinye', 'Shivan Reef', 'Collected Conjuring', 'Felidar Cub', 'Artistic Refusal', 'Fyndhorn Elves', 'Terminate', 'Ashnod, Flesh Mechanist', 'Earthquake', 'Sylvan Caryatid', 'Experimental Augury', 'Melira, the Living Cure', 'Inevitable Betrayal', 'Crux of Fate', 'Tempest Djinn', 'Embodiment of Fury', 'Bubbling Muck', 'Unstable Mutation', 'Ignite Memories', 'Sunken Hollow', 'Blood on the Snow', 'Throne of the God-Pharaoh', 'Maestros Charm', 'Ovika, Enigma Goliath', 'Ghitu Lavarunner', 'Defiant Strike', 'Silverbluff Bridge', 'Raven''s Crime', 'Bloodline Keeper', 'Riveteers Overlook', 'Drainpipe Vermin', 'Stinkweed Imp', 'Quiet Speculation', 'Prosperous Thief', 'Gift of Immortality', 'Briarbridge Tracker', 'Seeker of the Way', 'Stave Off', 'Nine Lives', 'Angel of Condemnation', 'Halana and Alena, Partners', 'Selesnya Guildgate', 'Devious Cover-Up', 'Patchwork Automaton', 'Fiery Justice', 'Dakmor Salvage', 'Myr Battlesphere', 'Archangel Avacyn', 'Mazemind Tome', 'Lay Down Arms', 'Notorious Throng', 'Solemnity', 'Rakdos''s Return', 'Ruric Thar, the Unbowed', 'Temple of Triumph', 'Hall of Oracles', 'Mystical Teachings', 'Search for Azcanta', 'Invasion of Amonkhet', 'Reveillark', 'The Underworld Cookbook', 'Voltage Surge', 'Birds of Paradise', 'Mikokoro, Center of the Sea', 'Idyllic Beachfront', 'Botanical Plaza', 'Terramorphic Expanse', 'Pariah', 'Worthy Knight', 'Quest for the Holy Relic', 'Mirran Crusader', 'Secluded Courtyard', 'Glacial Fortress', 'Razortide Bridge', 'Quarantine Field', 'Wood Elves', 'Spell Burst', 'Smother', 'Greater Tanuki', 'Sigrid, God-Favored', 'Fiery Temper', 'Increasing Ambition', 'Llanowar Augur', 'Ramunap Excavator', 'Corrupted Conviction', 'Graveborn Muse', 'Reinforced Ronin', 'Celestial Colonnade', 'Herald of the Pantheon', 'Gird for Battle', 'Obzedat, Ghost Council', 'Mistcutter Hydra', 'Moorland Haunt', 'Rites of Spring', 'Calciform Pools', 'Dokuchi Silencer', 'Isolated Chapel', 'Ardent Recruit', 'Radiant Grove', 'Glorybringer', 'Kiora, the Crashing Wave', 'Oblivion Ring', 'Spirit Mantle', 'Rally the Ancestors', 'Black Sun''s Zenith', 'Protect the Negotiators', 'Temple of Plenty', 'Tezzeret the Schemer', 'Stubborn Denial', 'Sunstrike Legionnaire', 'Chandra, Fire Artisan', 'Blight Mamba', 'Disenchant', 'Benalish Marshal', 'Benthic Biomancer', 'Commune with the Gods', 'Bloodsoaked Champion', 'Geothermal Bog', 'Duress', 'Duneblast', 'Timeless Dragon', 'Jukai Naturalist', 'Hinterland Harbor', 'Recurring Nightmare', 'Seal of Cleansing', 'Cathartic Reunion', 'Zuran Orb', 'Geyadrone Dihada', 'Ensoul Artifact', 'Vivid Crag', 'Blightning', 'Knight Exemplar', 'Obscura Storefront', 'Hada Freeblade', 'Merfolk Mistbinder', 'Grand Arbiter Augustin IV', 'Incinerate', 'Distended Mindbender', 'Fallaji Archaeologist', 'Fire Prophecy', 'Loxodon Smiter', 'Tomik, Distinguished Advokist', 'Golgari Guildgate', 'Throat Slitter', 'Lurrus of the Dream-Den', 'Hesitation', 'Merciless Eviction', 'Invasion of New Capenna', 'Bogardan Hellkite', 'Cosmos Elixir', 'Vapor Snag', 'Simian Spirit Guide', 'Early Harvest', 'Urza''s Factory', 'Disrupting Shoal', 'Pardic Miner', 'The Seedcore', 'Saproling Migration', 'Lavinia of the Tenth', 'Chamber Sentry', 'Luminarch Ascension', 'Commune with Spirits', 'Archon of Sun''s Grace', 'Endless Horizons', 'Altar of the Brood', 'Brineborn Cutthroat', 'Silumgar''s Scorn', 'Galerider Sliver', 'Fleecemane Lion', 'Invoke Calamity', 'Remorseful Cleric', 'Fracturing Gust', 'Canyon Slough', 'Diabolic Tutor', 'Lotus Cobra', 'Ichorclaw Myr', 'Resurgent Belief', 'Yasharn, Implacable Earth', 'Sterling Grove', 'Time of Need', 'Rix Maadi Reveler', 'River of Tears', 'Choked Estuary', 'Oracle of Mul Daya', 'Shard Volley', 'Servo Exhibition', 'Rocco, Cabaretti Caterer', 'Torens, Fist of the Angels', 'Orzhov Charm', 'Energy Refractor', 'Darksteel Citadel', 'Moon-Circuit Hacker', 'Coiling Oracle', 'Viscera Seer', 'Raffine''s Informant', 'Nomad Outpost', 'Elvish Rejuvenator', 'Combat Research', 'Dismal Backwater', 'Aether Spellbomb', 'Bala Ged Recovery', 'Vampire Neonate', 'Tocasia''s Dig Site', 'Abzan Charm', 'Karn''s Bastion', 'Talisman of Impulse', 'Pharika''s Cure', 'Jace Beleren', 'Thornglint Bridge', 'Condemn', 'Purify the Grave', 'Teleportation Circle', 'Thaumatic Compass', 'Cataclysmic Gearhulk', 'Evacuation', 'Seismic Assault', 'Pain Seer', 'Stromkirk Noble', 'Knight of Glory', 'Temple of Silence', 'Reckoner''s Bargain', 'Third Path Iconoclast', 'Waking the Trolls', 'Game Trail', 'Shriekmaw', 'Pulse of the Fields', 'Dauntless Bodyguard', 'Angrath, the Flame-Chained', 'Hypergenesis', 'Tomebound Lich', 'Graven Lore', 'Fae of Wishes', 'Kaya, Ghost Assassin', 'Nameless Inversion', 'Acclaimed Contender', 'Research // Development', 'Dakkon, Shadow Slayer', 'Merrow Reejerey', 'Touch the Spirit Realm', 'Chain Lightning', 'Hero of Bladehold', 'Frost Marsh', 'Night Market Lookout', 'Brave the Elements', 'Zombie Infestation', 'Bolas''s Citadel', 'Astral Drift', 'Cliffside Lookout', 'Yahenni''s Expertise', 'Oracle of Tragedy', 'Wrenn''s Resolve', 'Leonin Arbiter', 'Gods Willing', 'Desperate Ritual', 'Orzhov Basilica', 'Stirring Wildwood', 'Gruul Spellbreaker', 'Glint-Sleeve Siphoner', 'Vindictive Flamestoker', 'Kitchen Finks', 'Gloomshrieker', 'Golgari Rot Farm', 'Chandra, Flamecaller', 'Woodfall Primus', 'Festering Newt', 'Faeburrow Elder', 'Azorius Guildgate', 'Archaeomancer', 'Raging Ravine', 'Tribute to Horobi', 'Vampire Hexmage', 'Kazandu Blademaster', 'Ivory Tower', 'Secluded Steppe', 'Knight of the White Orchid', 'Favored Hoplite', 'Tyrant of Discord', 'Tranquil Thicket', 'Kappa Tech-Wrecker', 'Lagrella, the Magpie', 'Abiding Grace', 'Ral, Storm Conduit', 'Gift of Estates', 'Impulse', 'Combat Thresher', 'Clifftop Retreat', 'Murderous Redcap', 'Sacred Peaks', 'Repeal', 'Winds of Abandon', 'Chittering Rats', 'Akroan Crusader', 'Maze''s End', 'Think Twice', 'Urban Evolution', 'Elixir of Immortality', 'Devil''s Play', 'Hideous End', 'Fight as One', 'Marauding Blight-Priest', 'Alms of the Vein', 'Barbed Sextant', 'Wall of Omens', 'Eldrazi Skyspawner', 'Hyena Umbra', 'Flame Rift', 'Scarab Feast', 'Chandra, Pyromaster', 'Loran''s Escape', 'Vraska''s Contempt', 'Blood Artist', 'Xerex Strobe-Knight', 'Stinkdrinker Bandit', 'Flooded Grove', 'Augur of Skulls', 'Pull from Tomorrow', 'Elspeth Conquers Death', 'Haunted Mire', 'The Celestus', 'Magister of Worth', 'Dragon''s Hoard', 'Volt Charge', 'Oust', 'Voldaren Pariah', 'Destiny Spinner', 'Marit Lage''s Slumber', 'Woe Strider', 'Gideon''s Intervention', 'Lonely Sandbar', 'Cryptic Caves', 'Nether Spirit', 'Boon-Bringer Valkyrie', 'Invisible Stalker', 'Scab-Clan Berserker', 'Curiosity', 'Glimmerpost', 'Shimmer Dragon', 'Thrash // Threat', 'Ulcerate', 'Careful Cultivation', 'Blade Splicer', 'Kruphix''s Insight', 'Green Sun''s Twilight', 'Bone Shards', 'Peek', 'Ad Nauseam', 'Steel Overseer', 'Vivid Grove', 'Teshar, Ancestor''s Apostle', 'Frostwalk Bastion', 'Bloodvial Purveyor', 'Mistblade Shinobi', 'Seal of Fire', 'General''s Enforcer', 'Presence of Gond', 'Bump in the Night', 'Succumb to Temptation', 'Lazotep Chancellor', 'Sprite Dragon', 'Sea Gate Oracle', 'Dreadhorde Butcher', 'Mana Leak', 'Bitter Reunion', 'Crawling Barrens', 'Obscura Charm', 'Ghostly Flicker', 'Deafening Clarion', 'Snow-Covered Mountain', 'Slagstorm', 'Wasteland Strangler', 'Sever the Bloodline', 'Port Town', 'Ambush Viper', 'Repudiate // Replicate', 'Dread Return', 'Universal Automaton', 'Sculpted Perfection', 'Thraben Inspector', 'Thawing Glaciers', 'Scrying Sheets', 'Banishing Slash', 'Zephyr Singer', 'Arbor Elf', 'All That Glitters', 'Become Immense', 'Inkwell Leviathan', 'Strike It Rich', 'Sol Talisman', 'Second Sunrise', 'Glamerdye', 'Tainted Indulgence', 'Cloudshredder Sliver', 'Divinity of Pride', 'It That Betrays', 'Dross Skullbomb', 'Brain Freeze', 'Vraska''s Fall', 'Putrid Imp', 'Sunlit Marsh', 'Nimble Larcenist', 'Sinister Concoction', 'Conflagrate', 'Surge of Salvation', 'Murmuring Bosk', 'Snow-Covered Swamp', 'Temple of Enlightenment', 'Cabal Initiate', 'Rakdos Charm', 'Realm Razer', 'Far // Away', 'Demigod of Revenge', 'Voidslime', 'Phyrexian Dreadnought', 'Bubbling Cauldron', 'Haunted Fengraf', 'Anafenza, Kin-Tree Spirit', 'Sea-Dasher Octopus', 'Renewed Faith', 'Sunscour', 'Battle of Frost and Fire', 'Ghostfire Blade', 'Lose Focus', 'Nephalia Drownyard', 'Herd Baloth', 'Sunpetal Grove', 'Ral, Izzet Viceroy', 'Rootbound Crag', 'Invasion of Regatha', 'Overgrowth', 'Dead // Gone', 'Drown in Ichor', 'Cabal Ritual', 'Elite Inquisitor', 'Upheaval', 'Disallow', 'Unholy Heat', 'Falkenrath Pit Fighter', 'Vexing Shusher', 'Kor Skyfisher', 'Argentum Masticore', 'Arlinn Kord', 'Caves of Koilos', 'Pillar of the Paruns', 'Mirage Mirror', 'Rishadan Dockhand', 'Glistener Elf', 'Electrolyze', 'Heliod''s Intervention', 'Chief of the Foundry', 'Arcane Sanctum', 'Mesa Enchantress', 'Master of Death', 'Phoenix Chick', 'Ondu Inversion', 'Drake Haven', 'Harmonize', 'Blessed Alliance', 'Mirror Entity', 'Ponder', 'Avacyn''s Pilgrim', 'Dawn of Hope', 'Commune with Nature', 'Rise and Shine', 'Teneb, the Harvester', 'Dark Ritual', 'Nissa, Worldwaker', 'Tyrant''s Choice', 'Krosan Grip', 'Mishra''s Factory', 'Joint Exploration', 'Gryff''s Boon', 'Ogre Slumlord', 'Hostage Taker', 'Myr Superion', 'Helm of the Host', 'Steppe Lynx', 'Lodestone Golem', 'Declaration in Stone', 'Wonder', 'Melira, Sylvok Outcast', 'Cut Down', 'Enchantress''s Presence', 'Mortuary Mire', 'Dispatch', 'Cloudshift', 'Harrow', 'Fierce Empath', 'Worship', 'Frenetic Sliver', 'Tangle', 'Seething Song', 'Wanderwine Hub', 'Judge''s Familiar', 'Tidehollow Sculler', 'Dryad Militant', 'Phantasmal Image', 'Fetid Pools', 'Restoration Angel', 'Kuldotha Forgemaster', 'Bloodchief Ascension', 'Summary Dismissal', 'Nezahal, Primal Tide', 'Unburial Rites', 'Nekrataal', 'Healer''s Hawk', 'Faerie Miscreant', 'Hard Evidence', 'Founding the Third Path', 'Herd Migration', 'Ayara, First of Locthwain', 'Eldrazi Displacer', 'Saffi Eriksdotter', 'Polukranos, World Eater', 'Midnight Clock', 'Sheltered Thicket', 'Ayli, Eternal Pilgrim', 'Tooth and Nail', 'Mycosynth Golem', 'Carven Caryatid', 'Knight of the Reliquary', 'Eerie Ultimatum', 'Kalastria Healer', 'Sorin, Vengeful Bloodlord', 'Baneful Omen', 'Pharika''s Libation', 'Spectral Shift', 'Evolving Wilds', 'Dream Trawler', 'Ethersworn Sphinx', 'Spoils of the Vault', 'Open the Armory', 'Doomed Traveler', 'Delver of Secrets', 'Vadrik, Astral Archmage', 'Slaughter Pact', 'Sarkhan, the Dragonspeaker', 'Leonin Lightscribe', 'Oona''s Grace', 'Silver-Fur Master', 'Mistvault Bridge', 'Stoic Rebuttal', 'Kessig Wolf Run', 'Faerie Conclave', 'Wrath of God', 'Dregscape Zombie', 'Meeting of Minds', 'Artisan of Kozilek', 'Check for Traps', 'Unmarked Grave', 'Primal Command', 'Esper Charm', 'Dread Wanderer', 'Sleight of Hand', 'Smoldering Marsh', 'Shrieking Affliction', 'Undying Evil', 'Elvish Visionary', 'Student of Warfare', 'Nightscape Familiar', 'Crack the Earth', 'Abundant Harvest', 'Grand Abolisher', 'Triumphant Adventurer', 'Boros Guildgate', 'Cleansing Wildfire', 'Frost Titan', 'Epic Experiment', 'Viashino Pyromancer', 'Rampant Growth', 'Genesis Hydra', 'Tolarian Terror', 'Vraan, Executioner Thane', 'Into the Roil', 'Groundswell', 'Always Watching', 'Dissipate', 'Network Disruptor', 'Benevolent Bodyguard', 'Mephidross Vampire', 'Tanglepool Bridge', 'Dovin''s Acuity', 'Caldera Hellion', 'Distorted Curiosity', 'Fertile Ground', 'Commit // Memory', 'Giant Killer', 'Woodland Cemetery', 'Sanctum of Ugin', 'Titania, Protector of Argoth', 'Big Score', 'Supreme Will', 'Bilious Skulldweller', 'Syphon Life', 'Myth Realized', 'Tectonic Edge', 'Faith''s Reward', 'Kabira Takedown', 'Knight of New Alara', 'Ishkanah, Grafwidow', 'Cloudpost', 'Grave Titan', 'Malcator, Purity Overseer', 'Stern Dismissal', 'Barbarian Ring', 'Leonin Relic-Warder', 'Molten Tributary', 'Angel''s Grace', 'Tribute to Hunger', 'Quicken', 'Raise the Alarm', 'Big Game Hunter', 'Bring the Ending', 'Silundi Vision', 'Froghemoth', 'Sire of Insanity', 'Scrapheap Scrounger', 'Sylvan Scrying', 'Serra Ascendant', 'Psychatog', 'Reckless Rage', 'Icehide Golem', 'Consult the Necrosages', 'Felidar Retreat', 'Flaying Tendrils', 'Aegis of the Gods', 'Cauldron Familiar', 'Goblin Dark-Dwellers', 'Sarkhan the Masterless', 'Summer Bloom', 'Master of Etherium', 'Twinshot Sniper', 'Kitesail Freebooter', 'Approach of the Second Sun', 'Rule of Law', 'Etherium Sculptor', 'Shatter the Sky', 'Phyrexian Unlife', 'Morsel Theft', 'Talisman of Unity', 'Grimoire Thief', 'Angel of Grace', 'World Shaper', 'Assault // Battery', 'Tide Shaper', 'Grenzo, Dungeon Warden', 'Fruit of Tizerus', 'Kaito, Dancing Shadow', 'Valakut Exploration', 'Aetherblade Agent', 'Labyrinth of Skophos', 'Jwari Shapeshifter', 'Dead of Winter', 'Deprive', 'Call of the Death-Dweller', 'Monument to Perfection', 'Mina and Denn, Wildborn', 'Seal of Removal', 'Llanowar Mentor', 'Kogla, the Titan Ape', 'Nature''s Lore', 'Priest of the Haunted Edge', 'Concealing Curtains', 'Ethereal Armor', 'Lightning Strike', 'Archangel of Wrath', 'Sigil of the Empty Throne', 'Doom Blade', 'Frantic Search', 'Sins of the Past', 'Phyrexian Revoker', 'Blighted Agent', 'Drossforge Bridge', 'Toolcraft Exemplar', 'Heap Doll', 'Spell Pierce', 'Frantic Inventory', 'Springleaf Drum', 'Stupor', 'Gigadrowse', 'Feed the Swarm', 'Vault of the Archangel', 'Colossal Skyturtle', 'Kjeldoran Outpost', 'Grolnok, the Omnivore', 'Runed Halo', 'Oath of Kaya', 'Fade from Memory', 'Arcum''s Astrolabe', 'Scattered Groves', 'Tree of Tales', 'Corrupted Crossroads', 'Mulldrifter', 'Turnabout', 'Out of Time', 'Progenitor Exarch', 'Izzet Boilerworks', 'Slagwoods Bridge', 'Chief Engineer', 'Mystifying Maze', 'Eiganjo Castle', 'Dead Weight', 'Hieroglyphic Illumination', 'Elas il-Kor, Sadistic Pilgrim', 'Wandering Fumarole', 'Orim''s Chant', 'White Sun''s Zenith', 'Vindicate', 'Jokulhaups', 'Illuminator Virtuoso', 'Folio of Fancies', 'Venerable Knight', 'Dimir Guildgate', 'Dissolve', 'Dire-Strain Rampage', 'Whispersilk Cloak', 'Hope of Ghirapur', 'Silent Gravestone', 'Night of Souls'' Betrayal', 'Platinum Angel', 'Temple of Abandon', 'Control Magic', 'Cold-Eyed Selkie', 'Tear Asunder', 'Consuming Vapors', 'Kumano Faces Kakkazan', 'King Darien XLVIII', 'Arbalest Engineers', 'Arch of Orazca', 'Hissing Quagmire', 'Ancient Ziggurat', 'Genesis Ultimatum', 'Cartel Aristocrat', 'Sin Collector', 'Barter in Blood', 'Thassa''s Intervention', 'Might of Old Krosa', 'Gideon Jura', 'Faerie Vandal', 'Gravelgill Duo', 'Circuit Mender', 'Decree of Justice', 'Victim of Night', 'Azorius Charm', 'Norn''s Inquisitor', 'Jwari Disruption', 'Crawling Chorus', 'Stir the Grave', 'Westvale Abbey', 'Sandsteppe Citadel', 'Gnat Miser', 'Treasure Cruise', 'Mausoleum Secrets', 'Doomskar', 'Altered Ego', 'Guile', 'Yavimaya Iconoclast', 'Neutralize', 'Wayward Guide-Beast', 'Eternal Scourge', 'Champion of Wits', 'Settle the Wreckage', 'Makeshift Mannequin', 'Deep Forest Hermit', 'Ancient Amphitheater', 'Spatial Contortion', 'Anafenza, the Foremost', 'Smallpox', 'Kiora Bests the Sea God', 'Pore Over the Pages', 'Ephara, God of the Polis', 'Scour All Possibilities', 'Pyroclasm', 'Tresserhorn Sinks', 'Call to the Grave', 'General Ferrous Rokiric', 'Forgotten Cave', 'Canopy Vista', 'Voyaging Satyr', 'Vessel of Nascency', 'Rustvale Bridge', 'Drowner of Hope', 'Godo, Bandit Warlord', 'Narcomoeba', 'Mistveil Plains', 'Oona''s Prowler', 'Rise // Fall', 'Terastodon', 'Gutterbones', 'Scrapwork Mutt', 'Kor Firewalker', 'Fetid Heath', 'Tilling Treefolk', 'Thragtusk', 'Nimble Obstructionist', 'Yorion, Sky Nomad', 'Rakdos Guildgate', 'Inspiring Veteran', 'Stasis Snare', 'Diffusion Sliver', 'Pyretic Ritual', 'Skyclave Shade', 'Elves of Deep Shadow', 'Sylvan Library', 'Rust Goliath', 'Tendrils of Agony', 'Floriferous Vinewall', 'Akoum Hellhound', 'Mishra''s Self-Replicator', 'Venser, Shaper Savant', 'Scrabbling Claws', 'Jungle Shrine', 'Assemble the Legion', 'Umara Wizard', 'Hypnotic Specter', 'Angel of Serenity', 'Corpse Cur', 'Hanweir Garrison', 'Frontier Bivouac', 'Battlefield Forge', 'Misery Charm', 'Sin Prodder', 'Kunoros, Hound of Athreos', 'Tezzeret, Artifice Master', 'Grafted Butcher', 'Invasion of Zendikar', 'Fearless Fledgling', 'Bogbrew Witch', 'Wild Cantor', 'Commence the Endgame', 'Soltari Priest', 'Discovery // Dispersal', 'Union of the Third Path', 'See Beyond', 'Reckless Charge', 'Sandwurm Convergence', 'Nested Shambler', 'Cultivate', 'Temple of Mystery', 'Price of Progress', 'Spirited Companion', 'Brainstone', 'Jungle Hollow', 'Grim Haruspex', 'Circular Logic', 'Memoricide', 'Brave the Sands', 'Forbid', 'Shrapnel Blast', 'Mouth of Ronom', 'Changeling Outcast', 'Glaring Aegis', 'Sylvan Advocate', 'Nimble Trapfinder', 'Exclude', 'Vigor', 'Nezumi Informant', 'Cabaretti Courtyard', 'Halimar Excavator', 'Mulch', 'Moderation', 'The Scorpion God', 'Gnawing Vermin', 'Ranger of Eos', 'Destroy Evil', 'Lingering Souls', 'Farhaven Elf', 'Prologue to Phyresis', 'Weathered Wayfarer', 'Heliod''s Pilgrim', 'Odds // Ends', 'Mind''s Desire', 'Demolition Field', 'Sinew Sliver', 'Necrogen Spellbomb', 'Tribal Flames', 'Sign in Blood', 'Bloodbraid Elf', 'Temple of Deceit', 'Brokers Hideout', 'Thundermaw Hellkite', 'Swooping Lookout', 'Basking Rootwalla', 'Elemental Masterpiece', 'Acidic Slime', 'Blue Sun''s Zenith', 'Blazing Rootwalla', 'Silumgar, the Drifting Death', 'Karumonix, the Rat King', 'Izzet Guildgate', 'Aquitect''s Will', 'Squee, Goblin Nabob', 'Gateway Plaza', 'Tezzeret''s Gambit', 'Unsubstantiate', 'Dragonskull Summit', 'Timeless Witness', 'Encroaching Wastes', 'Satyr Wayfinder', 'Augur of Bolas', 'Reflector Mage', 'Stoke the Flames', 'Tendo Ice Bridge', 'Flametongue Kavu', 'Contaminated Aquifer', 'Consume the Meek', 'Wilt', 'Ground Seal', 'Dying to Serve', 'Dark Petition', 'Talisman of Curiosity', 'Garruk Wildspeaker', 'Astral Slide', 'Vampire Nighthawk', 'Marble Diamond', 'Wizard''s Retort', 'Eidolon of Blossoms', 'Gather the Pack', 'Council''s Judgment', 'Erebos''s Intervention', 'Watcher for Tomorrow', 'Deep Analysis', 'Evangel of Synthesis', 'Hedron Archive', 'Raze to the Ground', 'Expedite', 'Voidwing Hybrid', 'Psychic Possession', 'Hero of Oxid Ridge', 'Invigorate', 'Xenagos, the Reveler', 'Nimbus Maze', 'Goblin Electromancer', 'Bloodchief''s Thirst', 'Oni-Cult Anvil', 'Precursor Golem', 'Forked Bolt', 'Utter End', 'Kher Keep', 'Ally Encampment', 'Empyrial Armor', 'Demonic Bargain', 'Silverblade Paladin', 'Open the Gates', 'Duplicant', 'Delay', 'Ulvenwald Hydra', 'Ancient Stirrings', 'Yawgmoth''s Bargain', 'Anger of the Gods', 'Kambal, Consul of Allocation', 'Leonin Warleader', 'Martyr of Sands', 'Grand Architect', 'Wooded Bastion', 'Shardless Agent', 'Aetherling', 'Buried Ruin', 'Temple of Malady', 'Sheoldred''s Edict', 'Engulf the Shore', 'Verduran Enchantress', 'Greater Gargadon', 'Coalition Relic', 'Arcbound Ravager', 'Forging the Anchor', 'Orzhov Guildgate', 'Needle Spires', 'Glimpse of Tomorrow', 'Vampiric Rites', 'Inscribed Tablet', 'Goldmire Bridge', 'Zur''s Weirding', 'Jace, Architect of Thought', 'Rune Snag', 'The Flame of Keld', 'Ivy Lane Denizen', 'Valiant Changeling', 'Pack Rat', 'Phalanx Leader', 'Wolfbriar Elemental', 'Trace of Abundance', 'Sphinx''s Herald', 'Venerated Loxodon', 'Gallia of the Endless Dance', 'Grave Scrabbler', 'Honor of the Pure', 'Gadrak, the Crown-Scourge', 'Bituminous Blast', 'Shred Memory', 'Sphere of Safety', 'Izzet Charm', 'Vivid Marsh', 'Figure of Destiny', 'Fumigate', 'Merfolk Sovereign', 'Dark-Dweller Oracle', 'Snow-Covered Plains', 'Rakdos Cackler', 'Armored Scrapgorger', 'Detention Sphere', 'Thrill of Possibility', 'Basilisk Collar', 'Self-Assembler', 'Hour of Promise', 'Plated Geopede', 'Hero''s Downfall', 'Archpriest of Shadows', 'Day of Judgment', 'Heartless Act', 'Porphyry Nodes', 'Unctus, Grand Metatect', 'Chaotic Transformation', 'Launch the Fleet', 'Nezumi Graverobber', 'Forbidden Alchemy', 'Myr Kinsmith', 'Arguel''s Blood Fast', 'Nezumi Shortfang', 'Mothdust Changeling', 'Vedalken Heretic', 'Experimental Synthesizer', 'Putrefy', 'Siege Rhino', 'Angel of Despair', 'Ammit Eternal', 'Counterflux', 'Ravenous Squirrel', 'Invasion of Azgol', 'Sylvan Primordial', 'Endbringer', 'Sunblade Samurai', 'Shambling Vent', 'Territorial Kavu', 'Drowned Catacomb', 'Ghost Quarter', 'Invasion of Ergamon', 'Ghostly Pilferer', 'Mindsplice Apparatus', 'Yisan, the Wanderer Bard', 'Graven Cairns', 'Malakir Rebirth', 'Memory Lapse', 'Forsake the Worldly', 'Obstinate Baloth', 'Search for Tomorrow', 'Nissa, Steward of Elements', 'Audacity', 'Gleeful Demolition', 'Swiftfoot Boots', 'Burst Lightning', 'Castigate', 'Squadron Hawk', 'Thornwood Falls', 'Malicious Malfunction', 'Unlucky Witness'))) 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, 2.7, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.7 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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', 'Pharika''s Cure', 'Folio of Fancies', 'Yahenni''s Expertise', 'Stern Dismissal', 'Putrid Imp', 'Orzhov Charm', 'Assault // Battery', 'Vines of Vastwood', 'Urban Evolution', 'Frontier Bivouac', 'Doomed Traveler', 'Inkwell Leviathan', 'Spell Pierce', 'Fierce Empath', 'Cryptic Caves', 'Kumano Faces Kakkazan', 'Orzhov Basilica', 'Cloudshift', 'Summer Bloom', 'The Birth of Meletis', 'Kunoros, Hound of Athreos', 'Akroan Crusader', 'Disallow', 'Hypnotic Specter', 'Ethereal Armor', 'Joint Exploration', 'Clifftop Retreat', 'Vessel of Nascency', 'Mothdust Changeling', 'Martyr of Sands', 'Zur''s Weirding', 'Psychatog', 'Ayli, Eternal Pilgrim', 'Utter End', 'Memory Lapse', 'Wolfbriar Elemental', 'Titania, Protector of Argoth', 'Universal Automaton', 'Silumgar, the Drifting Death', 'Scrapheap Scrounger', 'General Ferrous Rokiric', 'Forked Bolt', 'Mortuary Mire', 'Call of the Death-Dweller', 'Phyrexian Revoker', 'Pain Seer', 'Crack the Earth', 'Helm of the Host', 'Crux of Fate', 'Lost Legacy', 'Steel Overseer', 'Stave Off', 'Kiora, the Crashing Wave', 'Earthquake', 'Altar of the Goyf', 'Etherium Sculptor', 'Grolnok, the Omnivore', 'Aetherblade Agent', 'Sigil of the Empty Throne', 'Rust Goliath', 'Midnight Clock', 'Haunted Mire', 'Anguished Unmaking', 'Jace Beleren', 'Mulldrifter', 'Nezumi Shortfang', 'Dreadhorde Butcher', 'Tocatli Honor Guard', 'Riveteers Overlook', 'Kessig Wolf Run', 'Deep Analysis', 'Mana Leak', 'Fearless Fledgling', 'Mastermind''s Acquisition', 'Eldrazi Skyspawner', 'Talisman of Curiosity', 'Executioner''s Capsule', 'Fiery Justice', 'Quiet Speculation', 'Forsake the Worldly', 'Simic Guildgate', 'Bloodline Keeper', 'Master of Death', 'Smallpox', 'Commune with Nature', 'Dragonskull Summit', 'Shizo, Death''s Storehouse', 'Sculpted Perfection', 'Wood Elves', 'Dragon''s Hoard', 'Wrenn''s Resolve', 'Vedalken Heretic', 'Astral Drift', 'Rootbound Crag', 'Glimpse of Tomorrow', 'Ichorclaw Myr', 'Stubborn Denial', 'Saproling Migration', 'Grenzo, Dungeon Warden', 'Colossal Skyturtle', 'Moon-Circuit Hacker', 'Shivan Reef', 'Sea-Dasher Octopus', 'Fleecemane Lion', 'Archon of Sun''s Grace', 'Hero of Bladehold', 'Tree of Tales', 'Fade from Memory', 'Gnat Miser', 'Archpriest of Shadows', 'Pilfer', 'Fae of Wishes', 'Halimar Excavator', 'Renewed Faith', 'Presence of Gond', 'The Celestus', 'Brineborn Cutthroat', 'Discovery // Dispersal', 'Leonin Warleader', 'Chamber Sentry', 'Thawing Glaciers', 'Stasis Snare', 'Zuran Orb', 'Launch the Fleet', 'Sudden Edict', 'Open the Armory', 'Phyrexian Unlife', 'Giant Killer', 'Bloodchief Ascension', 'Lochmere Serpent', 'Vampire Nighthawk', 'Empyrial Armor', 'Seal of Cleansing', 'Pyretic Ritual', 'Supreme Will', 'Far // Away', 'Nimble Obstructionist', 'Bubbling Cauldron', 'Ishkanah, Grafwidow', 'Pyrite Spellbomb', 'Forbidden Alchemy', 'Malicious Malfunction', 'Rotting Rats', 'Protect the Negotiators', 'Seal of Fire', 'Condemn', 'Golgari Guildgate', 'Wizard''s Retort', 'Late to Dinner', 'Angel''s Grace', 'Enchantress''s Presence', 'Herd Migration', 'Kazandu Blademaster', 'Epic Experiment', 'Delver of Secrets', 'Surge of Salvation', 'Obzedat, Ghost Council', 'Ponder', 'Dispatch', 'Blightning', 'Sylvan Advocate', 'Carven Caryatid', 'Angel of Condemnation', 'Waking the Trolls', 'Tribute to Horobi', 'Gideon Jura', 'Canyon Slough', 'Hypergenesis', 'Caldera Hellion', 'Leonin Relic-Warder', 'Hinterland Harbor', 'Undying Evil', 'Blightbelly Rat', 'Fertile Ground', 'Torens, Fist of the Angels', 'Birds of Paradise', 'Circular Logic', 'Nimbus Maze', 'Oona, Queen of the Fae', 'Stirring Wildwood', 'Verduran Enchantress', 'Duplicant', 'Volt Charge', 'Mirage Mirror', 'Chain Lightning', 'Oni-Cult Anvil', 'Change the Equation', 'Goblin Bombardment', 'Treasure Cruise', 'Drowned Rusalka', 'Simian Spirit Guide', 'Mausoleum Secrets', 'Marauding Blight-Priest', 'Genesis Hydra', 'Glorybringer', 'Tidespout Tyrant', 'Mnemonic Sphere', 'Scrapwork Mutt', 'Inscribed Tablet', 'Worthy Knight', 'Faerie Miscreant', 'Putrefy', 'Fetid Pools', 'Jokulhaups', 'Green Sun''s Twilight', 'Basking Rootwalla', 'Woodfall Primus', 'Engulf the Shore', 'Gutterbones', 'Gigadrowse', 'Spoils of the Vault', 'Secluded Steppe', 'Tendo Ice Bridge', 'Lose Focus', 'Fire Prophecy', 'Thornglint Bridge', 'See Beyond', 'Healer''s Hawk', 'Unlucky Witness', 'Venerated Loxodon', 'Reveillark', 'Maze''s End', 'Become Immense', 'Sterling Grove', 'Angel of Despair', 'Reckless Charge', 'Soltari Priest', 'Lantern-Lit Graveyard', 'Sinister Concoction', 'Gadrak, the Crown-Scourge', 'Encroaching Wastes', 'Triskelion', 'Bloodbraid Elf', 'Serra Ascendant', 'Gravelgill Duo', 'Grafted Butcher', 'Mistcutter Hydra', 'Smoldering Marsh', 'Sphere of Safety', 'Dokuchi Silencer', 'Herald of the Pantheon', 'Diabolic Tutor', 'Rocco, Cabaretti Caterer', 'Temple of Plenty', 'Dread Return', 'Gateway Plaza', 'Invasion of Azgol', 'Dryad Militant', 'Festering Newt', 'Raven''s Crime', 'Cosmos Elixir', 'Thraben Inspector', 'Duneblast', 'Cloudshredder Sliver', 'Lavinia of the Tenth', 'Melira, the Living Cure', 'Avacyn''s Pilgrim', 'Lazotep Chancellor', 'Celestial Colonnade', 'Rustvale Bridge', 'Prologue to Phyresis', 'Strike It Rich', 'Viscera Seer', 'Graaz, Unstoppable Juggernaut', 'Ghostly Pilferer', 'Riveteers Charm', 'Kefnet the Mindful', 'Obliterate', 'Vraska''s Contempt', 'Merfolk Mistbinder', 'Chandra, Fire Artisan', 'Pull from Tomorrow', 'Racers'' Ring', 'Phyrexian Censor', 'Darksteel Colossus', 'Terramorphic Expanse', 'Pack Rat', 'Misery Charm', 'Ral, Izzet Viceroy', 'Master of Etherium', 'Gloomshrieker', 'Double Vision', 'Invasion of Ergamon', 'Pore Over the Pages', 'Voidslime', 'Raging Ravine', 'Sea Gate Wreckage', 'Heap Doll', 'Elderscale Wurm', 'Herd Baloth', 'Eldrazi Displacer', 'Nightscape Familiar', 'Early Harvest', 'Tide Shaper', 'Brokers Hideout', 'Peek', 'Frost Marsh', 'Think Twice', 'Mystic Monastery', 'Xenagos, the Reveler', 'Porphyry Nodes', 'Oracle of Tragedy', 'Turnabout', 'Vraska''s Fall', 'Demigod of Revenge', 'Sunpetal Grove', 'Tangled Islet', 'Voidwing Hybrid', 'Tilling Treefolk', 'Vraan, Executioner Thane', 'Monument to Perfection', 'Sprite Dragon', 'Viashino Pyromancer', 'Commune with Spirits', 'Doomskar', 'Kiora Bests the Sea God', 'Gird for Battle', 'Research // Development', 'Vampire Lacerator', 'Ulvenwald Hydra', 'Dire-Strain Rampage', 'Gods Willing', 'Sorin, Grim Nemesis', 'Jukai Naturalist', 'Elves of Deep Shadow', 'Dawn of Hope', 'Gift of Estates', 'Frost Titan', 'Tezzeret''s Gambit', 'Thundermaw Hellkite', 'Shimmerdrift Vale', 'Altar of the Brood', 'Unstable Mutation', 'Sylvan Scrying', 'Curiosity', 'Grand Arbiter Augustin IV', 'Forgotten Cave', 'Deafening Clarion', 'Glacial Fortress', 'Tanglepool Bridge', 'Kor Skyfisher', 'Shambling Vent', 'Quest for the Holy Relic', 'Kami of False Hope', 'Oona''s Prowler', 'Augur of Bolas', 'Conflagrate', 'Weathered Wayfarer', 'Sarkhan the Masterless', 'Falkenrath Pit Fighter', 'Snow-Covered Mountain', 'Changeling Outcast', 'Consult the Necrosages', 'Phyrexian Dreadnought', 'Tranquil Thicket', 'Arbor Elf', 'Fact or Fiction', 'Glint-Sleeve Siphoner', 'Timeless Dragon', 'Commune with the Gods', 'Maestros Charm', 'Eiganjo Castle', 'Deep Forest Hermit', 'Astral Slide', 'Nimble Trapfinder', 'Endbringer', 'Day of Judgment', 'Fumigate', 'Banishing Slash', 'Abzan Charm', 'Victim of Night', 'Malakir Rebirth', 'Tribal Flames', 'Heliod''s Intervention', 'Tezzeret the Schemer', 'Prosperous Thief', 'Arbalest Engineers', 'Mindcrank', 'Jungle Shrine', 'Venser, Corpse Puppet', 'Artisan of Kozilek', 'Electrolyze', 'Felidar Cub', 'Black Sun''s Zenith', 'Ardent Recruit', 'Sol Talisman', 'Abiding Grace', 'Terastodon', 'Fight as One', 'Delay', 'Teneb, the Harvester', 'Yisan, the Wanderer Bard', 'Felidar Retreat', 'Stir the Grave', 'Tyrant of Discord', 'Hooting Mandrills', 'Wandering Fumarole', 'Impulse', 'Cliffside Lookout', 'Tomik, Distinguished Advokist', 'Pulse of the Fields', 'Valakut Exploration', 'Razortide Bridge', 'Tolarian Terror', 'Nezahal, Primal Tide', 'Dovin''s Acuity', 'Groundswell', 'Barter in Blood', 'Sign in Blood', 'Labyrinth of Skophos', 'King Darien XLVIII', 'Acclaimed Contender', 'Kor Firewalker', 'Unmarked Grave', 'Mycosynth Golem', 'Triumphant Adventurer', 'Farseek', 'Meeting of Minds', 'Geomancer''s Gambit', 'Tear Asunder', 'Dark Ritual', 'Tectonic Edge', 'Wanderwine Hub', 'Magister of Worth', 'Mystical Teachings', 'Grand Abolisher', 'Nissa, Steward of Elements', 'Obstinate Baloth', 'Summary Dismissal', 'Go for the Throat', 'Izzet Guildgate', 'Concealing Curtains', 'Fiery Temper', 'Archangel of Wrath', 'Idyllic Beachfront', 'Needle Spires', 'Ancient Ziggurat', 'Frantic Inventory', 'Kappa Tech-Wrecker', 'Valiant Changeling', 'Tainted Indulgence', 'Murmuring Bosk', 'Karn''s Bastion', 'Search for Tomorrow', 'Chief Engineer', 'Search for Azcanta', 'Anafenza, Kin-Tree Spirit', 'Snow-Covered Plains', 'Morsel Theft', 'Izzet Boilerworks', 'Madcap Experiment', 'Elite Inquisitor', 'Forging the Anchor', 'Frantic Search', 'Nine Lives', 'Argentum Armor', 'Distended Mindbender', 'Moderation', 'Rakdos Cackler', 'Spell Burst', 'Tocasia''s Dig Site', 'Gather the Pack', 'Student of Warfare', 'Flametongue Kavu', 'Crawling Barrens', 'Shard Volley', 'Temple of Triumph', 'Temple of Abandon', 'Kitchen Imp', 'Elvish Visionary', 'Tyrant''s Choice', 'Galerider Sliver', 'Empyrial Plate', 'Lagrella, the Magpie', 'Hard Evidence', 'Icehide Golem', 'Toolcraft Exemplar', 'Dismal Backwater', 'Fruit of Tizerus', 'Invasion of Regatha', 'Watcher for Tomorrow', 'Haunted Fengraf', 'Myth Realized', 'Chandra, Flamecaller', 'Cataclysmic Gearhulk', 'Expedite', 'Revitalize', 'Sculpting Steel', 'Boreal Shelf', 'Llanowar Elves', 'Founding the Third Path', 'Alms of the Vein', 'Rain of Tears', 'Westvale Abbey', 'Nested Shambler', 'Barbarian Ring', 'Silent Gravestone', 'Canopy Vista', 'Gryff''s Boon', 'Stoke the Flames', 'Settle the Wreckage', 'Consuming Vapors', 'Kuldotha Forgemaster', 'Self-Assembler', 'Hero of Oxid Ridge', 'Brain Freeze', 'Krosan Grip', 'Inevitable Betrayal', 'Anger of the Gods', 'Rakdos Guildgate', 'Izzet Charm', 'Froghemoth', 'Chaotic Transformation', 'Sylvan Primordial', 'Wall of Omens', 'Defiant Strike', 'River of Tears', 'Servo Exhibition', 'Narcomoeba', 'Azorius Charm', 'Chandra, Pyromaster', 'Nimble Larcenist', 'The Scorpion God', 'Hedron Archive', 'Corrupted Crossroads', 'Ghost Quarter', 'Phoenix Chick', 'Artistic Refusal', 'Nether Spirit', 'Tooth and Nail', 'Spirited Companion', 'Knight Exemplar', 'Control Magic', 'Silundi Vision', 'Drowned Catacomb', 'Kalastria Healer', 'Barbed Sextant', 'Golgari Rot Farm', 'Smuggler''s Copter', 'Quicken', 'Arch of Orazca', 'Merfolk Sovereign', 'Thaumatic Compass', 'Upheaval', 'Burst Lightning', 'Blood Artist', 'Ivy Lane Denizen', 'Silverblade Paladin', 'Talisman of Unity', 'Blue Sun''s Zenith', 'Stoic Rebuttal', 'Tresserhorn Sinks', 'Ayara, First of Locthwain', 'Dimir Guildgate', 'Nephalia Drownyard', 'Eternal Scourge', 'Ondu Inversion', 'Knight of Glory', 'Dauntless Bodyguard', 'Elas il-Kor, Sadistic Pilgrim', 'Bala Ged Recovery', 'Ranger of Eos', 'Vivid Grove', 'Battlefield Forge', 'Vindictive Flamestoker', 'Elspeth Conquers Death', 'Ancient Amphitheater', 'Azorius Guildgate', 'The Seedcore', 'Zombie Infestation', 'Idyllic Tutor', 'Ashen Rider', 'Rally the Ancestors', 'Radha, Heart of Keld', 'Ramunap Excavator', 'Ashenmoor Liege', 'Faeburrow Elder', 'Marble Diamond', 'Angel of Serenity', 'Baneful Omen', 'Drainpipe Vermin', 'Invisible Stalker', 'Dead of Winter', 'Spatial Contortion', 'Orim''s Chant', 'Detention Sphere', 'Combat Thresher', 'Sunscour', 'Vivid Crag', 'Nezumi Informant', 'Benevolent Bodyguard', 'Harmonize', 'Sea Gate Oracle', 'Benthic Biomancer', 'Sheltered Thicket', 'Shred Memory', 'Sin Collector', 'Zephyr Singer', 'Repudiate // Replicate', 'Throne of the God-Pharaoh', 'Decree of Justice', 'Kabira Takedown', 'Archaeomancer', 'Grimoire Thief', 'Blanchwood Prowler', 'Boon-Bringer Valkyrie', 'Mouth of Ronom', 'Unctus, Grand Metatect', 'Temple of Enlightenment', 'Smother', 'Lavaclaw Reaches', 'Aetherspouts', 'Experimental Augury', 'Halana and Alena, Partners', 'Progenitor Exarch', 'Whispersilk Cloak', 'Dream Trawler', 'Bituminous Blast', 'Mesmeric Fiend', 'Mulch', 'Mindslaver', 'Akoum Hellhound', 'Reckless Rage', 'Graven Cairns', 'Mina and Denn, Wildborn', 'Myr Battlesphere', 'Increasing Ambition', 'Knight of New Alara', 'Prophetic Prism', 'Hope of Ghirapur', 'Blight Mamba', 'Voyaging Satyr', 'Sylvan Caryatid', 'Embodiment of Fury', 'Bitter Reunion', 'Scrying Sheets', 'Tidehollow Sculler', 'Blighted Agent', 'Return to the Ranks', 'Vigor', 'Bogardan Hellkite', 'Second Sunrise', 'Vampire Hexmage', 'Maelstrom Pulse', 'Doom Blade', 'Slagstorm', 'Mistveil Plains', 'Gleeful Demolition', 'Bident of Thassa', 'Aquitect''s Will', 'Negate', 'Sunken Hollow', 'Molten Tributary', 'Combat Research', 'Arcbound Ravager', 'Chief of the Foundry', 'Sever the Bloodline', 'Lurrus of the Dream-Den', 'Godo, Bandit Warlord', 'Contaminated Aquifer', 'Disenchant', 'Neutralize', 'Bring the Ending', 'Scattered Groves', 'Talisman of Impulse', 'Disrupting Shoal', 'Cauldron Familiar', 'Thrash // Threat', 'Mistvault Bridge', 'Armored Scrapgorger', 'Destroy Evil', 'Rakdos''s Return', 'Nomad Outpost', 'Hyena Umbra', 'Aether Spellbomb', 'Bump in the Night', 'Midnight Guard', 'Geyadrone Dihada', 'Grand Architect', 'Mirran Crusader', 'Glamerdye', 'Evolving Wilds', 'Glistener Elf', 'Heliod''s Pilgrim', 'Fracturing Gust', 'Pardic Miner', 'Argentum Masticore', 'Ghostly Flicker', 'Invasion of New Capenna', 'Throat Slitter', 'Explore', 'Spectral Shift', 'Port Town', 'Woe Strider', 'Sandwurm Convergence', 'Sulfur Falls', 'Ensoul Artifact', 'Mazemind Tome', 'Briarbridge Tracker', 'Ravenous Squirrel', 'Koth, Fire of Resistance', 'Mephidross Vampire', 'Tendrils of Agony', 'Call to the Grave', 'Jungle Hollow', 'Glimmerpost', 'Choked Estuary', 'Oust', 'Liliana Vess', 'Grave Titan', 'Bubbling Muck', 'Gruul Spellbreaker', 'Bogbrew Witch', 'Mirror Entity', 'Network Disruptor', 'Consecrate // Consume', 'Fetid Heath', 'Jwari Shapeshifter', 'Eternal Dragon', 'Ignite Memories', 'Curse of Exhaustion', 'Feed the Swarm', 'Sylvan Library', 'Makeshift Mannequin', 'Worship', 'Venerable Knight', 'Mikokoro, Center of the Sea', 'Yasharn, Implacable Earth', 'Sunlit Marsh', 'Snow-Covered Swamp', 'Cabaretti Courtyard', 'Oracle of Mul Daya', 'Wrench Mind', 'Shardless Agent', 'Timeless Witness', 'Obscura Charm', 'Hornet Queen', 'Sleight of Hand', 'Shatter the Sky', 'Otherworldly Journey', 'Dross Skullbomb', 'Slaughter Pact', 'Vexing Shusher', 'Lay Down Arms', 'Norn''s Inquisitor', 'White Sun''s Zenith', 'Kjeldoran Outpost', 'Collected Conjuring', 'Ashnod, Flesh Mechanist', 'Stromkirk Noble', 'Predatory Sliver', 'Varolz, the Scar-Striped', 'Cut Down', 'Ghitu Lavarunner', 'Shimmer Dragon', 'The Flame of Keld', 'Goblin Dark-Dwellers', 'Divinity of Pride', 'Umara Wizard', 'Fyndhorn Elves', 'Champion of Wits', 'Thopter Spy Network', 'Endless Horizons', 'Rites of Initiation', 'Rise and Shine', 'Scrabbling Claws', 'Teleportation Circle', 'Orzhov Guildgate', 'Tezzeret, Artifice Master', 'Solitary Confinement', 'Shrieking Affliction', 'Thornwood Falls', 'Benalish Marshal', 'Geothermal Bog', 'Diffusion Sliver', 'Gift of Immortality', 'Yavimaya Coast', 'Pillar of the Paruns', 'Sanctum of Ugin', 'Yorion, Sky Nomad', 'Calciform Pools', 'Hada Freeblade', 'Memoricide', 'Kogla, the Titan Ape', 'Dead // Gone', 'Dread Wanderer', 'Bloodvial Purveyor', 'Seismic Assault', 'Ruric Thar, the Unbowed', 'Dissolve', 'Urza''s Factory', 'Floriferous Vinewall', 'Wayward Guide-Beast', 'Hero''s Downfall', 'Squadron Hawk', 'Mindsplice Apparatus', 'Cathartic Reunion', 'Dark Petition', 'Vault of the Archangel', 'Botanical Plaza', 'Karumonix, the Rat King', 'Saffi Eriksdotter', 'Drake Haven', 'Silver-Fur Master', 'Counterflux', 'Hissing Quagmire', 'Phantasmal Image', 'Dark-Dweller Oracle', 'Ghostfire Blade', 'Melira, Sylvok Outcast', 'Big Score', 'Crawling Chorus', 'Orcish Lumberjack', 'Pyroclasm', 'Realm Razer', 'Seeker of the Way', 'Lingering Souls', 'Eidolon of Blossoms', 'Ethersworn Sphinx', 'Spirit Mantle', 'Sigrid, God-Favored', 'Voldaren Pariah', 'Slagwoods Bridge', 'Deprive', 'Cathedral of War', 'Myr Superion', 'Scuttling Doom Engine', 'Brave the Sands', 'Blessed Alliance', 'Leonin Arbiter', 'Nameless Inversion', 'Llanowar Mentor', 'Primal Command', 'Psychic Possession', 'Sweltering Suns', 'Ad Nauseam', 'Opulent Palace', 'Seething Song', 'Grave Scrabbler', 'Illuminator Virtuoso', 'Battle of Frost and Fire', 'Temple of Silence', 'Experimental Synthesizer', 'Cartel Aristocrat', 'Vryn Wingmare', 'Teshar, Ancestor''s Apostle', 'Sphinx''s Herald', 'Demonic Bargain', 'Knowledge Pool', 'Hall of Oracles', 'Kozilek''s Predator', 'Kaya, Ghost Assassin', 'Dissipate', 'Shape Anew', 'Draugr Necromancer', 'Malcator, Purity Overseer', 'Invigorate', 'Sultai Charm', 'Angrath, the Flame-Chained', 'General''s Enforcer', 'Overgrowth', 'All That Glitters', 'Nezumi Graverobber', 'Pharika''s Libation', 'Wasteland Strangler', 'Twinshot Sniper', 'Kitchen Finks', 'Arcane Sanctum', 'Shrapnel Blast', 'Dimir Aqueduct', 'Jace, Architect of Thought', 'Teferi, Mage of Zhalfir', 'Devious Cover-Up', 'Vadrik, Astral Archmage', 'Resurgent Belief', 'Scour All Possibilities', 'Reinforced Ronin', 'Pariah', 'Lonely Sandbar', 'Kitesail Freebooter', 'Stinkweed Imp', 'Wonder', 'Luminarch Ascension', 'Rampant Growth', 'Reckoner''s Bargain', 'Surrak, the Hunt Caller', 'Bone Shards', 'Audacity', 'Mystifying Maze', 'Frenetic Sliver', 'Temple of Mystery', 'Elixir of Immortality', 'Touch the Spirit Realm', 'Raffine''s Informant', 'Winds of Abandon', 'Gnawing Vermin', 'Swiftfoot Boots', 'Yawgmoth''s Bargain', 'Eerie Ultimatum', 'Reflector Mage', 'Purify the Grave', 'Faith''s Reward', 'Jwari Disruption', 'Ivory Tower', 'Phalanx Leader', 'Kher Keep', 'Cabal Initiate', 'Thrill of Possibility', 'Ulcerate', 'Favored Hoplite', 'Quarantine Field', 'Energy Refractor', 'Frostwalk Bastion', 'Night Market Lookout', 'Blazing Rootwalla', 'Metalwork Colossus', 'Venser, the Sojourner', 'Sin Prodder', 'Voltage Surge', 'Knight of the White Orchid', 'Tribute to Hunger', 'Thassa''s Intervention', 'Merrow Reejerey', 'Remorseful Cleric', 'Coalition Relic', 'Gruul Turf', 'Esper Charm', 'Sinew Sliver', 'Recurring Nightmare', 'Rune Snag', 'Raise the Alarm', 'Llanowar Augur', 'Stupor', 'Evacuation', 'Duress', 'Unburial Rites', 'Elvish Rejuvenator', 'Sarkhan, the Dragonspeaker', 'Vault Skirge', 'Arcum''s Astrolabe', 'Into the Story', 'Succumb to Temptation', 'Corpse Cur', 'Knight of the Reliquary', 'Thragtusk', 'Vapor Snag', 'Hanweir Garrison', 'Greater Gargadon', 'Big Game Hunter', 'Secluded Courtyard', 'Timely Reinforcements', 'Ogre Slumlord', 'Abundant Growth', 'Darksteel Citadel', 'Arlinn Kord', 'Abundant Harvest', 'Garruk Wildspeaker', 'Game Trail', 'Heartless Act', 'Devil''s Play', 'Graven Lore', 'Coiling Oracle', 'Drown in Ichor', 'It That Betrays', 'Annex Sentry', 'Figure of Destiny', 'Dakkon, Shadow Slayer', 'Oblivion Ring', 'Graveborn Muse', 'Cabal Therapist', 'Dead Weight', 'Burning of Xinye', 'Scab-Clan Berserker', 'Approach of the Second Sun', 'Bilious Skulldweller', 'Platinum Angel', 'Dregscape Zombie', 'Ornithopter', 'Greater Tanuki', 'Out of Time', 'Grim Haruspex', 'Selesnya Guildgate', 'Hesitation', 'Flooded Grove', 'Into the Roil', 'Mind''s Desire', 'Mistblade Shinobi', 'Elemental Masterpiece', 'Third Path Iconoclast', 'Sins of the Past', 'Drossforge Bridge', 'Polukranos, World Eater', 'Swooping Lookout', 'Shriekmaw', 'Expedition Envoy', 'Ertai''s Scorn', 'Invoke Calamity', 'Midnight Reaper', 'Ral, Storm Conduit', 'Evangel of Synthesis', 'Gitaxian Probe', 'Distorted Curiosity', 'Sunstrike Legionnaire', 'Priest of the Haunted Edge', 'Solemnity', 'Chittering Rats', 'Ossification', 'Mishra''s Self-Replicator', 'Gallia of the Endless Dance', 'Ally Encampment', 'Commit // Memory', 'Slogurk, the Overslime', 'Demolition Field', 'Invasion of Amonkhet', 'Open the Gates', 'Wilt', 'Invasion of Zendikar', 'Leonin Lightscribe', 'Wrath of God', 'Oath of Kaya', 'Wild Cantor', 'Archangel Avacyn', 'Scarab Feast', 'Ancient Stirrings', 'Terminate', 'Marit Lage''s Slumber', 'Aetherling', 'Unholy Heat', 'Nissa, Worldwaker', 'Buried Ruin', 'Obscura Storefront', 'Castigate', 'Cultivate', 'Possibility Storm', 'Incinerate', 'Woodland Cemetery', 'Cloudpost', 'Goblin Electromancer', 'Flaying Tendrils', 'Bolas''s Citadel', 'Tangle', 'Raze to the Ground', 'Dusk // Dawn', 'Faerie Vandal', 'Dimensional Infiltrator', 'Cabal Ritual', 'Rites of Spring', 'Rakdos Charm', 'Venser, Shaper Savant', 'World Shaper', 'Precursor Golem', 'Bloodsoaked Champion', 'Satyr Wayfinder', 'Circuit Mender', 'Sandsteppe Citadel', 'Blade Splicer', 'Hieroglyphic Illumination', 'Destiny Spinner', 'Gideon''s Intervention', 'Acidic Slime', 'Ephara, God of the Polis', 'Tomebound Lich', 'Augur of Skulls', 'Vampiric Rites', 'Plated Geopede', 'Trace of Abundance', 'Gruul Guildgate', 'Dakmor Salvage', 'Sacred Peaks', 'Steppe Lynx', 'Silverbluff Bridge', 'Bloodchief''s Thirst', 'Lodestone Golem', 'Angel of Grace', 'Isolated Chapel', 'Faerie Conclave', 'Brainstone', 'Price of Progress', 'Council''s Judgment', 'Goldmire Bridge', 'Inspiring Veteran', 'Repeal', 'Sire of Insanity', 'Assemble the Legion', 'Erebos''s Intervention', 'Mesa Enchantress', 'Skyclave Shade', 'Radiant Grove', 'Basilisk Collar', 'Kambal, Consul of Allocation', 'Myr Kinsmith', 'Runed Halo', 'Blood on the Snow', 'Stinkdrinker Bandit', 'Vampire Neonate', 'Tempest Djinn', 'Night of Souls'' Betrayal', 'Farhaven Elf', 'Nullpriest of Oblivion', 'Rishadan Dockhand', 'Springleaf Drum', 'Sorin, Vengeful Bloodlord', 'Stone Rain', 'Loxodon Smiter', 'Merciless Eviction', 'Aegis of the Gods', 'Mishra''s Factory', 'Territorial Kavu', 'Kaito, Dancing Shadow', 'Battle of Wits', 'Kruphix''s Insight', 'Rift Bolt', 'Nature''s Lore', 'Sheoldred''s Edict', 'Arguel''s Blood Fast', 'Anafenza, the Foremost', 'Oona''s Grace', 'Hideous End', 'Minor Misstep', 'Guile', 'Hostage Taker', 'Vindicate', 'Huatli, Radiant Champion', 'Always Watching', 'Syphon Life', 'Unsubstantiate', 'Loran''s Escape', 'Patchwork Automaton', 'Rule of Law', 'Ambush Viper', 'Brave the Elements', 'Forbid', 'Lightning Strike', 'Check for Traps', 'Honor of the Pure', 'Vivid Marsh', 'Temple of Deceit', 'Ammit Eternal', 'Exclude', 'Dying to Serve', 'Altered Ego', 'Nevermore', 'Sunblade Samurai', 'Siege Rhino', 'Fallaji Archaeologist', 'Genesis Ultimatum', 'Declaration in Stone', 'Ground Seal', 'Union of the Third Path', 'Terminus', 'The Underworld Cookbook', 'Murderous Redcap', 'Corrupted Conviction', 'Yavimaya Iconoclast', 'Cold-Eyed Selkie', 'Squee, Goblin Nabob', 'Might of Old Krosa', 'Careful Cultivation', 'Restoration Angel', 'Temple of Malady', 'Silumgar''s Scorn', 'Necrogen Spellbomb', 'Caves of Koilos', 'Judge''s Familiar', 'Cleansing Wildfire', 'Agonizing Remorse', 'Lotus Cobra', 'Drowner of Hope', 'Time of Need', 'Notorious Throng', 'Commence the Endgame', 'Witching Well', 'Nekrataal', 'Xerex Strobe-Knight', 'Moorland Haunt', 'Rise // Fall', 'Consume the Meek', 'Ovika, Enigma Goliath', 'Harrow', 'Flame Rift', 'Odds // Ends', 'Seal of Removal', 'Cremate', 'Boros Guildgate', 'Desperate Ritual', 'Glaring Aegis', 'Rix Maadi Reveler', 'Hour of Promise'))) 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, 2.7, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.7 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Nevermore', 'Favored Hoplite', 'Izzet Boilerworks', 'Scarab Feast', 'Frontier Bivouac', 'Late to Dinner', 'Westvale Abbey', 'Seismic Assault', 'Slaughter Pact', 'Shizo, Death''s Storehouse', 'Buried Ruin', 'Gitaxian Probe', 'Oona''s Prowler', 'Tear Asunder', 'Chandra, Pyromaster', 'Arcum''s Astrolabe', 'Pulse of the Fields', 'Duress', 'Dark Ritual', 'Upheaval', 'Lightning Strike', 'Rise and Shine', 'Sheltered Thicket', 'Drown in Ichor', 'Glorybringer', 'Master of Etherium', 'Hypergenesis', 'Springleaf Drum', 'Gift of Immortality', 'Racers'' Ring', 'Ensoul Artifact', 'Destroy Evil', 'Mirage Mirror', 'Ornithopter', 'Voltage Surge', 'Ghost Quarter', 'Whispersilk Cloak', 'Triumphant Adventurer', 'Territorial Kavu', 'Kjeldoran Outpost', 'Bring the Ending', 'Valakut Exploration', 'Temple of Triumph', 'Reckoner''s Bargain', 'Graven Cairns', 'Melira, Sylvok Outcast', 'Flooded Grove', 'Basking Rootwalla', 'Kuldotha Forgemaster', 'Invasion of Amonkhet', 'Lazotep Chancellor', 'Vapor Snag', 'Bala Ged Recovery', 'Felidar Retreat', 'Coalition Relic', 'Thraben Inspector', 'Terastodon', 'Vindictive Flamestoker', 'Hieroglyphic Illumination', 'Gyruda, Doom of Depths', 'Jace, Architect of Thought', 'Frantic Inventory', 'Nether Spirit', 'Rain of Tears', 'Archangel of Wrath', 'Kami of False Hope', 'Undying Evil', 'Vivid Marsh', 'Zur''s Weirding', 'Think Twice', 'Lost Legacy', 'Embodiment of Fury', 'Kazandu Blademaster', 'Rakdos Charm', 'Ardent Recruit', 'Teferi, Mage of Zhalfir', 'Vindicate', 'Knowledge Pool', 'Declaration in Stone', 'Dread Wanderer', 'Mazemind Tome', 'Solitary Confinement', 'Oni-Cult Anvil', 'Ghostly Pilferer', 'Silverblade Paladin', 'Nested Shambler', 'Silverbluff Bridge', 'Wilt', 'Demolition Field', 'Banishing Slash', 'Corpse Cur', 'Inevitable Betrayal', 'Research // Development', 'Anger of the Gods', 'Glistener Elf', 'Inspiring Veteran', 'Ravenous Squirrel', 'Gutterbones', 'Dismal Backwater', 'Fierce Empath', 'Sylvan Library', 'Icehide Golem', 'Cataclysmic Gearhulk', 'Llanowar Mentor', 'Gird for Battle', 'Hypnotic Specter', 'Voidslime', 'Aetherblade Agent', 'Grand Arbiter Augustin IV', 'Feed the Swarm', 'Shimmer Dragon', 'Invigorate', 'Melira, the Living Cure', 'Seal of Fire', 'Wrench Mind', 'Archangel Avacyn', 'Saproling Migration', 'Night of Souls'' Betrayal', 'Search for Azcanta', 'Valiant Changeling', 'Pull from Tomorrow', 'Incinerate', 'Deep Forest Hermit', 'Arcbound Ravager', 'Karn''s Bastion', 'Lingering Souls', 'Tolarian Terror', 'Cold-Eyed Selkie', 'Pain Seer', 'Invasion of New Capenna', 'Vryn Wingmare', 'Spectral Shift', 'Blue Sun''s Zenith', 'Abundant Harvest', 'Expedition Envoy', 'Phyrexian Censor', 'Inscribed Tablet', 'Glimpse of Tomorrow', 'Call to the Grave', 'Cartel Aristocrat', 'Jokulhaups', 'Burst Lightning', 'Glint-Sleeve Siphoner', 'Dream Trawler', 'Fade from Memory', 'Third Path Iconoclast', 'Chief Engineer', 'Mistveil Plains', 'Lochmere Serpent', 'Tomebound Lich', 'Pariah', 'Greater Gargadon', 'Wood Elves', 'Kogla, the Titan Ape', 'Empyrial Armor', 'Zombie Infestation', 'Volt Charge', 'Silumgar, the Drifting Death', 'Burning of Xinye', 'Combat Research', 'Midnight Reaper', 'Battle of Wits', 'Grave Titan', 'Invoke Calamity', 'Ishkanah, Grafwidow', 'Mesmeric Fiend', 'Epic Experiment', 'Curse of Exhaustion', 'Sigrid, God-Favored', 'Venerable Knight', 'Pyretic Ritual', 'Nomad Outpost', 'Ancient Ziggurat', 'Lavinia of the Tenth', 'Cut Down', 'Audacity', 'Eerie Ultimatum', 'Wandering Fumarole', 'Genesis Ultimatum', 'Angel of Despair', 'Raffine''s Informant', 'Elvish Visionary', 'Gnawing Vermin', 'Boon-Bringer Valkyrie', 'Grave Scrabbler', 'Chaotic Transformation', 'Astral Slide', 'Syphon Life', 'Scab-Clan Berserker', 'Ephara, God of the Polis', 'Tocatli Honor Guard', 'Radha, Heart of Keld', 'Chamber Sentry', 'Fiery Justice', 'Mycosynth Golem', 'Wanderwine Hub', 'Sheoldred''s Edict', 'Vault Skirge', 'Become Immense', 'Cloudshift', 'Oblivion Ring', 'Repeal', 'Stubborn Denial', 'Elves of Deep Shadow', 'Sprite Dragon', 'Patchwork Automaton', 'Succumb to Temptation', 'Glamerdye', 'Tendrils of Agony', 'Sterling Grove', 'Radiant Grove', 'Scrapwork Mutt', 'Shard Volley', 'Sylvan Primordial', 'Pharika''s Libation', 'Yawgmoth''s Bargain', 'Riveteers Charm', 'Dragon''s Hoard', 'Sol Talisman', 'Oust', 'Scrapheap Scrounger', 'Invasion of Regatha', 'Rocco, Cabaretti Caterer', 'Mystic Monastery', 'Out of Time', 'Labyrinth of Skophos', 'Castigate', 'Brokers Hideout', 'Touch the Spirit Realm', 'Mindslaver', 'Into the Roil', 'Crack the Earth', 'Ashen Rider', 'Blighted Agent', 'Soltari Priest', 'Chief of the Foundry', 'Fleecemane Lion', 'Union of the Third Path', 'Harmonize', 'Crux of Fate', 'Knight of the White Orchid', 'Resurgent Belief', 'Caves of Koilos', 'Cremate', 'Drainpipe Vermin', 'Terramorphic Expanse', 'Eternal Scourge', 'Experimental Synthesizer', 'Cabal Therapist', 'Deafening Clarion', 'Weathered Wayfarer', 'Rishadan Dockhand', 'Tooth and Nail', 'Contaminated Aquifer', 'Ayara, First of Locthwain', 'Vigor', 'Battlefield Forge', 'Needle Spires', 'Yahenni''s Expertise', 'Agonizing Remorse', 'Trace of Abundance', 'Frostwalk Bastion', 'Always Watching', 'Dead Weight', 'Harrow', 'Kitesail Freebooter', 'Briarbridge Tracker', 'Quiet Speculation', 'Thragtusk', 'Llanowar Augur', 'Herald of the Pantheon', 'Forked Bolt', 'Malakir Rebirth', 'Aetherworks Marvel', 'Tocasia''s Dig Site', 'Akroan Crusader', 'Eldrazi Displacer', 'Distended Mindbender', 'Ashenmoor Liege', 'Simian Spirit Guide', 'Chittering Rats', 'Dead // Gone', 'Murderous Redcap', 'Early Harvest', 'Kher Keep', 'Hornet Queen', 'King Darien XLVIII', 'Farhaven Elf', 'Increasing Ambition', 'Primal Command', 'Thrill of Possibility', 'Mistblade Shinobi', 'The Scorpion God', 'Nimble Trapfinder', 'Toolcraft Exemplar', 'Decree of Justice', 'Verduran Enchantress', 'Reckless Charge', 'Frantic Search', 'Kaito, Dancing Shadow', 'Student of Warfare', 'Bituminous Blast', 'Blanchwood Prowler', 'Felidar Cub', 'Shambling Vent', 'Gideon''s Intervention', 'Thornwood Falls', 'Bloodchief Ascension', 'Torens, Fist of the Angels', 'Arch of Orazca', 'Elas il-Kor, Sadistic Pilgrim', 'Merfolk Sovereign', 'Ghostly Flicker', 'Mistcutter Hydra', 'Sever the Bloodline', 'Sultai Charm', 'Maze''s End', 'Tranquil Thicket', 'Nature''s Lore', 'Spirit Mantle', 'Priest of the Haunted Edge', 'Stoke the Flames', 'Mistvault Bridge', 'Cloudpost', 'Woodland Cemetery', 'Stinkdrinker Bandit', 'Distorted Curiosity', 'Yavimaya Iconoclast', 'Pharika''s Cure', 'Izzet Charm', 'Defiant Strike', 'Ponder', 'Dawn of Hope', 'Sunscour', 'Madcap Experiment', 'Sudden Edict', 'Crawling Chorus', 'Snow-Covered Mountain', 'Conflagrate', 'Eidolon of Blossoms', 'Minor Misstep', 'Drowned Rusalka', 'Rakdos Guildgate', 'Groundswell', 'Canyon Slough', 'Temple of Silence', 'Chandra, Fire Artisan', 'Tribute to Hunger', 'Mystifying Maze', 'Gloomshrieker', 'Nimble Obstructionist', 'Vampire Lacerator', 'Lodestone Golem', 'Anguished Unmaking', 'Thopter Spy Network', 'Porphyry Nodes', 'Aether Spellbomb', 'Tomik, Distinguished Advokist', 'Invisible Stalker', 'Boreal Shelf', 'Thassa''s Intervention', 'Squee, Goblin Nabob', 'Deprive', 'Talisman of Curiosity', 'Concealing Curtains', 'Purify the Grave', 'Kitchen Finks', 'Memoricide', 'Galerider Sliver', 'Discovery // Dispersal', 'Razortide Bridge', 'Peek', 'Faerie Miscreant', 'Kumano Faces Kakkazan', 'Sweltering Suns', 'Night Market Lookout', 'Leonin Warleader', 'Disrupting Shoal', 'Calciform Pools', 'Murmuring Bosk', 'Kiora Bests the Sea God', 'Avacyn''s Pilgrim', 'Mindcrank', 'Odds // Ends', 'Winds of Abandon', 'Vampire Nighthawk', 'Tectonic Edge', 'Archaeomancer', 'Bilious Skulldweller', 'Sinew Sliver', 'Tempest Djinn', 'Huatli, Radiant Champion', 'Call of the Death-Dweller', 'Time of Need', 'Myr Kinsmith', 'Dauntless Bodyguard', 'Benevolent Bodyguard', 'Angel of Condemnation', 'Lavaclaw Reaches', 'Nezahal, Primal Tide', 'Tidespout Tyrant', 'Grand Abolisher', 'Devil''s Play', 'Loxodon Smiter', 'Orzhov Guildgate', 'Throat Slitter', 'Day of Judgment', 'Sandsteppe Citadel', 'Brave the Elements', 'Talisman of Impulse', 'Tangled Islet', 'Slagstorm', 'Smuggler''s Copter', 'Urban Evolution', 'Empyrial Plate', 'Grand Architect', 'Seal of Removal', 'Game Trail', 'Crawling Barrens', 'Presence of Gond', 'Necrogen Spellbomb', 'Consult the Necrosages', 'Venser, Corpse Puppet', 'Birds of Paradise', 'Tyrant of Discord', 'Cathartic Reunion', 'Frost Marsh', 'Energy Refractor', 'Overgrowth', 'Barbed Sextant', 'Cauldron Familiar', 'Seething Song', 'Demonic Bargain', 'Woodweaver''s Puzzleknot', 'Fruit of Tizerus', 'Tezzeret, Artifice Master', 'Sphere of Safety', 'Reckless Rage', 'Aegis of the Gods', 'Thaumatic Compass', 'Sin Prodder', 'Hedron Archive', 'Leonin Lightscribe', 'Mana Leak', 'Mnemonic Sphere', 'Angel''s Grace', 'Plated Geopede', 'Negate', 'Squadron Hawk', 'Dakkon, Shadow Slayer', 'Wolfbriar Elemental', 'Alms of the Vein', 'Tainted Indulgence', 'Secluded Steppe', 'Temple of Plenty', 'Norn''s Inquisitor', 'Celestial Colonnade', 'Drowner of Hope', 'Judge''s Familiar', 'Terminus', 'Kor Firewalker', 'Dimir Guildgate', 'Swooping Lookout', 'Tezzeret''s Gambit', 'Krosan Grip', 'Gleeful Demolition', 'Impulse', 'Bogbrew Witch', 'Stoic Rebuttal', 'Moderation', 'Ally Encampment', 'Hero''s Downfall', 'Sleight of Hand', 'Champion of Wits', 'Shivan Reef', 'Sin Collector', 'Morsel Theft', 'Dead of Winter', 'Moon-Circuit Hacker', 'Viashino Pyromancer', 'Farseek', 'Gateway Plaza', 'Sculpting Steel', 'Armored Scrapgorger', 'Phantasmal Image', 'Search for Tomorrow', 'Kruphix''s Insight', 'Commune with Nature', 'Hard Evidence', 'Brave the Sands', 'Fetid Heath', 'Silumgar''s Scorn', 'Temple of Abandon', 'Thawing Glaciers', 'Control Magic', 'Grim Haruspex', 'Rust Goliath', 'Universal Automaton', 'Zuran Orb', 'Changeling Outcast', 'Fallaji Archaeologist', 'Teshar, Ancestor''s Apostle', 'Benthic Biomancer', 'Nekrataal', 'Big Score', 'Cabaretti Courtyard', 'Smother', 'Solemnity', 'Kappa Tech-Wrecker', 'Vessel of Nascency', 'Esper Charm', 'Pore Over the Pages', 'Black Sun''s Zenith', 'Heliod''s Intervention', 'Gods Willing', 'Kor Skyfisher', 'Slagwoods Bridge', 'Elite Inquisitor', 'Vivid Grove', 'Corrupted Conviction', 'Grenzo, Dungeon Warden', 'Dread Return', 'Healer''s Hawk', 'Otherworldly Journey', 'Earthquake', 'Heap Doll', 'Shrieking Affliction', 'Sea Gate Wreckage', 'Vedalken Heretic', 'Flametongue Kavu', 'Snow-Covered Swamp', 'Timeless Witness', 'Wall of Omens', 'Silent Gravestone', 'Helm of the Host', 'Shape Anew', 'Goldmire Bridge', 'Remorseful Cleric', 'Steel Overseer', 'Raze to the Ground', 'Unholy Heat', 'Devious Cover-Up', 'Colossal Skyturtle', 'Diabolic Tutor', 'Unmarked Grave', 'Pyrite Spellbomb', 'Dross Skullbomb', 'Putrefy', 'Wrenn''s Resolve', 'Cathedral of War', 'Assemble the Legion', 'Maelstrom Pulse', 'Surrak, the Hunt Caller', 'Mina and Denn, Wildborn', 'Temple of Mystery', 'Dying to Serve', 'Herd Baloth', 'Timely Reinforcements', 'Glacial Fortress', 'Founding the Third Path', 'Rakdos Cackler', 'Doomskar', 'Acidic Slime', 'Abiding Grace', 'Leonin Relic-Warder', 'Mausoleum Secrets', 'Cosmos Elixir', 'Bump in the Night', 'Divinity of Pride', 'Surge of Salvation', 'Karumonix, the Rat King', 'Vampiric Rites', 'Bloodsoaked Champion', 'Kabira Takedown', 'Careful Cultivation', 'Cabal Initiate', 'Cliffside Lookout', 'Barbarian Ring', 'Grafted Butcher', 'Clifftop Retreat', 'Tendo Ice Bridge', 'Glimmerpost', 'Smoldering Marsh', 'Wonder', 'Bident of Thassa', 'Tyrant''s Choice', 'Fact or Fiction', 'Angel of Grace', 'Cabal Ritual', 'Hero of Oxid Ridge', 'Experimental Augury', 'Evangel of Synthesis', 'Pardic Miner', 'Unburial Rites', 'Summary Dismissal', 'Rally the Ancestors', 'Knight of Glory', 'Commune with Spirits', 'The Celestus', 'Ogre Slumlord', 'Carven Caryatid', 'Endbringer', 'Misery Charm', 'Spatial Contortion', 'Tidehollow Sculler', 'Obliterate', 'Putrid Imp', 'Sigil of the Empty Throne', 'Myth Realized', 'Yasharn, Implacable Earth', 'Faith''s Reward', 'Explore', 'Sinister Concoction', 'Sins of the Past', 'Shriekmaw', 'Canopy Vista', 'Pilfer', 'Forbidden Alchemy', 'Knight of New Alara', 'Akoum Hellhound', 'Oracle of Tragedy', 'Open the Gates', 'Prologue to Phyresis', 'Azorius Guildgate', 'Knight of the Reliquary', 'Haunted Mire', 'Duplicant', 'General Ferrous Rokiric', 'Prosperous Thief', 'Mirran Crusader', 'Meeting of Minds', 'Ondu Inversion', 'Nezumi Graverobber', 'Check for Traps', 'Polukranos, World Eater', 'Orzhov Basilica', 'Gruul Spellbreaker', 'Condemn', 'Sea Gate Oracle', 'Summer Bloom', 'Augur of Bolas', 'Kitchen Imp', 'Far // Away', 'Hour of Promise', 'Arbalest Engineers', 'Sylvan Advocate', 'Vraska''s Contempt', 'Dregscape Zombie', 'Dispatch', 'Memory Lapse', 'Nightscape Familiar', 'Yorion, Sky Nomad', 'Consume the Meek', 'Brain Freeze', 'Bubbling Cauldron', 'The Underworld Cookbook', 'Fyndhorn Elves', 'Delver of Secrets', 'Temple of Malady', 'Oona, Queen of the Fae', 'Mortuary Mire', 'Anafenza, the Foremost', 'Halana and Alena, Partners', 'Hero of Bladehold', 'Fumigate', 'Attune with Aether', 'Aquitect''s Will', 'Vraan, Executioner Thane', 'Jace Beleren', 'Diffusion Sliver', 'Inkwell Leviathan', 'Stone Rain', 'Abundant Growth', 'The Birth of Meletis', 'Elixir of Immortality', 'Scrying Sheets', 'Argentum Armor', 'Umara Wizard', 'Electrolyze', 'Loran''s Escape', 'Curiosity', 'Voidwing Hybrid', 'Varolz, the Scar-Striped', 'Guile', 'Psychic Possession', 'Oracle of Mul Daya', 'Fetid Pools', 'Price of Progress', 'Drake Haven', 'Shred Memory', 'Fire Prophecy', 'Botanical Plaza', 'Gravelgill Duo', 'Titania, Protector of Argoth', 'Waking the Trolls', 'Festering Newt', 'Throne of the God-Pharaoh', 'Oona''s Grace', 'Darksteel Citadel', 'Angrath, the Flame-Chained', 'Mouth of Ronom', 'Drowned Catacomb', 'Forbid', 'Demigod of Revenge', 'Predatory Sliver', 'Sunpetal Grove', 'Sculpted Perfection', 'Gather the Pack', 'Chain Lightning', 'Silundi Vision', 'Froghemoth', 'Llanowar Elves', 'Hissing Quagmire', 'Dusk // Dawn', 'Servo Exhibition', 'Mishra''s Self-Replicator', 'Rune Snag', 'Notorious Throng', 'Unlucky Witness', 'Smallpox', 'Terminate', 'Ovika, Enigma Goliath', 'Xerex Strobe-Knight', 'Altar of the Goyf', 'Gideon Jura', 'Opulent Palace', 'Venser, the Sojourner', 'Ad Nauseam', 'Garruk Wildspeaker', 'Moorland Haunt', 'Bloodline Keeper', 'Floriferous Vinewall', 'Yavimaya Coast', 'Golgari Guildgate', 'Destiny Spinner', 'Serra Ascendant', 'Faerie Vandal', 'Battle of Frost and Fire', 'Woe Strider', 'Augur of Skulls', 'Phyrexian Dreadnought', 'Rix Maadi Reveler', 'Ignite Memories', 'Marble Diamond', 'Geothermal Bog', 'Nezumi Informant', 'Quarantine Field', 'Koth, Fire of Resistance', 'Tangle', 'Circuit Mender', 'Knight Exemplar', 'River of Tears', 'Collected Conjuring', 'Yisan, the Wanderer Bard', 'Artistic Refusal', 'Sulfur Falls', 'Grolnok, the Omnivore', 'Lose Focus', 'The Flame of Keld', 'Double Vision', 'Wrath of God', 'Flaying Tendrils', 'Invasion of Azgol', 'Thundermaw Hellkite', 'Invasion of Zendikar', 'Seeker of the Way', 'Platinum Angel', 'Bloodchief''s Thirst', 'Darksteel Colossus', 'Deep Analysis', 'Arcane Sanctum', 'Silver-Fur Master', 'Dokuchi Silencer', 'Kambal, Consul of Allocation', 'Obstinate Baloth', 'Wild Cantor', 'Ramunap Excavator', 'Mystical Teachings', 'Dimensional Infiltrator', 'Shimmerdrift Vale', 'Phyrexian Unlife', 'Blightbelly Rat', 'Sarkhan the Masterless', 'See Beyond', 'Restoration Angel', 'Viscera Seer', 'Riveteers Overlook', 'Lagrella, the Magpie', 'Cloudshredder Sliver', 'Big Game Hunter', 'Brainstone', 'Blazing Rootwalla', 'Secluded Courtyard', 'Rift Bolt', 'Obzedat, Ghost Council', 'Seal of Cleansing', 'Unstable Mutation', 'Ertai''s Scorn', 'World Shaper', 'Ranger of Eos', 'Hostage Taker', 'Altered Ego', 'Halimar Excavator', 'Magister of Worth', 'Fertile Ground', 'Swiftfoot Boots', 'Greater Tanuki', 'Hall of Oracles', 'Tresserhorn Sinks', 'Gnat Miser', 'Psychatog', 'Sorin, Vengeful Bloodlord', 'Possibility Storm', 'Bone Shards', 'Draugr Necromancer', 'Twinshot Sniper', 'Executioner''s Capsule', 'Cryptic Caves', 'Rule of Law', 'Pack Rat', 'Self-Assembler', 'Kiora, the Crashing Wave', 'Aetherling', 'Gift of Estates', 'Makeshift Mannequin', 'Tilling Treefolk', 'Graaz, Unstoppable Juggernaut', 'Teneb, the Harvester', 'Illuminator Virtuoso', 'Narcomoeba', 'Teleportation Circle', 'Sire of Insanity', 'Arguel''s Blood Fast', 'Commence the Endgame', 'Raven''s Crime', 'Boros Guildgate', 'Open the Armory', 'Mothdust Changeling', 'Scour All Possibilities', 'Fracturing Gust', 'Temple of Deceit', 'Quest for the Holy Relic', 'Geyadrone Dihada', 'Scuttling Doom Engine', 'Aetherspouts', 'Revitalize', 'Talisman of Unity', 'Unctus, Grand Metatect', 'Kefnet the Mindful', 'Ulcerate', 'Wasteland Strangler', 'Ayli, Eternal Pilgrim', 'Timeless Dragon', 'Saffi Eriksdotter', 'Reveillark', 'Erebos''s Intervention', 'Thrash // Threat', 'Ichorclaw Myr', 'Quicken', 'Simic Guildgate', 'Faerie Conclave', 'Malcator, Purity Overseer', 'Sylvan Caryatid', 'Desperate Ritual', 'Haunted Fengraf', 'Kunoros, Hound of Athreos', 'Forsake the Worldly', 'Go for the Throat', 'Recurring Nightmare', 'Nephalia Drownyard', 'Golgari Rot Farm', 'Bloodvial Purveyor', 'Vampire Neonate', 'Orzhov Charm', 'Rakdos''s Return', 'Ghostfire Blade', 'Choked Estuary', 'Assault // Battery', 'Bloodbraid Elf', 'Honor of the Pure', 'Dissolve', 'Dire-Strain Rampage', 'Luminarch Ascension', 'Watcher for Tomorrow', 'Hooting Mandrills', 'Bogardan Hellkite', 'Venser, Shaper Savant', 'Raise the Alarm', 'Idyllic Beachfront', 'Jwari Shapeshifter', 'Into the Story', 'Disenchant', 'Evolving Wilds', 'Sandwurm Convergence', 'Rise // Fall', 'Gruul Turf', 'Neutralize', 'Witching Well', 'Combat Thresher', 'Frost Titan', 'Heliod''s Pilgrim', 'Change the Equation', 'Orim''s Chant', 'It That Betrays', 'Eiganjo Castle', 'Arbor Elf', 'Invasion of Ergamon', 'Fearless Fledgling', 'Bubbling Muck', 'Circular Logic', 'Forgotten Cave', 'Unsubstantiate', 'Baneful Omen', 'Cleansing Wildfire', 'Fight as One', 'Doomed Traveler', 'Rampant Growth', 'Ruric Thar, the Unbowed', 'Council''s Judgment', 'Arlinn Kord', 'Rotting Rats', 'Steppe Lynx', 'Chandra, Flamecaller', 'Utter End', 'Triskelion', 'Tide Shaper', 'Mesa Enchantress', 'Graven Lore', 'General''s Enforcer', 'Stir the Grave', 'Midnight Clock', 'Vivid Crag', 'Mirror Entity', 'Victim of Night', 'Mind''s Desire', 'Benalish Marshal', 'Runed Halo', 'Kessig Wolf Run', 'Fae of Wishes', 'Genesis Hydra', 'Giant Killer', 'Engulf the Shore', 'Master of Death', 'Elspeth Conquers Death', 'Turnabout', 'Stasis Snare', 'Voldaren Pariah', 'Wayward Guide-Beast', 'Stromkirk Noble', 'Ancient Stirrings', 'Lantern-Lit Graveyard', 'Temple of Enlightenment', 'Liliana Vess', 'Bitter Reunion', 'Stupor', 'Nissa, Worldwaker', 'Sacred Peaks', 'Supreme Will', 'Azorius Charm', 'The Seedcore', 'Sarkhan, the Dragonspeaker', 'Leonin Arbiter', 'Jwari Disruption', 'Faeburrow Elder', 'Cultivate', 'Vraska''s Fall', 'Rites of Spring', 'Blessed Alliance', 'Siege Rhino', 'Jungle Shrine', 'Sphinx''s Herald', 'Tanglepool Bridge', 'Folio of Fancies', 'Pyroclasm', 'Vadrik, Astral Archmage', 'Scattered Groves', 'Ammit Eternal', 'Venerated Loxodon', 'Reinforced Ronin', 'Marauding Blight-Priest', 'Eternal Dragon', 'Sylvan Scrying', 'Marit Lage''s Slumber', 'Voyaging Satyr', 'Kozilek''s Predator', 'Sanctum of Ugin', 'Eldrazi Skyspawner', 'Nine Lives', 'Blood Artist', 'Repudiate // Replicate', 'Nimbus Maze', 'Ral, Storm Conduit', 'Phalanx Leader', 'Duneblast', 'Slogurk, the Overslime', 'Corrupted Crossroads', 'Barter in Blood', 'Hyena Umbra', 'Blade Splicer', 'Molten Tributary', 'Vexing Shusher', 'Archpriest of Shadows', 'Bolas''s Citadel', 'Protect the Negotiators', 'Woodfall Primus', 'Network Disruptor', 'Zephyr Singer', 'Elderscale Wurm', 'Strike It Rich', 'Progenitor Exarch', 'Shrapnel Blast', 'Ancient Amphitheater', 'Elemental Masterpiece', 'Commit // Memory', 'Mephidross Vampire', 'Ral, Izzet Viceroy', 'Stern Dismissal', 'Hideous End', 'Spell Burst', 'Midnight Guard', 'Sunstrike Legionnaire', 'Fiery Temper', 'Merciless Eviction', 'Wooded Bastion', 'Return to the Ranks', 'Wizard''s Retort', 'Kaya, Ghost Assassin', 'Joint Exploration', 'Godo, Bandit Warlord', 'Goreclaw, Terror of Qal Sisma', 'Stave Off', 'Heartless Act', 'Counterflux', 'Doom Blade', 'Green Sun''s Twilight', 'Ethereal Armor', 'Worthy Knight', 'Rites of Initiation', 'Sunlit Marsh', 'Obscura Charm', 'Drossforge Bridge', 'Gryff''s Boon', 'Shardless Agent', 'Acclaimed Contender', 'Selesnya Guildgate', 'Urza''s Factory', 'Scrabbling Claws', 'Elvish Rejuvenator', 'Worship', 'Vines of Vastwood', 'Vault of the Archangel', 'Dovin''s Acuity', 'Gadrak, the Crown-Scourge', 'Snow-Covered Plains', 'Mishra''s Factory', 'Tribute to Horobi', 'Coiling Oracle', 'Etherium Sculptor', 'Realm Razer', 'Detention Sphere', 'Myr Superion', 'Kalastria Healer', 'Dreadhorde Butcher', 'Sunblade Samurai', 'Disallow', 'Expedite', 'Argentum Masticore', 'Enchantress''s Presence', 'Encroaching Wastes', 'Shatter the Sky', 'Merfolk Mistbinder', 'Rustvale Bridge', 'Blight Mamba', 'Grimoire Thief', 'Spirited Companion', 'Lonely Sandbar', 'Blightning', 'Delay', 'Astral Drift', 'Martyr of Sands', 'Sea-Dasher Octopus', 'Merrow Reejerey', 'Forging the Anchor', 'Nimble Larcenist', 'Myr Battlesphere', 'Blood on the Snow', 'Exclude', 'Gallia of the Endless Dance', 'Treasure Cruise', 'Artisan of Kozilek', 'Hada Freeblade', 'Spell Pierce', 'Ground Seal', 'Glaring Aegis', 'Approach of the Second Sun', 'Lurrus of the Dream-Den', 'Isolated Chapel', 'Izzet Guildgate', 'Ambush Viper', 'Lotus Cobra', 'Caldera Hellion', 'Monument to Perfection', 'Jukai Naturalist', 'Dryad Militant', 'Stirring Wildwood', 'Sunken Hollow', 'Angel of Serenity', 'Skyclave Shade', 'Orcish Lumberjack', 'Spoils of the Vault', 'Precursor Golem', 'All That Glitters', 'Ossification', 'Annex Sentry', 'Thornglint Bridge', 'Herd Migration', 'Mikokoro, Center of the Sea', 'Ghitu Lavarunner', 'Tribal Flames', 'Figure of Destiny', 'Brineborn Cutthroat', 'Malicious Malfunction', 'Settle the Wreckage', 'Jungle Hollow', 'Hinterland Harbor', 'Geomancer''s Gambit', 'Rootbound Crag', 'Sign in Blood', 'Ivory Tower', 'Graveborn Muse', 'Stinkweed Imp', 'Gruul Guildgate', 'Dragonskull Summit', 'Altar of the Brood', 'Ivy Lane Denizen', 'Dark-Dweller Oracle', 'Anafenza, Kin-Tree Spirit', 'Maestros Charm', 'Phyrexian Revoker', 'Gigadrowse', 'Launch the Fleet', 'Falkenrath Pit Fighter', 'Oath of Kaya', 'Might of Old Krosa', 'Endless Horizons', 'Nameless Inversion', 'Xenagos, the Reveler', 'Goblin Bombardment', 'Dimir Aqueduct', 'Mindsplice Apparatus', 'Tezzeret the Schemer', 'Mulldrifter', 'Frenetic Sliver', 'Dakmor Salvage', 'Goblin Dark-Dwellers', 'Consuming Vapors', 'Ethersworn Sphinx', 'Raging Ravine', 'Commune with the Gods', 'Reflector Mage', 'Mulch', 'Mastermind''s Acquisition', 'Archon of Sun''s Grace', 'Lay Down Arms', 'Nissa, Steward of Elements', 'Consecrate // Consume', 'Dissipate', 'Metalwork Colossus', 'Satyr Wayfinder', 'Ashnod, Flesh Mechanist', 'White Sun''s Zenith', 'Phoenix Chick', 'Hope of Ghirapur', 'Hanweir Garrison', 'Prophetic Prism', 'Renewed Faith', 'Second Sunrise', 'Obscura Storefront', 'Pillar of the Paruns', 'Ulvenwald Hydra', 'Flame Rift', 'Abzan Charm', 'Dark Petition', 'Evacuation', 'Hesitation', 'Nezumi Shortfang', 'Nullpriest of Oblivion', 'Basilisk Collar', 'Port Town', 'Idyllic Tutor', 'Goblin Electromancer', 'Sorin, Grim Nemesis', 'Vampire Hexmage', 'Tree of Tales'))) 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, 2.7, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.8 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Flametongue Kavu', 'Feed the Swarm', 'Wood Elves', 'Price of Progress', 'Duneblast', 'Cliffside Lookout', 'Morsel Theft', 'Argentum Masticore', 'Crack the Earth', 'Drowned Rusalka', 'Assemble the Legion', 'Tocasia''s Dig Site', 'Doomskar', 'Changeling Outcast', 'Dragon''s Hoard', 'Vampire Nighthawk', 'Ad Nauseam', 'Moorland Haunt', 'Chain Lightning', 'Memory Lapse', 'Nezahal, Primal Tide', 'Network Disruptor', 'Evacuation', 'Earthquake', 'Temple of Triumph', 'Ghitu Lavarunner', 'Hour of Promise', 'Always Watching', 'Scattered Groves', 'Madcap Experiment', 'Snow-Covered Mountain', 'Eternal Dragon', 'Pillar of the Paruns', 'Thraben Inspector', 'Fierce Empath', 'Jungle Shrine', 'Pore Over the Pages', 'Dispatch', 'Xenagos, the Reveler', 'Thaumatic Compass', 'Mothdust Changeling', 'Burning of Xinye', 'Evangel of Synthesis', 'Distorted Curiosity', 'Disenchant', 'Dead of Winter', 'Boros Guildgate', 'Tocatli Honor Guard', 'Grand Arbiter Augustin IV', 'Izzet Boilerworks', 'Vampire Lacerator', 'Ancient Stirrings', 'Out of Time', 'Demigod of Revenge', 'Karn''s Bastion', 'Vault Skirge', 'Murmuring Bosk', 'Rakdos Cackler', 'Unstable Mutation', 'Phoenix Chick', 'Quest for the Holy Relic', 'Abundant Growth', 'Titania, Protector of Argoth', 'Benalish Marshal', 'Bogbrew Witch', 'Invasion of Azgol', 'Archon of Sun''s Grace', 'Reflector Mage', 'Ichorclaw Myr', 'Shimmer Dragon', 'Malcator, Purity Overseer', 'Territorial Kavu', 'Pack Rat', 'Swiftfoot Boots', 'Settle the Wreckage', 'Invasion of New Capenna', 'Self-Assembler', 'Tresserhorn Sinks', 'Go for the Throat', 'Lavaclaw Reaches', 'Wizard''s Retort', 'Collected Conjuring', 'Stoic Rebuttal', 'Gruul Spellbreaker', 'Ovika, Enigma Goliath', 'Elves of Deep Shadow', 'Stasis Snare', 'Unmarked Grave', 'Launch the Fleet', 'Big Score', 'Combat Thresher', 'Dakmor Salvage', 'Ashenmoor Liege', 'Nine Lives', 'Rakdos Charm', 'Concealing Curtains', 'Rampant Growth', 'Tezzeret, Artifice Master', 'Blazing Rootwalla', 'Porphyry Nodes', 'Temple of Silence', 'Engulf the Shore', 'Ossification', 'Dread Return', 'Vivid Crag', 'Tyrant of Discord', 'Executioner''s Capsule', 'Vadrik, Astral Archmage', 'Martyr of Sands', 'Wrench Mind', 'Phyrexian Dreadnought', 'Vindictive Flamestoker', 'Thassa''s Intervention', 'Yawgmoth''s Bargain', 'Grenzo, Dungeon Warden', 'Rites of Initiation', 'Dead // Gone', 'Rustvale Bridge', 'Bubbling Cauldron', 'Primal Command', 'Benthic Biomancer', 'Sculpted Perfection', 'Herald of the Pantheon', 'Kabira Takedown', 'Timeless Witness', 'Erebos''s Intervention', 'Galerider Sliver', 'Ishkanah, Grafwidow', 'Aegis of the Gods', 'Sigil of the Empty Throne', 'Silverbluff Bridge', 'Slagwoods Bridge', 'Detention Sphere', 'Pyretic Ritual', 'Deep Forest Hermit', 'Slogurk, the Overslime', 'Shivan Reef', 'Nether Spirit', 'Abundant Harvest', 'Declaration in Stone', 'Mirran Crusader', 'Illuminator Virtuoso', 'Obscura Storefront', 'Faerie Vandal', 'Sacred Peaks', 'Demolition Field', 'Sphinx''s Herald', 'Whispersilk Cloak', 'Drainpipe Vermin', 'Mina and Denn, Wildborn', 'Lazotep Chancellor', 'Scrabbling Claws', 'Pilfer', 'Knight of New Alara', 'Stromkirk Noble', 'Vessel of Nascency', 'Sinew Sliver', 'Wrath of God', 'Sunlit Marsh', 'Tendrils of Agony', 'Spoils of the Vault', 'Shrieking Affliction', 'Day of Judgment', 'Cartel Aristocrat', 'Sigrid, God-Favored', 'Bump in the Night', 'Dead Weight', 'Rune Snag', 'Cabal Therapist', 'Gadrak, the Crown-Scourge', 'Knight of the Reliquary', 'Myr Superion', 'Kami of False Hope', 'Approach of the Second Sun', 'Vampiric Rites', 'Artisan of Kozilek', 'Repeal', 'Wayward Guide-Beast', 'Ancient Ziggurat', 'Tidehollow Sculler', 'Lotus Cobra', 'Tranquil Thicket', 'Loran''s Escape', 'Temple of Mystery', 'Genesis Hydra', 'Snow-Covered Swamp', 'Yisan, the Wanderer Bard', 'Satyr Wayfinder', 'Dragonskull Summit', 'Sandwurm Convergence', 'Careful Cultivation', 'Victim of Night', 'Game Trail', 'Vraska''s Fall', 'Brineborn Cutthroat', 'Phantasmal Image', 'Faeburrow Elder', 'Pyrite Spellbomb', 'Kappa Tech-Wrecker', 'Molten Tributary', 'Valakut Exploration', 'Invasion of Zendikar', 'Chittering Rats', 'Botanical Plaza', 'Discovery // Dispersal', 'Goldmire Bridge', 'Graaz, Unstoppable Juggernaut', 'Kuldotha Forgemaster', 'Barter in Blood', 'Springleaf Drum', 'Stinkdrinker Bandit', 'Mindslaver', 'Cold-Eyed Selkie', 'Raze to the Ground', 'Voidwing Hybrid', 'Elderscale Wurm', 'Ral, Storm Conduit', 'Lost Legacy', 'Ephara, God of the Polis', 'Graveborn Muse', 'Yahenni''s Expertise', 'Torens, Fist of the Angels', 'Yorion, Sky Nomad', 'Thawing Glaciers', 'Raging Ravine', 'Mephidross Vampire', 'Drowned Catacomb', 'Gateway Plaza', 'Briarbridge Tracker', 'Angel of Serenity', 'Champion of Wits', 'Sheltered Thicket', 'Frantic Inventory', 'Maze''s End', 'Pariah', 'Demonic Bargain', 'Quarantine Field', 'Anger of the Gods', 'Secluded Steppe', 'Lingering Souls', 'Terminus', 'Tribute to Horobi', 'Psychatog', 'Coiling Oracle', 'World Shaper', 'Consult the Necrosages', 'Llanowar Augur', 'Fruit of Tizerus', 'Night of Souls'' Betrayal', 'Woodland Cemetery', 'Arch of Orazca', 'Precursor Golem', 'Ravenous Squirrel', 'Bloodvial Purveyor', 'Sulfur Falls', 'Tectonic Giant', 'Tidespout Tyrant', 'Orzhov Charm', 'Sanctum of Ugin', 'Runed Halo', 'Sylvan Scrying', 'Cataclysmic Gearhulk', 'The Underworld Cookbook', 'Banishing Slash', 'Eldrazi Displacer', 'Silumgar''s Scorn', 'Vivid Marsh', 'Tezzeret the Schemer', 'Chandra, Flamecaller', 'Jwari Shapeshifter', 'Research // Development', 'Groundswell', 'Vindicate', 'Nimble Trapfinder', 'Glimmerpost', 'Canopy Vista', 'Rain of Tears', 'Disallow', 'Riveteers Charm', 'Unctus, Grand Metatect', 'Malakir Rebirth', 'Ayli, Eternal Pilgrim', 'Soltari Priest', 'Drown in Ichor', 'Syphon Life', 'Tilling Treefolk', 'Mistblade Shinobi', 'Sea Gate Wreckage', 'Mazemind Tome', 'Peek', 'Phyrexian Revoker', 'Scarab Feast', 'Vexing Shusher', 'Needle Spires', 'Epic Experiment', 'Misery Charm', 'Mindsplice Apparatus', 'Elixir of Immortality', 'Fight as One', 'Electrolyze', 'Greater Tanuki', 'Ally Encampment', 'Think Twice', 'Murderous Redcap', 'Stern Dismissal', 'Norn''s Inquisitor', 'Caldera Hellion', 'Forgotten Cave', 'Cloudshredder Sliver', 'Duress', 'Forbid', 'Destroy Evil', 'Mastermind''s Acquisition', 'Conflagrate', 'Geyadrone Dihada', 'Angrath, the Flame-Chained', 'Dark Ritual', 'Canyon Slough', 'The Seedcore', 'Obzedat, Ghost Council', 'Servo Exhibition', 'Steel Overseer', 'Sins of the Past', 'General''s Enforcer', 'Orim''s Chant', 'Ruric Thar, the Unbowed', 'Arcane Sanctum', 'Strike It Rich', 'Lonely Sandbar', 'Vampire Neonate', 'Duplicant', 'Etherium Sculptor', 'Isolated Chapel', 'Skyclave Shade', 'General Ferrous Rokiric', 'Wandering Fumarole', 'Divinity of Pride', 'Prosperous Thief', 'Kefnet the Mindful', 'Defiant Strike', 'Invasion of Amonkhet', 'Drowner of Hope', 'Tomik, Distinguished Advokist', 'Rakdos Guildgate', 'Sheoldred''s Edict', 'Elvish Rejuvenator', 'Tribal Flames', 'Coalition Relic', 'Call of the Death-Dweller', 'Hideous End', 'Giant Killer', 'Healer''s Hawk', 'Hada Freeblade', 'Frost Titan', 'Halana and Alena, Partners', 'Condemn', 'Kessig Wolf Run', 'Black Sun''s Zenith', 'Grimoire Thief', 'Bitter Reunion', 'Radiant Grove', 'Mulch', 'Port Town', 'Forbidden Alchemy', 'Fertile Ground', 'Notorious Throng', 'Joint Exploration', 'Forked Bolt', 'Mouth of Ronom', 'Progenitor Exarch', 'Green Sun''s Twilight', 'Angel''s Grace', 'Sandsteppe Citadel', 'Nimbus Maze', 'Knowledge Pool', 'Midnight Clock', 'Triskelion', 'Sylvan Library', 'Impulse', 'Boreal Shelf', 'Destiny Spinner', 'Pain Seer', 'Thundermaw Hellkite', 'Winds of Abandon', 'Control Magic', 'Dovin''s Acuity', 'Angel of Grace', 'Ulcerate', 'Pyroclasm', 'Union of the Third Path', 'Cabaretti Courtyard', 'Golgari Rot Farm', 'Bogardan Hellkite', 'Sylvan Advocate', 'Elite Inquisitor', 'Flaying Tendrils', 'Far // Away', 'Gideon Jura', 'Melira, Sylvok Outcast', 'Lochmere Serpent', 'Westvale Abbey', 'Unsubstantiate', 'Kunoros, Hound of Athreos', 'Knight of the White Orchid', 'Dokuchi Silencer', 'Rule of Law', 'Eidolon of Blossoms', 'Ethereal Armor', 'Dryad Militant', 'Tempest Djinn', 'Kazandu Blademaster', 'Ivy Lane Denizen', 'Umara Wizard', 'Elspeth Conquers Death', 'Universal Automaton', 'Oona, Queen of the Fae', 'The Flame of Keld', 'Corpse Cur', 'Harmonize', 'Ponder', 'Zephyr Singer', 'Fallaji Archaeologist', 'Moon-Circuit Hacker', 'Kruphix''s Insight', 'Seal of Removal', 'Mesa Enchantress', 'Seeker of the Way', 'Embodiment of Fury', 'Garruk Wildspeaker', 'Caves of Koilos', 'Drake Haven', 'Ogre Slumlord', 'Hanweir Garrison', 'Spirited Companion', 'Council''s Judgment', 'Angel of Despair', 'Rift Bolt', 'Ignite Memories', 'Gift of Immortality', 'Doom Blade', 'Frenetic Sliver', 'Throne of the God-Pharaoh', 'Neutralize', 'Surrak, the Hunt Caller', 'Voltage Surge', 'Izzet Guildgate', 'Aquitect''s Will', 'Mystifying Maze', 'Consuming Vapors', 'Corrupted Conviction', 'Silver-Fur Master', 'Fracturing Gust', 'Pharika''s Cure', 'Stubborn Denial', 'Pardic Miner', 'Birds of Paradise', 'Mystic Monastery', 'Sultai Charm', 'Leonin Arbiter', 'Rise and Shine', 'Gird for Battle', 'Mana Leak', 'Thornglint Bridge', 'Simian Spirit Guide', 'Rootbound Crag', 'Llanowar Elves', 'Gloomshrieker', 'Nevermore', 'Wooded Bastion', 'Voidslime', 'Master of Death', 'Arcum''s Astrolabe', 'Anguished Unmaking', 'Bloodchief Ascension', 'Blighted Agent', 'Serra Ascendant', 'Temple of Plenty', 'Oona''s Grace', 'Kumano Faces Kakkazan', 'Bloodchief''s Thirst', 'Bring the Ending', 'Worthy Knight', 'Eternal Scourge', 'Experimental Synthesizer', 'Falkenrath Pit Fighter', 'Quiet Speculation', 'Assault // Battery', 'Frantic Search', 'Wild Cantor', 'Hall of Oracles', 'Riveteers Overlook', 'Akoum Hellhound', 'Predatory Sliver', 'Thragtusk', 'Artistic Refusal', 'Ral, Izzet Viceroy', 'Urza''s Factory', 'Opulent Palace', 'Talisman of Curiosity', 'Bloodbraid Elf', 'Frost Marsh', 'Grim Haruspex', 'Kitchen Imp', 'Hyena Umbra', 'Mistveil Plains', 'Oust', 'Seal of Fire', 'Leonin Relic-Warder', 'Merciless Eviction', 'Talisman of Impulse', 'Contaminated Aquifer', 'Consume the Meek', 'Consecrate // Consume', 'Utter End', 'Surge of Salvation', 'Fetid Heath', 'Hieroglyphic Illumination', 'Crawling Barrens', 'Marit Lage''s Slumber', 'Teshar, Ancestor''s Apostle', 'Chandra, Fire Artisan', 'Midnight Reaper', 'Farhaven Elf', 'Grafted Butcher', 'Twinshot Sniper', 'Sunscour', 'Ghostly Pilferer', 'Throat Slitter', 'Glamerdye', 'Gnawing Vermin', 'Myr Kinsmith', 'Vault of the Archangel', 'Mishra''s Factory', 'Shrapnel Blast', 'Pulse of the Fields', 'Orzhov Guildgate', 'Llanowar Mentor', 'Thornwood Falls', 'Second Sunrise', 'Disrupting Shoal', 'Desperate Ritual', 'Heap Doll', 'Blessed Alliance', 'Jungle Hollow', 'Hissing Quagmire', 'Nameless Inversion', 'Huatli, Radiant Champion', 'Ghostly Flicker', 'Raven''s Crime', 'Leonin Lightscribe', 'Supreme Will', 'Slaughter Pact', 'Monument to Perfection', 'Knight of Glory', 'Putrefy', 'Dark Petition', 'Attune with Aether', 'Jace, Architect of Thought', 'Student of Warfare', 'Thopter Spy Network', 'Benevolent Bodyguard', 'Stoke the Flames', 'Temple of Enlightenment', 'Mind''s Desire', 'Timely Reinforcements', 'Grave Scrabbler', 'Woe Strider', 'Curiosity', 'Smoldering Marsh', 'Jokulhaups', 'Vedalken Heretic', 'Return to the Ranks', 'Goblin Bombardment', 'Reckless Charge', 'Loxodon Smiter', 'Shatter the Sky', 'Possibility Storm', 'Shard Volley', 'Haunted Mire', 'Oracle of Mul Daya', 'Eerie Ultimatum', 'Hooting Mandrills', 'Recurring Nightmare', 'Goblin Dark-Dwellers', 'Teferi, Mage of Zhalfir', 'Swooping Lookout', 'Minor Misstep', 'Mulldrifter', 'Hero of Bladehold', 'Basilisk Collar', 'Helm of the Host', 'Fumigate', 'Timeless Dragon', 'Shambling Vent', 'Prophetic Prism', 'Smallpox', 'Bolas''s Citadel', 'Mnemonic Sphere', 'Mirror Entity', 'Cathartic Reunion', 'Kiora Bests the Sea God', 'Counterflux', 'Voldaren Pariah', 'Blue Sun''s Zenith', 'Brave the Elements', 'Varolz, the Scar-Striped', 'Arcbound Ravager', 'Platinum Angel', 'Razortide Bridge', 'Agonizing Remorse', 'Elvish Visionary', 'Esper Charm', 'Toolcraft Exemplar', 'Raise the Alarm', 'Expedite', 'Increasing Ambition', 'Inkwell Leviathan', 'Raffine''s Informant', 'Vryn Wingmare', 'Herd Migration', 'Sire of Insanity', 'Arbor Elf', 'Choked Estuary', 'Scab-Clan Berserker', 'Unburial Rites', 'Colossal Skyturtle', 'Scour All Possibilities', 'Secluded Courtyard', 'Shizo, Death''s Storehouse', 'Squee, Goblin Nabob', 'Hope of Ghirapur', 'Rotting Rats', 'Dissolve', 'Vapor Snag', 'Rix Maadi Reveler', 'Stinkweed Imp', 'Vines of Vastwood', 'Tear Asunder', 'Inspiring Veteran', 'Scuttling Doom Engine', 'Necrogen Spellbomb', 'Chief Engineer', 'Summary Dismissal', 'Akroan Crusader', 'Idyllic Beachfront', 'Oblivion Ring', 'Expedition Envoy', 'Cloudshift', 'Change the Equation', 'Mystical Teachings', 'Deafening Clarion', 'Tyrant''s Choice', 'Hinterland Harbor', 'Obstinate Baloth', 'Hypergenesis', 'Cosmos Elixir', 'Diffusion Sliver', 'Glint-Sleeve Siphoner', 'Commune with the Gods', 'Vraan, Executioner Thane', 'Rust Goliath', 'Nimble Obstructionist', 'Astral Drift', 'Archangel of Wrath', 'Altar of the Goyf', 'Forsake the Worldly', 'Silverblade Paladin', 'Glimpse of Tomorrow', 'Saffi Eriksdotter', 'Gravelgill Duo', 'Repudiate // Replicate', 'Temple of Deceit', 'Chamber Sentry', 'Glorybringer', 'Augur of Bolas', 'Malicious Malfunction', 'Master of Etherium', 'Venser, Corpse Puppet', 'Steppe Lynx', 'Sterling Grove', 'Encroaching Wastes', 'Teneb, the Harvester', 'Graven Cairns', 'Annex Sentry', 'Delay', 'Bident of Thassa', 'Tree of Tales', 'Narcomoeba', 'Aetherblade Agent', 'Haunted Fengraf', 'Shape Anew', 'Mycosynth Golem', 'Terramorphic Expanse', 'Slagstorm', 'Sprite Dragon', 'Goreclaw, Terror of Qal Sisma', 'Acidic Slime', 'Augur of Skulls', 'Mistcutter Hydra', 'Ambush Viper', 'Darksteel Colossus', 'Woodfall Primus', 'Sunken Hollow', 'King Darien XLVIII', 'Festering Newt', 'Metalwork Colossus', 'Sarkhan the Masterless', 'Decree of Justice', 'Rakdos''s Return', 'Negate', 'Polukranos, World Eater', 'Commune with Spirits', 'Jwari Disruption', 'Ashen Rider', 'Rocco, Cabaretti Caterer', 'Inscribed Tablet', 'Priest of the Haunted Edge', 'Nissa, Steward of Elements', 'Waking the Trolls', 'Sorin, Vengeful Bloodlord', 'Karumonix, the Rat King', 'Devil''s Play', 'Dismal Backwater', 'Succumb to Temptation', 'Nomad Outpost', 'Remorseful Cleric', 'Shimmerdrift Vale', 'Temple of Abandon', 'Sol Talisman', 'Mindcrank', 'Dakkon, Shadow Slayer', 'Kozilek''s Predator', 'Endless Horizons', 'Calciform Pools', 'Zur''s Weirding', 'Flame Rift', 'Felidar Retreat', 'Gnat Miser', 'Jukai Naturalist', 'Dreadhorde Butcher', 'Kitchen Finks', 'Hard Evidence', 'Cloudpost', 'Viscera Seer', 'Eldrazi Skyspawner', 'Blight Mamba', 'Unholy Heat', 'Ayara, First of Locthwain', 'Merfolk Sovereign', 'Prologue to Phyresis', 'Genesis Ultimatum', 'Cremate', 'Woodweaver''s Puzzleknot', 'Sunstrike Legionnaire', 'Sudden Edict', 'Goblin Electromancer', 'Crux of Fate', 'Abzan Charm', 'Lose Focus', 'Eiganjo Castle', 'Fade from Memory', 'Tide Shaper', 'Sleight of Hand', 'Bubbling Muck', 'Heliod''s Pilgrim', 'Halimar Excavator', 'Fiery Temper', 'Hypnotic Specter', 'Bloodline Keeper', 'Talisman of Unity', 'Labyrinth of Skophos', 'Geomancer''s Gambit', 'Renewed Faith', 'Sign in Blood', 'Moderation', 'Dregscape Zombie', 'Bala Ged Recovery', 'Rise // Fall', 'Zuran Orb', 'Meeting of Minds', 'Volt Charge', 'Kaito, Dancing Shadow', 'Invoke Calamity', 'Orcish Lumberjack', 'Greater Gargadon', 'Graven Lore', 'Search for Azcanta', 'Oracle of Tragedy', 'Bilious Skulldweller', 'Gift of Estates', 'Voyaging Satyr', 'Fetid Pools', 'Revitalize', 'Oona''s Prowler', 'Search for Tomorrow', 'Stone Rain', 'Draugr Necromancer', 'Blightning', 'Leonin Warleader', 'Jace Beleren', 'Faerie Miscreant', 'Ramunap Excavator', 'Wonder', 'Sin Collector', 'Makeshift Mannequin', 'Ethersworn Sphinx', 'Nature''s Lore', 'Elas il-Kor, Sadistic Pilgrim', 'Barbed Sextant', 'Reveillark', 'Realm Razer', 'Into the Roil', 'Smuggler''s Copter', 'Kjeldoran Outpost', 'Cabal Ritual', 'Kalastria Healer', 'Silent Gravestone', 'Invisible Stalker', 'Night Market Lookout', 'Blanchwood Prowler', 'Gleeful Demolition', 'Silumgar, the Drifting Death', 'Blood on the Snow', 'Unlucky Witness', 'It That Betrays', 'Terastodon', 'Nezumi Informant', 'Krosan Grip', 'Cabal Initiate', 'Nullpriest of Oblivion', 'Hesitation', 'Azorius Guildgate', 'Herd Baloth', 'Grand Architect', 'Mortuary Mire', 'Tezzeret''s Gambit', 'Combat Research', 'Dream Trawler', 'Mishra''s Self-Replicator', 'Become Immense', 'Baneful Omen', 'Marble Diamond', 'River of Tears', 'Ashnod, Flesh Mechanist', 'Mistvault Bridge', 'Nezumi Graverobber', 'Hero of Oxid Ridge', 'Dark-Dweller Oracle', 'Arbalest Engineers', 'Teleportation Circle', 'Gods Willing', 'Sin Prodder', 'Angel of Condemnation', 'Quicken', 'Wilt', 'Basking Rootwalla', 'Drossforge Bridge', 'Exclude', 'Farseek', 'Tolarian Terror', 'Icehide Golem', 'Figure of Destiny', 'Kiora, the Crashing Wave', 'Venser, the Sojourner', 'Carven Caryatid', 'Nekrataal', 'Dimir Aqueduct', 'Solemnity', 'Selesnya Guildgate', 'Ulvenwald Hydra', 'Elemental Masterpiece', 'Kogla, the Titan Ape', 'Energy Refractor', 'Golgari Guildgate', 'Battle of Wits', 'Valiant Changeling', 'Spectral Shift', 'Gutterbones', 'Anafenza, Kin-Tree Spirit', 'Dimensional Infiltrator', 'Mirage Mirror', 'Yasharn, Implacable Earth', 'Hero''s Downfall', 'Rally the Ancestors', 'Distended Mindbender', 'Blightbelly Rat', 'Early Harvest', 'Ghostfire Blade', 'Alms of the Vein', 'Lavinia of the Tenth', 'Heliod''s Intervention', 'See Beyond', 'Treasure Cruise', 'Commence the Endgame', 'Reckoner''s Bargain', 'Brain Freeze', 'Kor Firewalker', 'Nephalia Drownyard', 'Reckless Rage', 'Lodestone Golem', 'Aether Spellbomb', 'Seismic Assault', 'Fiery Justice', 'Audacity', 'Tangled Islet', 'Floriferous Vinewall', 'Pull from Tomorrow', 'Time of Need', 'Evolving Wilds', 'Viashino Pyromancer', 'Cathedral of War', 'Dross Skullbomb', 'Blood Artist', 'Geothermal Bog', 'Heartless Act', 'Rites of Spring', 'Spell Pierce', 'All That Glitters', 'Empyrial Armor', 'Simic Guildgate', 'Aetherling', 'Idyllic Tutor', 'Psychic Possession', 'Faith''s Reward', 'Armored Scrapgorger', 'Explore', 'Ammit Eternal', 'Merrow Reejerey', 'Deprive', 'Squadron Hawk', 'Devious Cover-Up', 'Vivid Grove', 'Frontier Bivouac', 'Endbringer', 'Judge''s Familiar', 'Trace of Abundance', 'Memoricide', 'Invigorate', 'Triumphant Adventurer', 'Wrenn''s Resolve', 'Empyrial Plate', 'Gyruda, Doom of Depths', 'Sunpetal Grove', 'Enchantress''s Presence', 'Altar of the Brood', 'Spell Burst', 'Guile', 'Might of Old Krosa', 'Touch the Spirit Realm', 'Battle of Frost and Fire', 'Kher Keep', 'Folio of Fancies', 'Godo, Bandit Warlord', 'Terminate', 'Barbarian Ring', 'Putrid Imp', 'Vraska''s Contempt', 'Argentum Armor', 'Ornithopter', 'Nissa, Worldwaker', 'Gitaxian Probe', 'Phalanx Leader', 'Obscura Charm', 'Tanglepool Bridge', 'Rishadan Dockhand', 'Astral Slide', 'Sweltering Suns', 'Gruul Guildgate', 'Thrill of Possibility', 'Protect the Negotiators', 'Vigor', 'Racers'' Ring', 'Curse of Exhaustion', 'Weathered Wayfarer', 'Worship', 'Orzhov Basilica', 'Purify the Grave', 'Stirring Wildwood', 'Sea-Dasher Octopus', 'Grand Abolisher', 'Ancient Amphitheater', 'Bone Shards', 'Ranger of Eos', 'Wolfbriar Elemental', 'Inevitable Betrayal', 'Gideon''s Intervention', 'Ertai''s Scorn', 'Seething Song', 'Dauntless Bodyguard', 'Ghost Quarter', 'Chief of the Foundry', 'Lightning Strike', 'Diabolic Tutor', 'Obliterate', 'Azorius Charm', 'Nimble Larcenist', 'Otherworldly Journey', 'Hostage Taker', 'Cauldron Familiar', 'Fearless Fledgling', 'Archpriest of Shadows', 'Harrow', 'Abiding Grace', 'Ground Seal', 'Dissipate', 'Radha, Heart of Keld', 'Mesmeric Fiend', 'Commit // Memory', 'Double Vision', 'Arlinn Kord', 'Archaeomancer', 'Cultivate', 'Acclaimed Contender', 'Smother', 'Call to the Grave', 'Aetherworks Marvel', 'Undying Evil', 'Witching Well', 'Temple of Malady', 'Stir the Grave', 'Brokers Hideout', 'Izzet Charm', 'Bituminous Blast', 'Siege Rhino', 'Silundi Vision', 'Experimental Augury', 'Pharika''s Libation', 'Fleecemane Lion', 'Hedron Archive', 'Open the Gates', 'Bloodsoaked Champion', 'Tendo Ice Bridge', 'Third Path Iconoclast', 'Incinerate', 'Brainstone', 'Shred Memory', 'Dying to Serve', 'Fae of Wishes', 'Summer Bloom', 'Saproling Migration', 'Odds // Ends', 'Gigadrowse', 'Spirit Mantle', 'Luminarch Ascension', 'Ondu Inversion', 'Kaya, Ghost Assassin', 'Ardent Recruit', 'Anafenza, the Foremost', 'Frostwalk Bastion', 'Big Game Hunter', 'Aetherspouts', 'Venerated Loxodon', 'Forging the Anchor', 'The Birth of Meletis', 'Tooth and Nail', 'Gather the Pack', 'The Scorpion God', 'Gallia of the Endless Dance', 'Dawn of Hope', 'Castigate', 'Sarkhan, the Dragonspeaker', 'Brave the Sands', 'Avacyn''s Pilgrim', 'Upheaval', 'Fact or Fiction', 'Dusk // Dawn', 'White Sun''s Zenith', 'Crawling Chorus', 'Faerie Conclave', 'Seal of Cleansing', 'Grave Titan', 'Delver of Secrets', 'Chaotic Transformation', 'Dread Wanderer', 'Cut Down', 'Mausoleum Secrets', 'Xerex Strobe-Knight', 'Presence of Gond', 'Resurgent Belief', 'Circuit Mender', 'Sphere of Safety', 'Battlefield Forge', 'Sylvan Primordial', 'The Celestus', 'Circular Logic', 'Solitary Confinement', 'Wasteland Strangler', 'Glacial Fortress', 'Venerable Knight', 'Tainted Indulgence', 'Phyrexian Unlife', 'Fire Prophecy', 'Liliana Vess', 'Tangle', 'Ivory Tower', 'Nightscape Familiar', 'Chandra, Pyromaster', 'Urban Evolution', 'Vampire Hexmage', 'Lagrella, the Magpie', 'Favored Hoplite', 'Tomebound Lich', 'Kor Skyfisher', 'Merfolk Mistbinder', 'Sea Gate Oracle', 'Lay Down Arms', 'Reinforced Ronin', 'Tribute to Hunger', 'Lantern-Lit Graveyard', 'Celestial Colonnade', 'Magister of Worth', 'Grolnok, the Omnivore', 'Sunblade Samurai', 'Stupor', 'Yavimaya Iconoclast', 'Froghemoth', 'Sylvan Caryatid', 'Gruul Turf', 'Kambal, Consul of Allocation', 'Invasion of Regatha', 'Altered Ego', 'Glistener Elf', 'Nezumi Shortfang', 'Oni-Cult Anvil', 'Verduran Enchantress', 'Watcher for Tomorrow', 'Scrapheap Scrounger', 'Nested Shambler', 'Gryff''s Boon', 'Maestros Charm', 'Arguel''s Blood Fast', 'Koth, Fire of Resistance', 'Into the Story', 'Shardless Agent', 'Burst Lightning', 'Melira, the Living Cure', 'Buried Ruin', 'Thrash // Threat', 'Marauding Blight-Priest', 'Hornet Queen', 'Midnight Guard', 'Shriekmaw', 'Knight Exemplar', 'Maelstrom Pulse', 'Scrapwork Mutt', 'Mikokoro, Center of the Sea', 'Plated Geopede', 'Honor of the Pure', 'Archangel Avacyn', 'Spatial Contortion', 'Late to Dinner', 'Deep Analysis', 'Yavimaya Coast', 'Glaring Aegis', 'Wall of Omens', 'Myr Battlesphere', 'Boon-Bringer Valkyrie', 'Blade Splicer', 'Check for Traps', 'Darksteel Citadel', 'Tectonic Edge', 'Patchwork Automaton', 'Felidar Cub', 'Dire-Strain Rampage', 'Stave Off', 'Commune with Nature', 'Flooded Grove', 'Cryptic Caves', 'Venser, Shaper Savant', 'Oath of Kaya', 'Lurrus of the Dream-Den', 'Ensoul Artifact', 'Founding the Third Path', 'Invasion of Ergamon', 'Cleansing Wildfire', 'Turnabout', 'Corrupted Crossroads', 'Dimir Guildgate', 'Scrying Sheets', 'Wanderwine Hub', 'Zombie Infestation', 'Restoration Angel', 'Overgrowth', 'Doomed Traveler', 'Fyndhorn Elves', 'Sculpting Steel', 'Snow-Covered Plains', 'Phyrexian Censor', 'Clifftop Retreat', 'Open the Armory', 'Kitesail Freebooter', 'Sorin, Grim Nemesis', 'Sinister Concoction', 'Myth Realized', 'Sever the Bloodline'))) 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, 2.8, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite

vorpal-buildbot commented 1 year ago

Exceeded slow_query limit (2.7 > 1.0) in mysql: ```

    SELECT

    d.id,
    d.finish,
    d.decklist_hash,
    cache.active_date,
    cache.wins,
    cache.losses,
    cache.draws,
    cache.color_sort,
    ct.name AS competition_type_name

    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 ('Vampire Neonate', 'Dakkon, Shadow Slayer', 'Putrefy', 'Possibility Storm', 'Dimir Guildgate', 'Glacial Fortress', 'Mirage Mirror', 'Akroan Crusader', 'Master of Death', 'Sea Gate Oracle', 'The Underworld Cookbook', 'Acclaimed Contender', 'Orim''s Chant', 'Xerex Strobe-Knight', 'Sylvan Caryatid', 'Elderscale Wurm', 'Sunblade Samurai', 'Ghost Quarter', 'Go for the Throat', 'Pore Over the Pages', 'Argentum Armor', 'Choked Estuary', 'Bala Ged Recovery', 'Lose Focus', 'Brave the Elements', 'Executioner''s Capsule', 'Rootbound Crag', 'Astral Slide', 'Control Magic', 'Far // Away', 'Mastermind''s Acquisition', 'Slagstorm', 'Verduran Enchantress', 'Canopy Vista', 'Open the Armory', 'Ethereal Armor', 'Day of Judgment', 'Runed Halo', 'Bogbrew Witch', 'Lazotep Chancellor', 'Burst Lightning', 'Chief Engineer', 'Sphinx''s Herald', 'Myr Battlesphere', 'Phoenix Chick', 'Become Immense', 'Invigorate', 'Cabal Ritual', 'Desperate Ritual', 'Mortuary Mire', 'Phantasmal Image', 'Gadrak, the Crown-Scourge', 'Distorted Curiosity', 'Into the Roil', 'Waking the Trolls', 'Graven Lore', 'Angel''s Grace', 'Knight of the Reliquary', 'Revitalize', 'Discovery // Dispersal', 'Simic Guildgate', 'Madcap Experiment', 'Barter in Blood', 'Invoke Calamity', 'Ghostfire Blade', 'Gallia of the Endless Dance', 'Ignite Memories', 'Fade from Memory', 'River of Tears', 'Porphyry Nodes', 'Obscura Storefront', 'Detention Sphere', 'Seething Song', 'Zombie Infestation', 'Time of Need', 'Vampire Lacerator', 'Rites of Initiation', 'Phyrexian Censor', 'Norn''s Inquisitor', 'Genesis Ultimatum', 'Lavinia of the Tenth', 'Ponder', 'Nezumi Informant', 'Pain Seer', 'Venerated Loxodon', 'Frost Titan', 'Invasion of Ergamon', 'Dokuchi Silencer', 'Hesitation', 'Nullpriest of Oblivion', 'Sunscour', 'Phyrexian Revoker', 'Sultai Charm', 'Kor Skyfisher', 'Archpriest of Shadows', 'Draugr Necromancer', 'Thraben Inspector', 'Eldrazi Skyspawner', 'Sheltered Thicket', 'Sylvan Library', 'Boros Guildgate', 'Archangel of Wrath', 'Gloomshrieker', 'Mulldrifter', 'Mazemind Tome', 'Hada Freeblade', 'Teleportation Circle', 'Merrow Reejerey', 'Arbalest Engineers', 'Ral, Storm Conduit', 'Frost Marsh', 'Sarkhan, the Dragonspeaker', 'Destroy Evil', 'Midnight Clock', 'Summary Dismissal', 'Murmuring Bosk', 'Vampiric Rites', 'Quiet Speculation', 'Knight Exemplar', 'It That Betrays', 'Azorius Charm', 'Sculpted Perfection', 'Aegis of the Gods', 'Frostwalk Bastion', 'Leonin Lightscribe', 'Brokers Hideout', 'Buried Ruin', 'Predatory Sliver', 'Dreams of Steel and Oil', 'Doomskar', 'Ground Seal', 'Blessed Alliance', 'Oracle of Tragedy', 'Timely Reinforcements', 'Shambling Vent', 'Goblin Dark-Dwellers', 'Vedalken Heretic', 'Blazing Rootwalla', 'Temple of Silence', 'Grand Abolisher', 'Doomed Traveler', 'Unburial Rites', 'Figure of Destiny', 'Unstable Mutation', 'Sculpting Steel', 'Seal of Cleansing', 'Merciless Eviction', 'Faerie Miscreant', 'Sunlit Marsh', 'Utter End', 'Vault of the Archangel', 'Herald of the Pantheon', 'Late to Dinner', 'Earthquake', 'Lavaclaw Reaches', 'Demigod of Revenge', 'Caldera Hellion', 'Graveborn Muse', 'Dimensional Infiltrator', 'Hideous End', 'Silumgar''s Scorn', 'Ichorclaw Myr', 'Silver-Fur Master', 'Protect the Negotiators', 'Increasing Ambition', 'Blood on the Snow', 'Invasion of New Capenna', 'Greater Tanuki', 'Price of Progress', 'Westvale Abbey', 'Varolz, the Scar-Striped', 'Endbringer', 'Skyclave Shade', 'Obstinate Baloth', 'Gigadrowse', 'Silent Gravestone', 'Wandering Fumarole', 'Makeshift Mannequin', 'Sorin, Vengeful Bloodlord', 'Pyretic Ritual', 'Game Trail', 'Ayli, Eternal Pilgrim', 'Strike It Rich', 'Check for Traps', 'Gift of Immortality', 'Pyroclasm', 'Haunted Fengraf', 'Archangel Avacyn', 'Malicious Malfunction', 'Tomik, Distinguished Advokist', 'Martyr of Sands', 'Nevermore', 'Goblin Electromancer', 'Blight Mamba', 'Lingering Souls', 'Second Sunrise', 'Murderous Cut', 'Corrupted Conviction', 'Greater Gargadon', 'Karumonix, the Rat King', 'Peek', 'Grand Arbiter Augustin IV', 'Solemnity', 'Always Watching', 'Mindslaver', 'Winds of Abandon', 'Rocco, Cabaretti Caterer', 'Sandwurm Convergence', 'Kjeldoran Outpost', 'Tezzeret''s Gambit', 'Esper Charm', 'Saffi Eriksdotter', 'Oblivion Ring', 'Woodfall Primus', 'Voltage Surge', 'Angel of Despair', 'Cauldron Familiar', 'Ancient Ziggurat', 'Knight of New Alara', 'Bontu''s Last Reckoning', 'The Seedcore', 'Castigate', 'Farseek', 'Duress', 'Sarkhan the Masterless', 'Eiganjo Castle', 'Demolition Field', 'Feed the Swarm', 'Precursor Golem', 'Sorin, Grim Nemesis', 'Priest of the Haunted Edge', 'Wrench Mind', 'Ghitu Lavarunner', 'Benthic Biomancer', 'Gird for Battle', 'Scour All Possibilities', 'Sever the Bloodline', 'Decree of Justice', 'Deafening Clarion', 'Otherworldly Journey', 'Thassa''s Intervention', 'Anger of the Gods', 'Fertile Ground', 'Secluded Steppe', 'Launch the Fleet', 'Felidar Cub', 'Mirror Entity', 'Nine Lives', 'Altered Ego', 'Dragon''s Hoard', 'Dissolve', 'Vadrik, Astral Archmage', 'Guile', 'Think Twice', 'Weathered Wayfarer', 'Crawling Chorus', 'Upheaval', 'Forsake the Worldly', 'Hooting Mandrills', 'Jwari Shapeshifter', 'Kappa Tech-Wrecker', 'Favored Hoplite', 'Scab-Clan Berserker', 'Gruul Spellbreaker', 'Bident of Thassa', 'Tooth and Nail', 'Kiora, the Crashing Wave', 'Nether Spirit', 'Tyrant''s Choice', 'Slogurk, the Overslime', 'Basking Rootwalla', 'Self-Assembler', 'Notorious Throng', 'Commune with Nature', 'Selesnya Guildgate', 'Scattered Groves', 'Silumgar, the Drifting Death', 'Yavimaya Iconoclast', 'Sylvan Primordial', 'Aetherworks Marvel', 'Faeburrow Elder', 'Dread Wanderer', 'Ensoul Artifact', 'Frantic Search', 'Changeling Outcast', 'Altar of the Brood', 'Honor of the Pure', 'Banishing Slash', 'Forked Bolt', 'Memoricide', 'Wolfbriar Elemental', 'Cathartic Reunion', 'Haunted Mire', 'Ghostly Flicker', 'Spoils of the Vault', 'Glimpse of Tomorrow', 'Temple of Malady', 'Vindictive Flamestoker', 'Wooded Bastion', 'Elvish Visionary', 'See Beyond', 'Mana Leak', 'Hostage Taker', 'Dead of Winter', 'Dead Weight', 'Vivid Marsh', 'Primal Command', 'Monument to Perfection', 'Shizo, Death''s Storehouse', 'White Sun''s Zenith', 'Overgrowth', 'Grand Architect', 'Ramunap Excavator', 'Metalwork Colossus', 'Attune with Aether', 'Crawling Barrens', 'Silverbluff Bridge', 'Halana and Alena, Partners', 'Graaz, Unstoppable Juggernaut', 'Ishkanah, Grafwidow', 'Racers'' Ring', 'Vapor Snag', 'Endless Horizons', 'Kalastria Healer', 'Woodweaver''s Puzzleknot', 'Chandra, Pyromaster', 'Orcish Lumberjack', 'Unmarked Grave', 'Reveillark', 'Gravelgill Duo', 'Delver of Secrets', 'Throne of the God-Pharaoh', 'Clifftop Retreat', 'Thaumatic Compass', 'Meeting of Minds', 'Garruk Wildspeaker', 'Expedition Envoy', 'Dark Ritual', 'Lodestone Golem', 'Fiery Temper', 'Necrogen Spellbomb', 'Valiant Changeling', 'Titania, Protector of Argoth', 'Commit // Memory', 'Lochmere Serpent', 'Quicken', 'Barbarian Ring', 'Arcum''s Astrolabe', 'Conflagrate', 'Green Sun''s Twilight', 'Angel of Grace', 'Teshar, Ancestor''s Apostle', 'Viscera Seer', 'Fact or Fiction', 'Nimble Obstructionist', 'Kruphix''s Insight', 'Sudden Edict', 'Dusk // Dawn', 'Helm of the Host', 'Polukranos, World Eater', 'Voldaren Pariah', 'Sol Talisman', 'Mothdust Changeling', 'Cataclysmic Gearhulk', 'Triumphant Adventurer', 'Gruul Turf', 'Contaminated Aquifer', 'Voyaging Satyr', 'Drown in Ichor', 'Sacred Peaks', 'Terminus', 'Blighted Agent', 'Annex Sentry', 'Battlefield Forge', 'Bloodsoaked Champion', 'Turnabout', 'Destiny Spinner', 'Abundant Harvest', 'Call to the Grave', 'Sire of Insanity', 'Snow-Covered Mountain', 'Oona''s Prowler', 'Bump in the Night', 'Demonic Bargain', 'Resurgent Belief', 'Vivid Grove', 'Undying Evil', 'Erebos''s Intervention', 'Swiftfoot Boots', 'Saproling Migration', 'Barbed Sextant', 'Nissa, Steward of Elements', 'Liliana Vess', 'Riveteers Overlook', 'Simian Spirit Guide', 'Razortide Bridge', 'Assemble the Legion', 'Rakdos Charm', 'Kor Firewalker', 'Thrill of Possibility', 'Watcher for Tomorrow', 'Syphon Life', 'Wilt', 'Nimble Trapfinder', 'Dovin''s Acuity', 'Forbid', 'Venser, Corpse Puppet', 'General Ferrous Rokiric', 'Anafenza, the Foremost', 'Hard Evidence', 'Gateway Plaza', 'Grave Titan', 'Elves of Deep Shadow', 'Crack the Earth', 'Teferi, Mage of Zhalfir', 'Benalish Marshal', 'Valakut Exploration', 'Tree of Tales', 'Champion of Wits', 'Rustvale Bridge', 'Brain Freeze', 'Ravenous Squirrel', 'King Darien XLVIII', 'Touch the Spirit Realm', 'Reckless Rage', 'Cabaretti Courtyard', 'The Birth of Meletis', 'Venser, Shaper Savant', 'Battle of Wits', 'Secluded Courtyard', 'Dryad Militant', 'Experimental Augury', 'Terminate', 'Heap Doll', 'Boon-Bringer Valkyrie', 'Yisan, the Wanderer Bard', 'Malakir Rebirth', 'Cabal Initiate', 'Gutterbones', 'Godo, Bandit Warlord', 'Sea-Dasher Octopus', 'Kher Keep', 'Toolcraft Exemplar', 'Shard Volley', 'Repeal', 'Thornglint Bridge', 'Blanchwood Prowler', 'Silundi Vision', 'The Scorpion God', 'Bolas''s Citadel', 'Acidic Slime', 'Temple of Mystery', 'Mesmeric Fiend', 'Diffusion Sliver', 'Reinforced Ronin', 'Colossal Skyturtle', 'Stirring Wildwood', 'Idyllic Beachfront', 'Nephalia Drownyard', 'Early Harvest', 'Arcbound Ravager', 'Eternal Scourge', 'Deep Analysis', 'Shardless Agent', 'Sunken Hollow', 'Mindcrank', 'Lotus Cobra', 'Prophetic Prism', 'Mouth of Ronom', 'Nekrataal', 'Riveteers Charm', 'Surge of Salvation', 'Fruit of Tizerus', 'Frenetic Sliver', 'Frantic Inventory', 'Temple of Deceit', 'Fallaji Archaeologist', 'Jace Beleren', 'Stoic Rebuttal', 'Vraska''s Contempt', 'Odds // Ends', 'Hero of Bladehold', 'Aetherling', 'Cliffside Lookout', 'Ardent Recruit', 'Yasharn, Implacable Earth', 'Woe Strider', 'Psychic Possession', 'Darksteel Colossus', 'Hanweir Garrison', 'Circular Logic', 'Brainstone', 'Idyllic Tutor', 'Network Disruptor', 'Seismic Assault', 'Temple of Plenty', 'Tidespout Tyrant', 'Call of the Death-Dweller', 'Sunstrike Legionnaire', 'Encroaching Wastes', 'Moorland Haunt', 'Vivid Crag', 'Labyrinth of Skophos', 'Kuldotha Forgemaster', 'Ivory Tower', 'Bogardan Hellkite', 'Sinister Concoction', 'Aetherblade Agent', 'Eternal Dragon', 'Declaration in Stone', 'Rise // Fall', 'Ossification', 'Into the Story', 'Spirited Companion', 'Neutralize', 'Night Market Lookout', 'Putrid Imp', 'Collected Conjuring', 'Tangle', 'Luminarch Ascension', 'Rift Bolt', 'Drowned Rusalka', 'Elixir of Immortality', 'Invasion of Amonkhet', 'Teneb, the Harvester', 'Tyrant of Discord', 'Kiora Bests the Sea God', 'Flooded Grove', 'Bloodchief Ascension', 'Pardic Miner', 'Floriferous Vinewall', 'Elvish Rejuvenator', 'Flame Rift', 'Drake Haven', 'Delay', 'Reckless Charge', 'Ashenmoor Liege', 'Ertai''s Scorn', 'Moderation', 'Doom Blade', 'Knight of the White Orchid', 'Tempest Djinn', 'Thawing Glaciers', 'Voidslime', 'Abundant Growth', 'Marit Lage''s Slumber', 'Sterling Grove', 'Galerider Sliver', 'Shrieking Affliction', 'Blightbelly Rat', 'Calciform Pools', 'Heartless Act', 'Flametongue Kavu', 'Settle the Wreckage', 'Invasion of Regatha', 'Rust Goliath', 'Zur''s Weirding', 'Embodiment of Fury', 'Orzhov Charm', 'Zuran Orb', 'Energy Refractor', 'Radiant Grove', 'Dragonskull Summit', 'Nightscape Familiar', 'Terramorphic Expanse', 'Mesa Enchantress', 'Raven''s Crime', 'Spectral Shift', 'Tendo Ice Bridge', 'Hinterland Harbor', 'Stinkweed Imp', 'Merfolk Mistbinder', 'Stone Rain', 'Nomad Outpost', 'Aquitect''s Will', 'Inscribed Tablet', 'Ethersworn Sphinx', 'Vraska''s Fall', 'Defiant Strike', 'Ally Encampment', 'Marble Diamond', 'Throat Slitter', 'Prosperous Thief', 'Faerie Conclave', 'Sigil of the Empty Throne', 'Golgari Rot Farm', 'Festering Newt', 'Viashino Pyromancer', 'Careful Cultivation', 'Hieroglyphic Illumination', 'Recurring Nightmare', 'Grimoire Thief', 'Combat Thresher', 'Rise and Shine', 'Search for Tomorrow', 'Chandra, Flamecaller', 'Basilisk Collar', 'Aetherspouts', 'Tear Asunder', 'Coalition Relic', 'Umara Wizard', 'Triskelion', 'Deprive', 'Sylvan Advocate', 'Fumigate', 'Snow-Covered Plains', 'Maze''s End', 'Soltari Priest', 'Gryff''s Boon', 'Black Sun''s Zenith', 'Hypergenesis', 'Chamber Sentry', 'Distended Mindbender', 'Wizard''s Retort', 'Sin Collector', 'Chaotic Transformation', 'Geyadrone Dihada', 'Chief of the Foundry', 'Argentum Masticore', 'Disallow', 'Shape Anew', 'Nissa, Worldwaker', 'Mystical Teachings', 'Xenagos, the Reveler', 'Oni-Cult Anvil', 'Fetid Pools', 'Spell Pierce', 'Tribute to Hunger', 'Slagwoods Bridge', 'Cleansing Wildfire', 'Pharika''s Libation', 'Scrabbling Claws', 'Condemn', 'Loxodon Smiter', 'Dauntless Bodyguard', 'Faith''s Reward', 'Vessel of Nascency', 'Rites of Spring', 'Restoration Angel', 'Zephyr Singer', 'Shimmer Dragon', 'Port Town', 'Eidolon of Blossoms', 'Sin Prodder', 'Halimar Excavator', 'Bubbling Cauldron', 'Mephidross Vampire', 'Lay Down Arms', 'Invasion of Zendikar', 'Ulcerate', 'Dream Trawler', 'Divinity of Pride', 'Surrak, the Hunt Caller', 'Reflector Mage', 'Disrupting Shoal', 'Audacity', 'Tectonic Giant', 'Shatter the Sky', 'Akoum Hellhound', 'Harrow', 'Sulfur Falls', 'Disenchant', 'Fiery Justice', 'Mirran Crusader', 'Fire Prophecy', 'Temple of Enlightenment', 'Froghemoth', 'Assault // Battery', 'Talisman of Impulse', 'Tangled Islet', 'Hour of Promise', 'Ondu Inversion', 'Empyrial Plate', 'Duneblast', 'Moon-Circuit Hacker', 'Hope of Ghirapur', 'Unsubstantiate', 'Darksteel Citadel', 'Talisman of Unity', 'Bloodline Keeper', 'Sigrid, God-Favored', 'Unctus, Grand Metatect', 'Purify the Grave', 'Dead // Gone', 'Patchwork Automaton', 'Ornithopter', 'Evangel of Synthesis', 'Shred Memory', 'Circuit Mender', 'Mishra''s Factory', 'Glamerdye', 'Hall of Oracles', 'Smallpox', 'Baneful Omen', 'Hissing Quagmire', 'Kabira Takedown', 'Explore', 'Dross Skullbomb', 'Rule of Law', 'Devious Cover-Up', 'Inkwell Leviathan', 'Vigor', 'Chandra, Fire Artisan', 'Augur of Skulls', 'Kefnet the Mindful', 'Fracturing Gust', 'Forbidden Alchemy', 'Flaying Tendrils', 'Stern Dismissal', 'Stoke the Flames', 'Narcomoeba', 'Eldrazi Displacer', 'Fyndhorn Elves', 'Sylvan Scrying', 'Venerable Knight', 'Consuming Vapors', 'Invisible Stalker', 'Cloudpost', 'Wall of Omens', 'Tanglepool Bridge', 'Witching Well', 'Kogla, the Titan Ape', 'Angrath, the Flame-Chained', 'Enchantress''s Presence', 'Raise the Alarm', 'Altar of the Goyf', 'Dimir Aqueduct', 'Goldmire Bridge', 'Rakdos Cackler', 'Bone Shards', 'Oust', 'Myr Superion', 'Ashen Rider', 'Gnawing Vermin', 'Seeker of the Way', 'Exclude', 'Divest', 'Volt Charge', 'Izzet Boilerworks', 'Midnight Reaper', 'Blightning', 'Anguished Unmaking', 'Vines of Vastwood', 'Satyr Wayfinder', 'All That Glitters', 'Caves of Koilos', 'Nameless Inversion', 'Big Game Hunter', 'Combat Research', 'Rix Maadi Reveler', 'Briarbridge Tracker', 'Orzhov Basilica', 'Corpse Cur', 'Tendrils of Agony', 'Huatli, Radiant Champion', 'Rampant Growth', 'Llanowar Augur', 'Dissipate', 'Night of Souls'' Betrayal', 'Wayward Guide-Beast', 'Anafenza, Kin-Tree Spirit', 'Squee, Goblin Nabob', 'Electrolyze', 'Fight as One', 'Archaeomancer', 'Kumano Faces Kakkazan', 'Kitchen Imp', 'Nimble Larcenist', 'Elite Inquisitor', 'Sleight of Hand', 'Forging the Anchor', 'Hypnotic Specter', 'Torens, Fist of the Angels', 'Lagrella, the Magpie', 'Ambush Viper', 'Yavimaya Coast', 'Glint-Sleeve Siphoner', 'Bloodvial Purveyor', 'Arch of Orazca', 'Reckoner''s Bargain', 'Ephara, God of the Polis', 'Supreme Will', 'Stave Off', 'Impulse', 'Lurrus of the Dream-Den', 'Tocatli Honor Guard', 'Brineborn Cutthroat', 'Wrath of God', 'Merfolk Sovereign', 'Koth, Fire of Resistance', 'Joint Exploration', 'Ancient Stirrings', 'Diabolic Tutor', 'Rally the Ancestors', 'Graven Cairns', 'Genesis Hydra', 'Sanctum of Ugin', 'Ayara, First of Locthwain', 'Seal of Fire', 'Psychatog', 'Thragtusk', 'Pilfer', 'Hedron Archive', 'Leonin Arbiter', 'Grolnok, the Omnivore', 'Presence of Gond', 'Tribute to Horobi', 'Curiosity', 'Kitesail Freebooter', 'Forgotten Cave', 'Wild Cantor', 'Solitary Confinement', 'Prologue to Phyresis', 'Felidar Retreat', 'Melira, the Living Cure', 'Whispersilk Cloak', 'Invasion of Azgol', 'Golgari Guildgate', 'Groundswell', 'Eerie Ultimatum', 'Ulvenwald Hydra', 'Jokulhaups', 'Cloudshift', 'Cryptic Caves', 'Voidwing Hybrid', 'Cold-Eyed Selkie', 'Botanical Plaza', 'Mistveil Plains', 'Mishra''s Self-Replicator', 'Canyon Slough', 'Consecrate // Consume', 'Universal Automaton', 'Yawgmoth''s Bargain', 'Consult the Necrosages', 'Boreal Shelf', 'Nature''s Lore', 'Rune Snag', 'Llanowar Mentor', 'Thundermaw Hellkite', 'Armored Scrapgorger', 'Myr Kinsmith', 'Herd Migration', 'Drowned Catacomb', 'Kaya, Ghost Assassin', 'Shimmerdrift Vale', 'Council''s Judgment', 'Tolarian Terror', 'Jwari Disruption', 'Judge''s Familiar', 'Mind''s Desire', 'Quarantine Field', 'Birds of Paradise', 'Gyruda, Doom of Depths', 'Cut Down', 'Archon of Sun''s Grace', 'Heliod''s Pilgrim', 'Cosmos Elixir', 'Ancient Amphitheater', 'Unholy Heat', 'Repudiate // Replicate', 'Arcane Sanctum', 'Ammit Eternal', 'Ivy Lane Denizen', 'Steppe Lynx', 'Blue Sun''s Zenith', 'Seal of Removal', 'Shivan Reef', 'Heliod''s Intervention', 'Dark Petition', 'Oona''s Grace', 'Nezahal, Primal Tide', 'Geothermal Bog', 'Drainpipe Vermin', 'Trace of Abundance', 'Scrapheap Scrounger', 'Dying to Serve', 'Tainted Indulgence', 'Sunpetal Grove', 'Vampire Hexmage', 'Sheoldred''s Edict', 'Magister of Worth', 'Squadron Hawk', 'Hornet Queen', 'Temple of Triumph', 'Kunoros, Hound of Athreos', 'Hyena Umbra', 'Vexing Shusher', 'Sea Gate Wreckage', 'Nimbus Maze', 'Tidehollow Sculler', 'Abiding Grace', 'Pharika''s Cure', 'Death Cloud', 'Hero''s Downfall', 'Corrupted Crossroads', 'Kazandu Blademaster', 'Territorial Kavu', 'Sinew Sliver', 'Carven Caryatid', 'Engulf the Shore', 'Coiling Oracle', 'Gather the Pack', 'Vindicate', 'Cathedral of War', 'Jungle Hollow', 'Mystic Monastery', 'Icehide Golem', 'Remorseful Cleric', 'Worship', 'Leonin Relic-Warder', 'Twinshot Sniper', 'Silverblade Paladin', 'Incinerate', 'Oath of Kaya', 'Change the Equation', 'Obliterate', 'Karn''s Bastion', 'The Celestus', 'Goreclaw, Terror of Qal Sisma', 'Augur of Bolas', 'Isolated Chapel', 'Gideon''s Intervention', 'Phyrexian Dreadnought', 'Stupor', 'Steel Overseer', 'Sign in Blood', 'Drowner of Hope', 'Realm Razer', 'Terastodon', 'Mistvault Bridge', 'Yahenni''s Expertise', 'Woodland Cemetery', 'Izzet Charm', 'Cabal Therapist', 'Timeless Dragon', 'Union of the Third Path', 'Pulse of the Fields', 'Misery Charm', 'Ad Nauseam', 'Healer''s Hawk', 'Inspiring Veteran', 'Ruric Thar, the Unbowed', 'Venser, the Sojourner', 'Ovika, Enigma Goliath', 'Sandsteppe Citadel', 'Vampire Nighthawk', 'Arguel''s Blood Fast', 'Out of Time', 'Stinkdrinker Bandit', 'Epic Experiment', 'Kaito, Dancing Shadow', 'Tresserhorn Sinks', 'Melira, Sylvok Outcast', 'Thornwood Falls', 'Nezumi Shortfang', 'Thrash // Threat', 'Progenitor Exarch', 'Cloudshredder Sliver', 'Cartel Aristocrat', 'Arbor Elf', 'Quest for the Holy Relic', 'Battle of Frost and Fire', 'Platinum Angel', 'Spirit Mantle', 'Gods Willing', 'World Shaper', 'Jace, Architect of Thought', 'Tranquil Thicket', 'Scrapwork Mutt', 'Radha, Heart of Keld', 'Rain of Tears', 'Izzet Guildgate', 'Bloodchief''s Thirst', 'Wasteland Strangler', 'Double Vision', 'Third Path Iconoclast', 'Lost Legacy', 'Morsel Theft', 'Servo Exhibition', 'Ghostly Pilferer', 'Glimmerpost', 'Knight of Glory', 'Maestros Charm', 'Illuminator Virtuoso', 'Talisman of Curiosity', 'Dreadhorde Butcher', 'Snow-Covered Swamp', 'Phyrexian Unlife', 'Leonin Warleader', 'Mindsplice Apparatus', 'Krosan Grip', 'Dark-Dweller Oracle', 'Vraan, Executioner Thane', 'Pillar of the Paruns', 'Evacuation', 'Slaughter Pact', 'Smoldering Marsh', 'Pariah', 'Bituminous Blast', 'Unlucky Witness', 'Victim of Night', 'Approach of the Second Sun', 'Elspeth Conquers Death', 'Astral Drift', 'Scarab Feast', 'Jungle Shrine', 'Brave the Sands', 'Evolving Wilds', 'Chain Lightning', 'Lonely Sandbar', 'Big Score', 'Wonder', 'Faerie Vandal', 'Gift of Estates', 'Gideon Jura', 'Nezumi Graverobber', 'Ashnod, Flesh Mechanist', 'Wood Elves', 'Rotting Rats', 'Curse of Exhaustion', 'Fleecemane Lion', 'Blade Splicer', 'Rakdos''s Return', 'Bilious Skulldweller', 'Gnat Miser', 'Expedite', 'Memory Lapse', 'Urban Evolution', 'Serra Ascendant', 'Yorion, Sky Nomad', 'Sprite Dragon', 'Pyrite Spellbomb', 'Tilling Treefolk', 'Raze to the Ground', 'Fierce Empath', 'Student of Warfare', 'Stasis Snare', 'Treasure Cruise', 'Alms of the Vein', 'Wrenn''s Resolve', 'Timeless Witness', 'Herd Baloth', 'Research // Development', 'Smother', 'Empyrial Armor', 'Mikokoro, Center of the Sea', 'Frontier Bivouac', 'Urza''s Factory', 'Fae of Wishes', 'Etherium Sculptor', 'Maelstrom Pulse', 'Artisan of Kozilek', 'Siege Rhino', 'Raging Ravine', 'Marauding Blight-Priest', 'The Flame of Keld', 'Opulent Palace', 'General''s Enforcer', 'Bubbling Muck', 'Glorybringer', 'Inevitable Betrayal', 'Farhaven Elf', 'Fearless Fledgling', 'Grim Haruspex', 'Sweltering Suns', 'Tezzeret the Schemer', 'Succumb to Temptation', 'Loran''s Escape', 'Kozilek''s Predator', 'Stubborn Denial', 'Founding the Third Path', 'Dread Return', 'Celestial Colonnade', 'Kitchen Finks', 'Pack Rat', 'Drossforge Bridge', 'Renewed Faith', 'Jukai Naturalist', 'Glaring Aegis', 'Artistic Refusal', 'Midnight Guard', 'Dregscape Zombie', 'Search for Azcanta', 'Negate', 'Devil''s Play', 'Thopter Spy Network', 'Giant Killer', 'Swooping Lookout', 'Tectonic Edge', 'Knowledge Pool', 'Burning of Xinye', 'Orzhov Guildgate', 'Bloodbraid Elf', 'Elemental Masterpiece', 'Murderous Redcap', 'Open the Gates', 'Return to the Ranks', 'Angel of Condemnation', 'Obscura Charm', 'Vault Skirge', 'Geomancer''s Gambit', 'Avacyn''s Pilgrim', 'Needle Spires', 'Bitter Reunion', 'Raffine''s Informant', 'Tide Shaper', 'Minor Misstep', 'Falkenrath Pit Fighter', 'Vryn Wingmare', 'Myth Realized', 'Abzan Charm', 'Mistblade Shinobi', 'Dakmor Salvage', 'Commune with the Gods', 'Might of Old Krosa', 'Llanowar Elves', 'Aether Spellbomb', 'Tomebound Lich', 'Rakdos Guildgate', 'Smuggler''s Copter', 'Lightning Strike', 'Kami of False Hope', 'Grave Scrabbler', 'Elas il-Kor, Sadistic Pilgrim', 'Kessig Wolf Run', 'Lantern-Lit Graveyard', 'Obzedat, Ghost Council', 'Phalanx Leader', 'Wanderwine Hub', 'Mystifying Maze', 'Mulch', 'Sins of the Past', 'Tribal Flames', 'Grafted Butcher', 'Scuttling Doom Engine', 'Ogre Slumlord', 'Temple of Abandon', 'Azorius Guildgate', 'Consume the Meek', 'Tezzeret, Artifice Master', 'Gruul Guildgate', 'Mistcutter Hydra', 'Experimental Synthesizer', 'Bring the Ending', 'Concealing Curtains', 'Mina and Denn, Wildborn', 'Tocasia''s Dig Site', 'Hero of Oxid Ridge', 'Rishadan Dockhand', 'Goblin Bombardment', 'Commence the Endgame', 'Counterflux', 'Deep Forest Hermit', 'Stromkirk Noble', 'Molten Tributary', 'Sphere of Safety', 'Shriekmaw', 'Nested Shambler', 'Shrapnel Blast', 'Grenzo, Dungeon Warden', 'Scrying Sheets', 'Crux of Fate', 'Dawn of Hope', 'Folio of Fancies', 'Kambal, Consul of Allocation', 'Arlinn Kord', 'Agonizing Remorse', 'Gleeful Demolition', 'Springleaf Drum', 'Ranger of Eos', 'Dismal Backwater', 'Mausoleum Secrets', 'Plated Geopede', 'Stir the Grave', 'Glistener Elf', 'Benevolent Bodyguard', 'Malcator, Purity Overseer', 'Spatial Contortion', 'Commune with Spirits', 'Gitaxian Probe', 'Cremate', 'Summer Bloom', 'Blood Artist', 'Fetid Heath', 'Mycosynth Golem', 'Mnemonic Sphere', 'Cultivate', 'Dispatch', 'Angel of Serenity', 'Master of Etherium', 'Spell Burst', 'Ral, Izzet Viceroy', 'Dire-Strain Rampage', 'Oona, Queen of the Fae', 'Worthy Knight', 'Pull from Tomorrow', 'Duplicant', 'Chittering Rats', 'Oracle of Mul Daya', 'Harmonize'))) 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, 2.7, mysql)

Reported on decksite by mysql-perf

Location Hash: 4a40bfc06f938e0b4942b46f2c5abda7cccbdae1

Labels: decksite