MySQL数据库的最大大小是多少?

时间:2022-01-16 22:18:00

I have looked all over the MySQL website and found no definitive answers.

我查看了整个MySQL网站,没有找到明确的答案。

  1. Is the size of the database determined by the operating system or is there 4GB limit?
  2. 数据库的大小是由操作系统决定还是有4GB的限制?
  3. Where can I find perforamnce statistics against other databases (sqlServer, oracle ect)
  4. 哪里可以找到针对其他数据库的执行统计信息(sqlServer,oracle等)

4 个解决方案

#1


24  

According to the MySQL Manual:

根据MySQL手册:

E.10.3. Limits on Table Size

E.10.3。表大小限制

The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. The following table lists some examples of operating system file-size limits. This is only a rough guide and is not intended to be definitive. For the most up-to-date information, be sure to check the documentation specific to your operating system.

MySQL数据库的有效最大表大小通常取决于操作系统对文件大小的约束,而不是MySQL内部限制。下表列出了操作系统文件大小限制的一些示例。这只是一个粗略的指南,并不是明确的。有关最新信息,请务必查看特定于您的操作系统的文档。

Operating System                     File-size Limit
Win32 w/ FAT/FAT32                   2GB/4GB
Win32 w/ NTFS                        2TB (possibly larger)
Linux 2.2-Intel 32-bit               2GB (LFS: 4GB)
Linux 2.4+  (using ext3 file system) 4TB
Solaris 9/10                         16TB
MacOS X w/ HFS+                      2TB

Windows users, please note that FAT and VFAT (FAT32) are not considered suitable for production use with MySQL. Use NTFS instead.

Windows用户请注意,FAT和VFAT(FAT32)不适合与MySQL一起使用。请改用NTFS。

On Linux 2.2, you can get MyISAM tables larger than 2GB in size by using the Large File Support (LFS) patch for the ext2 file system. Most current Linux distributions are based on kernel 2.4 or higher and include all the required LFS patches. On Linux 2.4, patches also exist for ReiserFS to get support for big files (up to 2TB). With JFS and XFS, petabyte and larger files are possible on Linux.

在Linux 2.2上,通过使用ext2文件系统的大文件支持(LFS)修补程序,可以获得大小超过2GB的MyISAM表。大多数当前的Linux发行版都基于内核2.4或更高版本,并包含所有必需的LFS补丁。在Linux 2.4上,ReiserFS还存在修补程序以获得对大文件(最高2TB)的支持。使用JFS和XFS,Linux上可以使用PB级和更大的文件。

As for the other part of your question, a few thoughts:

至于你问题的另一部分,有一些想法:

  1. It's a broad, complex, multi-factorial question. Consider narrowing the scope of the question to MySQL and one other RDBMS (eg. SQL Server) and probably even one particular feature.
  2. 这是一个广泛,复杂,多因素的问题。考虑将问题的范围缩小到MySQL和另一个RDBMS(例如SQL Server),甚至可能是一个特定的功能。
  3. Google is your friend.
  4. 谷歌是你的朋友。
  5. Vendors tend to publish their own biased comparisons. Take vendor numbers with a grain of salt.
  6. 供应商倾向于发布他们自己的偏见比较。用一粒盐给供应商编号。

#2


2  

1- With respect to database size, the limit is dependent on Operating System file size. Please see this article
2- The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. (Source)
3- You may google for MySQL vs SQL Server Vs Oracle, also check this link

1-关于数据库大小,限制取决于操作系统文件大小。请参阅第2章 - MySQL数据库的有效最大表大小通常取决于操作系统对文件大小的约束,而不是MySQL内部限制。 (来源)3-你可以google for MySQL vs SQL Server Vs Oracle,也可以查看此链接

#3


1  

default mysql is 256 TB for myd file with 6 byte pointer size. i know this is ridiculous answer, but that is what you wanted to know. in real life all depends on the queries, indexes, column count, row count, etc.. i guess.

对于具有6字节指针大小的myd文件,默认mysql为256 TB。我知道这是荒谬的答案,但这就是你想知道的。在现实生活中,所有这些都取决于查询,索引,列数,行数等。我猜。

#4


1  

With today's hardware and OS, together with MySQL's preferred Engine InnoDB, the table size limitation is 64TB. With PARTITIONing, that can be stretched to over a hundred petabytes.

使用今天的硬件和操作系统,以及MySQL首选的Engine InnoDB,表大小限制为64TB。使用PARTITIONing,可以扩展到超过一百PB。

A database is a collection of tables. So, to answer the title question literally, we need to go beyond the max table size. Since there can be thousands of tables in a database, we are now into the exabyte stratosphere.

数据库是表的集合。因此,要从字面上回答标题问题,我们需要超越最大表格大小。由于数据库中可能有数千个表,我们现在进入了exabyte平流层。

See also Hard limits in MySQL .

另请参阅MySQL中的硬限制。

#1


24  

According to the MySQL Manual:

根据MySQL手册:

E.10.3. Limits on Table Size

E.10.3。表大小限制

The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. The following table lists some examples of operating system file-size limits. This is only a rough guide and is not intended to be definitive. For the most up-to-date information, be sure to check the documentation specific to your operating system.

MySQL数据库的有效最大表大小通常取决于操作系统对文件大小的约束,而不是MySQL内部限制。下表列出了操作系统文件大小限制的一些示例。这只是一个粗略的指南,并不是明确的。有关最新信息,请务必查看特定于您的操作系统的文档。

Operating System                     File-size Limit
Win32 w/ FAT/FAT32                   2GB/4GB
Win32 w/ NTFS                        2TB (possibly larger)
Linux 2.2-Intel 32-bit               2GB (LFS: 4GB)
Linux 2.4+  (using ext3 file system) 4TB
Solaris 9/10                         16TB
MacOS X w/ HFS+                      2TB

Windows users, please note that FAT and VFAT (FAT32) are not considered suitable for production use with MySQL. Use NTFS instead.

Windows用户请注意,FAT和VFAT(FAT32)不适合与MySQL一起使用。请改用NTFS。

On Linux 2.2, you can get MyISAM tables larger than 2GB in size by using the Large File Support (LFS) patch for the ext2 file system. Most current Linux distributions are based on kernel 2.4 or higher and include all the required LFS patches. On Linux 2.4, patches also exist for ReiserFS to get support for big files (up to 2TB). With JFS and XFS, petabyte and larger files are possible on Linux.

在Linux 2.2上,通过使用ext2文件系统的大文件支持(LFS)修补程序,可以获得大小超过2GB的MyISAM表。大多数当前的Linux发行版都基于内核2.4或更高版本,并包含所有必需的LFS补丁。在Linux 2.4上,ReiserFS还存在修补程序以获得对大文件(最高2TB)的支持。使用JFS和XFS,Linux上可以使用PB级和更大的文件。

As for the other part of your question, a few thoughts:

至于你问题的另一部分,有一些想法:

  1. It's a broad, complex, multi-factorial question. Consider narrowing the scope of the question to MySQL and one other RDBMS (eg. SQL Server) and probably even one particular feature.
  2. 这是一个广泛,复杂,多因素的问题。考虑将问题的范围缩小到MySQL和另一个RDBMS(例如SQL Server),甚至可能是一个特定的功能。
  3. Google is your friend.
  4. 谷歌是你的朋友。
  5. Vendors tend to publish their own biased comparisons. Take vendor numbers with a grain of salt.
  6. 供应商倾向于发布他们自己的偏见比较。用一粒盐给供应商编号。

#2


2  

1- With respect to database size, the limit is dependent on Operating System file size. Please see this article
2- The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. (Source)
3- You may google for MySQL vs SQL Server Vs Oracle, also check this link

1-关于数据库大小,限制取决于操作系统文件大小。请参阅第2章 - MySQL数据库的有效最大表大小通常取决于操作系统对文件大小的约束,而不是MySQL内部限制。 (来源)3-你可以google for MySQL vs SQL Server Vs Oracle,也可以查看此链接

#3


1  

default mysql is 256 TB for myd file with 6 byte pointer size. i know this is ridiculous answer, but that is what you wanted to know. in real life all depends on the queries, indexes, column count, row count, etc.. i guess.

对于具有6字节指针大小的myd文件,默认mysql为256 TB。我知道这是荒谬的答案,但这就是你想知道的。在现实生活中,所有这些都取决于查询,索引,列数,行数等。我猜。

#4


1  

With today's hardware and OS, together with MySQL's preferred Engine InnoDB, the table size limitation is 64TB. With PARTITIONing, that can be stretched to over a hundred petabytes.

使用今天的硬件和操作系统,以及MySQL首选的Engine InnoDB,表大小限制为64TB。使用PARTITIONing,可以扩展到超过一百PB。

A database is a collection of tables. So, to answer the title question literally, we need to go beyond the max table size. Since there can be thousands of tables in a database, we are now into the exabyte stratosphere.

数据库是表的集合。因此,要从字面上回答标题问题,我们需要超越最大表格大小。由于数据库中可能有数千个表,我们现在进入了exabyte平流层。

See also Hard limits in MySQL .

另请参阅MySQL中的硬限制。