Oracle

Ugliest Query In the World

This is an Apex query and it no longer exists in the environment it once resided in-  When I first came across it, the first red flag was the optimizer cost of 109 billion, (yeah, I had to count the numbers a couple times in disbelief…)  I was reminded of it when Chet from OracleNerd tweeted about a poorly written Apex query and I had to share.  All names and identities have been changed to protect the innocent, (and more likely, the guilty…)

Enjoy!
UgliestQuery!