I have two tables : table1 has 4lacs (400,000) records and other have 100 records.
I am trying following query :
SELECT DISTINCT t1.id as id
FROM table1 t1
JOIN table2 t2 ON t2.f_id = t1.id
AND t1.action = 0;
I am using MYISAM Engine. t1.id and t2.f_id are same and indexed.
this query is taking 30 secs. Is there any way to make it faster.