I'm stuck for a while now, with a Select_full_join number that keep increasing.
I'm using "log-queries-not-using-indexes", I looked at the mysql-slow.log and I found a lot of querys like this one :
# Time: 131106 16:44:51
# User@Host: XXX @ localhost []
# Query_time: 0.000497 Lock_time: 0.000061 Rows_sent: 1 Rows_examined: 0
SET timestamp=1383752691;
SELECT COUNT(*) AS expression
FROM
(SELECT 1 AS expression
FROM
com_c_jobs_listing cj
WHERE (category IN ('Operations', 'Business Development', 'Sales/Account Management', 'R&D', 'Internal IT')) AND (country IN ('Brazil', 'China', 'France', 'Germany', 'Italy', 'Japan', 'Korea', 'Netherlands', 'Russia', 'United Kingdom', 'United States')) ) subquery;
I don't get why this is logged. Also, there is an index on both category and country.
I think I missed something but I can't find what...
This is the result of the explain query :
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away 2 DERIVED cj range category,country category 302 NULL 86 Using where
What should I do? Any idea?