0

我收到帖子标题中所述的错误。我有两张桌子。第一个,大的超过 4000,000 条记录,第二个,小的大约 7000 条记录。我想在 samll 表中搜索值,如果找到,我想从大表中提取整条记录。该命令从未执行过,并且总是失去与数据库的连接。我试图将输出限制为 50 条记录,同样的事情发生了。请帮我。如果我需要诸如索引之类的东西(我读到这可能会解决此类性能问题,请向我说明如何。我不是 DBA)。

select * from db.large, db.small 
where large.value=small.value;

*编辑:*我使用 MySQL 工作台 5.2.41 CE。

4

1 回答 1

0

At one point on a previous project, I could actually crash the MySQL server reproducibly with a pretty simple query. In the code that called the database, I saw the same error message. Can you verify that the MySQL server's process ID is the same before and after the query? Chances are that your OS restarts the MySQL server immediately after the crash, and the MySQL command line client automatically reconnects (though it emits a notice when it does).

于 2012-08-26T13:57:19.723 回答