MySQLデータベースは103,998,960,000を超えるレコードを保持しますか、それともこれを複数のデータベースに分散させる必要がありますか?
2 に答える
2
レコードのサイズに少し依存します。行数に制限はありませんが、データのサイズには64テラバイトの制限があります。
その制限内にあり、主キーがオーバーフローしないことを確認した場合(この場合、主キーがuintであると仮定すると、オーバーフローしません)、問題はありません。
于 2013-03-01T08:52:59.847 に答える
1
テーブルのサイズが重要でない場合は、非常に多くの行を使用できます。mysqlのドキュメントから。
It is possible to build MySQL with large table support using
the --with-big-tables option.
This option causes the variables that store table row counts to be declared as
unsigned long long rather than unsigned long. This enables tables to hold up
to approximately 1.844E+19 ((232)2) rows rather than 232 (~4.295E+09) rows.
Previously it was necessary to pass -DBIG_TABLES to the compiler manually
in order to enable this feature.
詳細については、MySQLソース構成。
編集:コメントから私はエンジンに関して情報を与えるべきだと思います。
There is a limit of (232)2 (1.844E+19) rows in a MyISAM table.
MyISAMエンジン制限の詳細については。
The InnoDB internal maximum key length is 3500 bytes, but MySQL itself
restricts this to 3072 bytes. This limit applies to the length of
the combined index key in a multi-column index.
InnoDBエンジン制限の詳細については。
理論的にはそうですが、実際には、テーブルのサイズや挿入時間などの制限があります。再びMySQLドキュメントから。
When an AUTO_INCREMENT column runs out of values, InnoDB wraps a BIGINT
to -9223372036854775808 and BIGINT UNSIGNED to 1. However, BIGINT values
have 64 bits, so if you were to insert one million rows per second, it would
still take nearly three hundred thousand years before BIGINT reached its upper bound.
With all other integer type columns, a duplicate-key error results. This is general
MySQL behavior, similar to how MyISAM works.
于 2013-03-01T08:50:40.880 に答える