6

毎日大量の挿入と更新が行われる 20 ギガのテーブルがあります。この表もよく検索されます。MySQL インデックスが断片化する可能性があり、おそらく再構築する必要があるかどうかを知りたいです。

CHECK TABLE、REPAIR TABLE、または同様のもののどれを理解するのが難しいと思いますか?

ガイダンスをいただければ幸いです。私はデータベースの初心者です。

4

1 に答える 1

1

使用している MySQL のバージョンによっては、テーブル パーティションの作成を検討できます。id ハッシュ分割または日付分割のいずれかを実行することによって、それを使用する方法がいくつかあります。

There are also ways to logically seperate 'working' data from archival data. Consider a large table that represents a feed. It may be that data less than 14 or 28 days old is 95% of your used data and the rest can routinely be put in an archive table.

If being able to partition into multiple servers representing chunks of data is possible, there are some great presentations about how to create federated data storage systems using MySQL. Brad Fitpatrick's overview of LiveJournal is a great place to start.

Depending on the type of data you are storing, you may not even need MySQL at all. If most of your lookups are primary key gets, you may want to investigate key/value storage systems like Redis or Cassandra to see if they meet your needs.

于 2010-05-11T18:30:23.263 に答える