Aerik Sylvan wrote:
Showing rows 0 - 15 (16 total, Query took 0.3316 sec) SQL query: SELECT cl_sortkey, count( * ) AS catcount FROM `categorylinks` WHERE `cl_to` = 'Fantasy_films' OR `cl_to` = 'Disney_films ' GROUP BY cl_sortkey HAVING catcount =2 LIMIT 0 , 30
I thought I had mentioned before (maybe not to you) that this query is unnecessarily inefficient (because it scans both categories completely). Why do you use this adventurous approach when there is a much simpler and more obvious one, which also happens to be faster?
SELECT c.cl_from FROM categorylinks c WHERE c.cl_from IN ( SELECT c2.cl_from FROM categorylinks c2 WHERE c2.cl_to='Fantasy_films' ) AND c.cl_to='Disney_films'