Speeding up SQL queries by orders of magnitude using UNION
Similar article of mine from 2013: <a href="https://cloudinvent.com/blog/optimize-mysql-count-query/" rel="nofollow">https://cloudinvent.com/blog/optimize-mysql-count-query/</a>