Phpmyadmin freezes on query, db too big?

前端 未结 4 1977
忘掉有多难
忘掉有多难 2021-01-15 16:58

I got two tables (one with 33k rows and another with 7k rows). I want to compare the two tables and delete the rows in which the two id\'s dont match. But when i send off th

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-15 17:23

    I would do an explain so you can see what mysql does. This would give a good indication on what how many rows are used.

    EXPLAIN SELECT * FROM likes LEFT OUTER JOIN uploads on likes.upload_id = uploads.upload_id WHERE uploads.upload_id IS NULL
    

    you could also use another browser or another session to use show processlist to see how the query is executed.

提交回复
热议问题