Why Optimization derived_merge can Break Your Queries

Lately, I worked on several queries which started returning wrong results after upgrading MySQL Server to version 5.7 The reason for the failure was derived merge optimization which is one of the default
optimizer_switch options. Issues were solved, though at the price of performance, when we turned it
OFF . But, more importantly, we could […]