導致MyISAM腐敗的原因是什么?

[英]What causes MyISAM to become corrupt?


I've heard that MyISAM tables can become corrupt, what sort of actions are most likely to corrupt them and how can you safely fix said corruptions.

我聽說MyISAM表可能會損壞,哪種行為最有可能破壞它們,以及如何安全地修復所述損壞。

4 个解决方案

#1


The MySQL documentation is quite explicit about that: http://dev.mysql.com/doc/refman/5.1/en/corrupted-myisam-tables.html

MySQL文檔非常清楚:http://dev.mysql.com/doc/refman/5.1/en/corrupted-myisam-tables.html

#2


I have a production server and in case of cold resets(e.g. power failures) all MyISAM tables that were in an update process get corrupted. mysqlcheck solves the problem. I recommend putting mysqlcheck with the --auto-repair option in a cron, to fix the rare cases of corruption that happen at runtime.

我有一個生產服務器,如果出現冷復位(例如電源故障),所有處於更新過程中的MyISAM表都會損壞。 mysqlcheck解決了這個問題。我建議將mysqlcheck與--auto-repair選項放在一個cron中,以修復運行時發生的罕見損壞情況。

#3


I got MyISAM corruption sometimes. On my server problem is very heavy load that can overwhelm MySQL causing it to hang. That what happens in real world ;)

我有時會弄錯MyISAM。在我的服務器上問題是非常繁重的負載,可以壓倒MySQL導致它掛起。在現實世界中發生的事情;)

#4


Another problem with MyISAM (although not really database corruption in the strict sense) is that it does not properly support transactions (commit - rollback).

MyISAM的另一個問題(雖然嚴格來說不是真正的數據庫損壞)是它沒有正確支持事務(commit - rollback)。

This could also potentially lead to data integrity problems sooner or later (depending on the quality of the implementation of your database layer).

這可能遲早會導致數據完整性問題(取決於數據庫層的實施質量)。

In my opinion this makes the 'fast' MyISAM backend in MySQL only an option for really simple or really small databases ...

在我看來,這使得MySQL中的“快速”MyISAM后端只是一個真正簡單或非常小的數據庫的選項......


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/04/11/72fb2dfb3d8aa37b3b3c1628da52ca56.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com