Hi,
A subquery with IN clause is not a good idea. If you want to tune this
query, try adding indexes on the tables accessed in the inner query
credits. A composite index on (success,promoter_id) would be sufficient,
then the optimizer will use this index for the where clause and as a
covering
Hi,
I'm running this query:
mysql SELECT email FROM promoters where id NOT IN (SELECT promoter_id
FROM credits WHERE success = 1 ) and active = 1;
Empty set (31.89 sec)
its returning an empty set and take over 30 seconds to return.
mysql describe promoters;