Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个使用 MySQL 数据库 (MYISAM) 的旧 Web 应用程序。我最近注意到应用程序的性能大大降低。检查我的索引后,我注意到所有索引的基数都报告为零。
我可以通过对每个表执行分析表来解决此问题。
但我很好奇,是什么导致基数首先归零?
从内存中,一些修复表操作会擦除统计信息,您需要 ANALYZE TABLE 才能将它们取回。
除此之外,我想不出他们应该归零的任何理由。我只是希望它们会过时。