On 12-07-16 06:57 PM, Rick James wrote:

Plan A:
Would the anti-UNION problem be solved by hiding the UNION in a subquery?  The 
outer query would simply return what the UNION found.

Of course! Yes, problem solved.

Plan B:
Insert every row twice into expression_expression -- (e1,e2) and also (e2,e1).
Then, you need only one index into that table, and you don't need to UNION (or 
the LEFT JOINs).

This is the approach that I was considering for when the app is rewritten. (I've inherited a disaster.)

Thank again for the tip.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to