The first SQL statement is the original query generated by the
application.
Currently, the TiDB optimizer cannot automatically transform this form
into the most efficient execution plan, resulting in a suboptimal plan.
A workaround was tested by rewriting the IN subquery into an EXISTS