Phpmyadmin冻结查询,数据库太大? [英] Phpmyadmin freezes on query, db too big?
问题描述
我有两个表(一个有33k行,另一个有7k行).我想比较两个表并删除两个ID不匹配的行.但是,当我发送查询时,它会冻结phpmyadmin.桌子太大了吗?
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 the query, it freezes phpmyadmin. Could the tables be too big?
SELECT * FROM likes LEFT OUTER JOIN uploads on likes.upload_id = uploads.upload_id WHERE uploads.upload_id IS NULL
我知道数据库旨在处理数百万个数据,所以我不确定错误在哪里.
I know databases are meant to handle millions of data, so i'm not sure where the error lies.
最诚挚的问候, Mathias
Best regards, Mathias
推荐答案
我会做一个解释,以便您可以了解mysql的功能.这样可以很好地指示使用了多少行.
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
您还可以使用其他浏览器或其他会话来使用show processlist来查看查询的执行方式.
you could also use another browser or another session to use show processlist to see how the query is executed.
这篇关于Phpmyadmin冻结查询,数据库太大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!