mysql - Speed up query that returns results when present in one table but not in another -
i have 2 tables. t1 contains business info , t2 contains business hours. use following query return results data present in t1 , not in t2.
select distinct(t1.id) t1 left join t2 on (t1.id = t2.busid) t2.busid null
this query works, 15k records in t1 , 50k rows in t2 literally takes minutes return results. wonder if it's possible speed up.
Comments
Post a Comment