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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -